## This is a custom check routine to replace &credit_card=standard
## Just to test things, I guess.

GlobalSub <<EOR
sub test_card {
	my ($ref, $nothing, $opt) = @_;
::logDebug("called test_card, opt=" . ::uneval($opt));
	my @return = (
				'',			# 0- Whether it is valid
				'No.',			# 1- Encrypted credit card information
				'09',			# 2- Month
				'09',			# 3- Year
				'09/09',			# 4- Month/year
				'test',         # 5- type
				'41*1111',         # 6- Reference number in form 41**1111
	);

	my $num = $ref->{mv_credit_card_number};
	$num =~ s/\D+//g;

	my %testnum = qw/
						4111111111111111 1
						5959595959595959 1
					/;
	$return[0] = $testnum{$num}
		or push @return, 'Test mode -- Not a test card.';
::logDebug("finished test_card, return=" . ::uneval(\@return));
	return @return;
}
EOR

UserTag show_global_subs Routine sub { ::uneval($Global::GlobalSub) }


