Created
October 25, 2012 04:51
-
-
Save dancameron/3950466 to your computer and use it in GitHub Desktop.
eWay Tokenized SOAP Client
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$client = new SoapClient( | |
"https://www.eway.com.au/gateway/ManagedPaymentService/test/managedcreditcardpayment.asmx?WSDL", | |
array( 'soap_version' => SOAP_1_2, 'trace' => 1, 'exceptions' => 1 ) ); | |
$header_data = new stdClass; | |
$header_data->eWAYCustomerID = '9876543211000'; | |
$header_data->Username = 'test@eway.com.au'; | |
$header_data->Password = 'test123'; | |
$header = new SoapHeader( "https://www.eway.com.au/gateway/managedpayment", "eWAYHeader", $header_data, FALSE ); | |
$client->__setSoapHeaders( $header ); | |
try { | |
$result = $client->CreateCustomer($customerinfo); | |
var_dump($result); | |
die; | |
} catch ( SoapFault $fault ) { | |
echo $fault->faultstring; | |
echo "<br/>REQUEST:\n<textarea rows='10' cols='60'>" . $client->__getLastRequest() . "\n"; | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment