[ic] handling xml post data

Mark Lipscombe markl at gasupnow.com
Thu Aug 11 14:18:42 UTC 2011

On 8/11/2011 10:56 AM, 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?

It's actually pretty easy to fix.  Try the attached patch, it stops IC 
trying to parse form data from content types which are not form data.

You can get at the entire POST body using something like this in your 
payment module:

    my $entity = ::http()->{entity};
    my $xml = $$entity;

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: xml-post.patch
URL: <http://www.icdevgroup.org/pipermail/interchange-users/attachments/20110811/727d8587/attachment.ksh>

More information about the interchange-users mailing list