Revision history for Business-OnlinePayment-PaymenTech
+2.05 Mon Jan 14 19:07:14 PST 2013
+ - pass AVScountryCode
+
2.04 Mon Oct 11 17:30:00 PDT 2010
- Always send expiration date as MMYY
@ISA = qw(Business::OnlinePayment::HTTPS);
-$VERSION = '2.04';
+$VERSION = '2.05';
$VERSION = eval $VERSION; # modperlstyle: convert the string into a number
$DEBUG = 0;
AVSaddress1 => [ ':address', 30 ],
AVScity => [ ':city', 20 ],
AVSstate => [ ':state', 2 ],
+ AVScountryCode => [ ':country', 2 ],
OrderID => [ ':invoice_number', 22 ],
Amount => [ ':amount', 12 ],
Comments => [ ':email', 64 ],
MXN => [484, 2],
);
+my %paymentech_countries = map { $_ => 1 } qw( US CA GB UK );
+
sub set_defaults {
my $self = shift;
$content{expiration} =~ s/\D//g;
$content{expiration} = sprintf('%04d',$content{expiration});
+ $content{country} ||= 'US';
+ $content{country} = ( $paymentech_countries{ $content{country} }
+ ? $content{country}
+ : ''
+ ),
+
$self->content(%content);
return;
}