use 5.006;
use strict;
use warnings;
-our $VERSION = '0.01';
+our $VERSION = '0.02';
=head1 NAME
'business savings' => 'X',
);
+my %paymentech_countries = map { $_ => 1 } qw( US CA GB UK );
+
sub default_transport {
my $self = shift;
Business::BatchPayment::Paymentech::Transport->new(
die "payment type ".$item->type." not supported";
}
push @order, (
- avsZip => $item->zip,
- avsAddress1 => substr($item->address, 0, 30),
- avsAddress2 => substr($item->address2, 0, 30),
- avsCity => substr($item->city, 0, 20),
- avsState => $item->state,
- avsName => substr($item->first_name .' '. $item->last_name, 0, 30),
- avsCountryCode => $item->country,
- orderID => $item->tid,
- amount => int( $item->amount * 100 ),
+ avsZip => $item->zip,
+ avsAddress1 => substr($item->address, 0, 30),
+ avsAddress2 => substr($item->address2, 0, 30),
+ avsCity => substr($item->city, 0, 20),
+ avsState => $item->state,
+ avsName => substr($item->first_name .' '. $item->last_name, 0, 30),
+ avsCountryCode => ( $paymentech_countries{ $item->country }
+ ? $_->country
+ : ''
+ ),
+ orderID => $item->tid,
+ amount => int( $item->amount * 100 ),
);
while (@order) {
my $key = shift @order;