[ic] Updates to Linkpoint.pm
Josh Lavin
josh-ic at att.net
Fri Aug 28 19:25:08 UTC 2009
On Aug 28, 2009, at 10:24 AM, Jon Jensen wrote:
> On Fri, 28 Aug 2009, Josh Lavin wrote:
>
>> I made some changes to Linkpoint.pm to support CVV (requires a
>> check_sub) and orders that were partially paid for with a pay_cert.
>>
>> This is my first experience with git, but here's the commit from my
>> fork
>> of Interchange:
>>
>> http://github.com/jlavin/interchange/commit/bd343eb4a7476f270bddf4f5a8195a5e650d94a9
>
> Thanks, Josh. A few questions:
>
> Won't removing shipping, subtotal, tax, and vattax values break the
> module
> for merchants who've been counting on those being passed to
> Linkpoint? I
> would think a better way would be to have an option you can pass in to
> omit them, rather than pull them out completely.
>
> It looks to me like your change to the error message setting has a
> typo in
> the hash key that will make it not work:
>
> $result{MErrMsg} = $result{'pop.error-messgae'} = $msg;
>
> s/messgae/message/, right?
>
> Minor note: It's more efficient when matching single characters to
> use a
> character class rather than alternation. Instead of this:
>
> return 1 if $cvv =~ /M|P|S|U|X/
>
> ... this, and also anchoring regexes is good hygiene to protect
> against
> unexpected matches:
>
> return 1 if $cvv =~ /^[MPSUX]$/
>
> Finally, while you're in there making a change, please update the
> latest copyright year to 2009 and remove the $Id: ...$ line at the
> top,
> which isn't used since our switch to Git.
Thanks, Jon. I was able to update:
Do better regex check on CVV; fix typo in 'message'; send shipping/
salestax/subtotal normally, unless using a pay_cert for part of the
order, in which case don't send any shipping etc data, since totals
would not balance. Update copyright, remove $id.
http://github.com/jlavin/interchange/commit/1e104ad271144e7f12b854f8d03c87c1fb48b593
(Not sure how to send a diff from the real Interchange; this is just
from my earlier change...)
--
Josh Lavin
Perusion -- Expert Interchange Consulting http://www.perusion.com/
More information about the interchange-users
mailing list