[ic] Updates to Linkpoint.pm
Jon Jensen
jon at endpoint.com
Fri Aug 28 15:24:55 UTC 2009
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
--
Jon Jensen
End Point Corporation
http://www.endpoint.com/
More information about the interchange-users
mailing list