[ic] handling xml post data
Lyn St George
lyn at zolotek.net
Thu Aug 11 15:51:28 UTC 2011
On Thursday 11 August 2011 14:56:53 Dan Bergan wrote:
> I am looking into a hosted payment form (to get my site out of PCI
> scope), and it uses an xml POST to return data to my site. It is a
> POST (not PUT), but there are no name-value pairs -- just the XML
> data. The content type is text/xml. It actually sounds just like
> this old post:
>
> http://www.icdevgroup.org/pipermail/interchange-users/2002-September/026209
> .html
>
> Mike responded that it wasn't possible, but that was from back in the
> IC 4.8 and 4.9 days, so is there a way to handle this type of data
> with IC?
>
> Thanks -
> Dan
You wouldn't handle it directly with IC, but there are several payment systems
that work like this, ie you go to some PSP's site and then wait for them to
respond with something. Googlecheckout is one example - they send XML back at
arbitrary times after the customer has paid (a number of posts with intervals
of several minutes usually) and so the GCO module treats these as totally
separate POSTs and handles them accordingly. You could just poach that section
of code from the GCO module (ie, the 'callback') and use that as the basis of
your code to be invoked upon your PSP returning his XML to you. Or use the
whole thing as the basis of a payment module to send customers over first and
then handle the response. Worldpay, Paypal and Moneybookers don't use XML but
otherwise follow a similar principle.
--
Lyn St George
More information about the interchange-users
mailing list