[bop-devel] AuthorizeNet MD5 Check
Jason Hall
jayce at lug-nut.com
Fri Sep 28 12:05:45 PDT 2007
On 9/28/07, Bill Moseley <moseley at hank.org> wrote:
>
> On Thu, Sep 27, 2007 at 07:26:57AM -0700, Bill Moseley wrote:
> > Finally, if I add this validation to AuthorizeNet do you want the
> > changes? If so, is there a repo I can provide a diff against?
>
> Ok, my updated version is at:
>
> http://hank.org/modules/AuthorizeNet.pm
>
> A diff will not be very helpful as I changed quite a bit.
>
> Do what you want with it.
>
>
> Changes include:
>
> Add validate_response() method to validate the md5 as discussed
> here.
>
> Removed CSV::XS and replaced with split. The delimiter is picked
> by looking for a character that is not in any of the data being
> passed in. This was discussed off-list.
>
> Removed Exporter.
>
> Added a bit of debugging when $DEBUG is true.
>
> Defined a %processor_field_map hash so that the processor
> fields are not in the code twice. A diff of the two collections
> showed:
>
> < x_Bank_Acct_Name
> ---
> > x_Bank_Account_Name
> 13a14
> > x_Country
> 24a26
> > x_Email_Customer
> 34d35
> < x_Recurring_Billing
> 47a49
> >
>
> Added an amount() method so that the user can see what amount
> the processor, eh, processed. Also needed for md5 check.
>
> Removed remap_fields and get_fields. They are in the base class
> (v3) and were the same.
>
> refactored submit and the required fields checks.
>
>
> I left this in, but it would be nice to know in what situations
> this is needed. I assume it was added for a reason.
>
> #escape NULL (binary 0x00) values
> $page =~ s/\x00/\^0/g;
>
>
> A little code clean up in some places.
I would definately suggest doing a diff -u of the different phases so that
it can be imported back. Several of the changes would be great, but the
diff is the best way to do it (and explain them).
--
Jayce^
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://420.am/pipermail/bop-devel/attachments/20070928/9ddc50c5/attachment.htm
More information about the bop-devel
mailing list