Business::CreditCard::Object - a Credit Card object
my $card = Business::CreditCard::Object->new("4929-4929-4929-4929"); if ($card->is_valid) { print "Card " . $card->number . " is a " . $card->type; }
This provides an OO interface around the Business::CreditCard module. You instantiate it with a card number, and can ask if it is valid, for a standardised version of the card number, and what type of card it is.
my $card = Business::CreditCard::Object->new("4929-4929-4929-4929");
Construct a new Card object. The card number can contain optional numbers and/or spaces.
This computes the checksum for the card given and returns a boolean value for whether or not the number passes this check.
This returns the type of card given. See Business::CreditCard for a list of possible values.
This returns a standardised version of the card number as a string of digits with all spaces and minus signs removed. The object will also stringify to this value.
Tony Bowden
Please direct all correspondence regarding this module to: bug-Business-CreditCard-Object@rt.cpan.org
Business::CreditCard
Copyright (C) 2004-2005 Tony Bowden. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
To install Business::CreditCard::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::CreditCard::Object
CPAN shell
perl -MCPAN -e shell install Business::CreditCard::Object
For more information on module installation, please visit the detailed CPAN module installation guide.