[ic] [interchange] add unit tests for credit cards

Josh Lavin jlavin at endpoint.com
Thu Jul 21 23:40:54 UTC 2016

Quoting Stefan Hornburg (Racke) (racke at linuxia.de):
> On 07/21/2016 12:58 AM, Josh Lavin wrote:
> > commit 46d36ed458731bb66aee904bb58320b1a2e4fba2
> > Author: Josh Lavin <jlavin at endpoint.com>
> > Date:   Wed Jul 20 15:57:43 2016 -0700
> > 
> >     add unit tests for credit cards
> > 
> >  t/credit_cards.t |   58 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 files changed, 58 insertions(+), 0 deletions(-)
> Josh, it would be also interesting if these results match up with Business::CreditCard.
> Also we might check recent changes in this module.

I'm committing a patch to add additional test credit card numbers from

I also updated the guess_cc_type() sub to more closely match
Business::CreditCard's cardtype(), for various number changes and also
support of "Isracard".

However, I am a bit leery of going overboard on the updating of the
Discover card section, which is here:


I tried to keep the changes that extended card number length, but I'm
not sure of the ones that seem to constrict it. If anyone wants to take
this over, and also review my patch, that'd be great. :-)

The tests were certainly a nice feature to have when making these

Josh Lavin
End Point Corporation

More information about the interchange-users mailing list