Validating Credit Card is one of the most Important Factor for Online Payment Accepting Business.
Please Note: If you want to check whether Given Card is Up and Running or whether currently being used, You need to have Merchant Account, which we are not discussing below.
Copyright KroKite
Please Note: If you want to check whether Given Card is Up and Running or whether currently being used, You need to have Merchant Account, which we are not discussing below.
PHP Code:
#!/usr/bin/perl
use strict;
use warnings;
use Business::CreditCard;main(@ARGV);
sub main{
print '
M""MMMMM""M MM"""""""`MM MMP"""""YMM M""MMMMM""M M""M M""""""""M MM"""""""""M
M MMMMM .M MM mmmm M M .mmm. M M MMMM .M M M Mmmm mmmM MM mmmmmmmM
M .MM M" .M M MMMMM M M .MM M M MMMM MMMM MM MMMM
M MMMb. YM MM MMMb. "M M MMMMM M M MMMb. YM M M MMMM MMMM MM MMMMMMMM
M MMMMb M MM MMMMM M M. MMM .M M MMMMb M M M MMMM MMMM MM MMMMMMMM
M MMMMM M MM MMMMM M MMb dMM M MMMMM M M M MMMM MMMM MM .M
MMMMMMMMMMM MMMMMMMMMMMM MMMMMMMMMMM MMMMMMMMMMM MMMM MMMMMMMMMM MMMMMMMMMMMM
';
print "[+] Please Report any Bug to http://krokite.com\n";
print "[+] KroKite Copyright 2012\n";
print "[+] Read here for License - www.apache.org/licenses/LICENSE-2.0\n";
print "[+] Please Enter the 16 Digit Credit Card Number\n";
print ">>> ";
my $cardNum = <stdin>;
chomp($cardNum);
my $validity = validate($cardNum);
if($validity == "1"){
print "Valid Credit Card\n";
}else{
print "InValid Credit Card\n";
}
print "[+] Do you Also Want to Know What card Type it is (Master Card/Visa/AmEx/Others)\n";
print "[+] Type 'y' for Yes or 'n' for No :- \n";
print ">>> ";
my $ans = <stdin>;
chomp($ans);
if($ans =~ /y/ig){
print cardtype($cardNum)."\n";
}else{
print "Exiting the Program\n";
exit;
}
}
Copyright KroKite