Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Interchange: users

Updates to Linkpoint.pm

 

 

Interchange users RSS feed   Index | Next | Previous | View Threaded


josh-ic at att

Aug 28, 2009, 5:46 AM

Post #1 of 4 (988 views)
Permalink
Updates to Linkpoint.pm

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

--
Josh Lavin
Perusion -- Expert Interchange Consulting http://www.perusion.com/


_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


jon at endpoint

Aug 28, 2009, 8:24 AM

Post #2 of 4 (928 views)
Permalink
Re: Updates to Linkpoint.pm [In reply to]

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/

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


josh-ic at att

Aug 28, 2009, 12:25 PM

Post #3 of 4 (909 views)
Permalink
Re: Updates to Linkpoint.pm [In reply to]

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/


_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users


jon at endpoint

Aug 29, 2009, 9:39 AM

Post #4 of 4 (893 views)
Permalink
Re: Updates to Linkpoint.pm [In reply to]

On Fri, 28 Aug 2009, Josh Lavin wrote:

> 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...)

Thanks, Josh. This is now committed. When you've got a few changes that
partly reverse each other, there's a nice Git option you can use to
combine multiple commits into a single one during a merge:

git merge --squash

That's what I did here.

Jon

--
Jon Jensen
End Point Corporation
http://www.endpoint.com/

_______________________________________________
interchange-users mailing list
interchange-users [at] icdevgroup
http://www.icdevgroup.org/mailman/listinfo/interchange-users

Interchange users RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.