Reputation: 44066
I am a bit confused on how i create and send this call to the url with php....here is the xml i need to create
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:mer="http://www.site.com/">
<soapenv:Header/>
<soapenv:Body>
<mer:InitializePayment>
<mer:request>
<mer:MerchantID>67779987</mer:MerchantID>
<mer:Password>XXXXXXXXXXXXXXXX</mer:Password>
<mer:Invoice>12345</mer:Invoice>
<mer:TotalAmount>1.03</mer:TotalAmount>
<mer:TaxAmount>0.50</mer:TaxAmount>
<mer:AVSAddress>4 Corpor</mer:AVSAddress>
<mer:AVSZip>30329</mer:AVSZip>
<mer:TranType>PreAuth</mer:TranType>
<mer:CardHolderName>John Jamed</mer:CardHolderName>
<mer:Frequency>OneTime</mer:Frequency>
<mer:CustomerCode>CustCode123</mer:CustomerCode>
<mer:Memo>HostedCheckoutMemo</mer:Memo>
<mer:ProcessCompleteUrl>https://somesite/ordercomplete.aspx</mer:ProcessCompleteUrl>
<mer:ReturnUrl>https://somesite/ShoppingCart.aspx</mer:ReturnUrl>
<mer:DisplayStyle>Prent</mer:DisplayStyle>
<mer:BackgroundColor>#FFFFFF</mer:BackgroundColor>
<mer:FontColor>#000000</mer:FontColor>
<mer:FontFamily>FontFamily1</mer:FontFamily>
<mer:FontSize>Medium</mer:FontSize>
<mer:LogoUrl>https://somesite/images/DurangoPet2.PNG</mer:LogoUrl>
<mer:PageTitle>Test SoapUI</mer:PageTitle>
<mer:SecurityLogo>On</mer:SecurityLogo>
</mer:request>
</mer:InitializePayment>
</soapenv:Body>
</soapenv:Envelope>
and here is a sample url i need to send to
https://someplace.net/tws/TransactionService.asmx?wsdl
Maybe i am confused because i assumed that making an api call would be like this
https://someplace.net/tws/TransactionService.asmx?wsdl?MerchantID=67779987&XXXXXXXXXXXXXXXX
Maybe someone can clear this up for me
array(6) {
[0]=> string(74) "InitializePaymentResponse InitializePayment(InitializePayment $parameters)"
[1]=> string(62) "VerifyPaymentResponse VerifyPayment(VerifyPayment $parameters)"
[2]=> string(77) "AcknowledgePaymentResponse AcknowledgePayment(AcknowledgePayment $parameters)"
[3]=> string(74) "InitializePaymentResponse InitializePayment(InitializePayment $parameters)"
[4]=> string(62) "VerifyPaymentResponse VerifyPayment(VerifyPayment $parameters)"
[5]=> string(77) "AcknowledgePaymentResponse AcknowledgePayment(AcknowledgePayment $parameters)" }
Upvotes: 1
Views: 129
Reputation: 1416
You need to use SOAP (in this instance) http://www.php.net/manual/en/soapclient.dorequest.php to use wsdl services ( http://en.wikipedia.org/wiki/Web_Services_Description_Language )
as for second part
Usually your SOAP headers woudl have authentication as indicated in you sampel XML (request)
<mer:MerchantID>67779987</mer:MerchantID>
<mer:Password>XXXXXXXXXXXXXXXX</mer:Password>
Upvotes: 1