Guest Web Roots Posted March 25, 2008 Share Posted March 25, 2008 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.