Newsgroups : Borland : borland.public.delphi.internet.winsock : 2008 Apr : idHTTP post and XML to payment gateway server

www.cryer.info
Managed Newsgroup Archive

idHTTP post and XML to payment gateway server

Subject:idHTTP post and XML to payment gateway server
Posted by:"mark horrocks" (markhorroc..@yahoo.com)
Date:Sun, 20 Apr 2008 16:55:51

I am writing an ISAPI dll which needs to post xml form data to a payment
gateway server and parse the response and am somewhat confused as to the
best way to create and send the XML packet using Indy 10. (idHTTP).

Can someone please point me in the correct direction? I want to create the
following XML packet and send it then parse the response XML as below. How
best to parse the XML response?

<ewaygateway>
  <ewayCustomerID> 12345678 </ewayCustomerID>
  <ewayTotalAmount> 10 </ewayTotalAmount>
  <ewayCustomerFirstName> Jackie </ewayCustomerFirstName>
  <ewayCustomerLastName> Chan </ewayCustomerLastName>
  <ewayCustomerEmail> chan@webactive.com.au </ewayCustomerEmail>
  <ewayCustomerAddress> 123 Sesame St </ewayCustomerAddress>
  <ewayCustomerPostcode> 2345 </ewayCustomerPostcode>
  <ewayCustomerInvoiceDescription> Red socks
</ewayCustomerInvoiceDescription>
  <ewayCustomerInvoiceRef> 0123 - abc </ewayCustomerInvoiceRef>
  <ewayCardHoldersName> Jackie Chan </ewayCardHoldersName>
  <ewayCardNumber> 424212132325454 </ewayCardNumber>
  <ewayCardExpiryMonth> 04 </ewayCardExpiryMonth>
  <ewayCardExpiryYear> 09 </ewayCardExpiryYear>
  <ewayTrxnNumber> 987654321 </ewayTrxnNumber>
  <ewayOption1></ewayOption1>
  <ewayOption2></ewayOption2>
  <ewayOption3></ewayOption3>
</ewaygateway>
the response XML

<ewayResponse>
  <ewayTrxnError></ewayTrxnError>
  <ewayTrxnStatus> True </ewayTrxnStatus>
  <ewayTrxnNumber> 10002 </ewayTrxnNumber>
  <ewayTrxnOption1></ewayTrxnOption1>
  <ewayTrxnOption2></ewayTrxnOption2>
  <ewayTrxnOption3></ewayTrxnOption3>
  <ewayReturnAmount> 10 </ewayReturnAmount>
  <ewayAuthCode> 123456 </ewayAuthCode>
  <ewayTrxnReference> 987654321 </ewayTrxnReference>
</ewayResponse>
Mark Horrocks

Replies:

www.cryer.info
Managed Newsgroup Archive