[bop-devel] Patch for BOP::AuthorizeNet CPAN bug #15210

Josh Rosenbaum josh at infogears.com
Wed Nov 11 12:59:51 PST 2009


Attached is a patch for BOP::AuthorizeNet version 3.20 that fixes CPAN bug #15210.

http://rt.cpan.org/Public/Bug/Display.html?id=15210

It appears this bug is 4 years old, so I'm surprised no one has sent in this simple patch yet. This is a pretty nasty bug.

Brief overview of bug:
If a double quote was included in any input we previously completely broke down, because we could not parse the return value correctly. So we'd report a failure, however, the transaction could in fact have been successful!

Fix Method:
As suggested by Ivan, this fix checks for the encapsulating character in our input. If it exists, we try and grab another encapsulating character. We have a bunch of various character options, but start with the ones given by AuthorizeNet in their example of x_encap_char here:

http://developer.authorize.net/guides/AIM/Transaction_Response/Transaction_Response.htm

If we are unable to get a usable encapsulating character we fail out gracefully, without ever having hit the Authorize.Net servers.

Cheers,

-- Josh
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: patch_15210.diff
URL: <http://420.am/pipermail/bop-devel/attachments/20091111/80d629f3/attachment.asc>


More information about the bop-devel mailing list