Jump to content

ATM Payment new Module fo CC4


Guest Web Roots

Recommended Posts

Guest Web Roots

Hi guys,

I was looking a way to use the ATM Ref. code in CC4 and i really don't know how i can do that.

I'm trying to use Print Order Form and insert inside him.

This is the code i need to use to generate Reference code but i have some problem with value VAR.

<?php

// Include the SOAP classes

require_once('nusoap/lib/nusoap.php');

// Specify the Hi-Media client account

// Coloque o seu Login e Password da seguinte forma: $idcliente=â€ÂEXEMPLO†e

// $password="EXEMPLO"

$idcliente="ideclient";

$password="password";

$origem="origem"; //For your reference, you can write anything you want (for further information check other Hi-Media documentation)

$valor="100.9";

$informacao="informaçao teste";

$IDUserBackoffice="-1";

// Specify the webservice information

$action='http://hm.comprafacil.pt/SIBSClick/webservice/SaveCompraToBDValor1';

//$action='http://mobileware.telemoveis.com/SIBSClick/webservice/SaveCompraToBDValor_op1';

$serverpath ='http://hm.comprafacil.pt/SIBSClick/webservice/clicksmsV4.asmx';

//http://mobileware.telemoveis.com/SIBSClickTeste/webservice/clicksmsV2.asmx;

$client = new soapclient($serverpath);

// Check for errors and output them

$err = $client->getError();

if ($err) {

echo '<p>Constructor error</p><pre>' . $err . '</pre>';

}

// Compose the SOAP message

$msg=$client->serializeEnvelope('<SaveCompraToBDValor1 xmlns="http://hm.comprafacil.pt/SIBSClick/webservice/"><origem>'.$origem.'</origem><IDCliente>'.$idcliente.'</IDCliente><password>'.$password.'</password><valor>'.$valor.'</valor><informacao>'.$informacao.'</informacao><IDUserBackoffice>'.$IDUserBackoffice.'</IDUserBackoffice></SaveCompraToBDValor1>','',array(),'document', 'literal');

// Send the SOAP message

$response = $client->send($msg,$action);

// Check for errors and output them

if ($client->fault) {

echo '<p>Fault</p><pre>';

print_r($response);

echo '</pre>';

}

// Output the SOAP query and response

echo "<p>SOAP query</p>";

echo '<pre>' . htmlspecialchars($client->request, ENT_QUOTES) . '</pre>';

echo "<p>SOAP response</p>";

echo '<pre>' . htmlspecialchars($client->response, ENT_QUOTES) . '</pre>';

// Save the SOAP response result to a variable

$result=$response['SaveCompraToBDValor1Result'];

//Save the SOAP response result values to the corresponding variables

$referencia=$response['referencia'];

$entidade=$response['entidade'];

$valorOut=$response['valorOut'];

$error=$response['error'];

//Output the SOAP response result values

echo "<p>SOAP response values</p>";

echo 'Referencia='.$referencia.'<br>';

echo 'Entidade='.$entidade.'<br>';

echo 'Valor='.$valorOut;

?>

Anyone have an idea how to do this or create a new payment module?

Regards,

WR

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...