use vars qw($VERSION @ISA $DEBUG);
@ISA = qw(Business::OnlinePayment::HTTPS);
-$VERSION = '0.01';
+$VERSION = '0.02';
$DEBUG = 0;
$content{'payment'} = $types{lc($content{'type'})} or die "Payment method '$content{type}' not supported.\n";
$content{'action'} = $actions{lc($content{'action'})} or die "Transaction type '$content{action}' not supported.\n";
- $content{'expiration'} =~ s/\D//g;
+ $content{'expiration'} =~ s/\D//g if defined($content{'expiration'});
$content{'account_type'} ||= 'personal checking';
@content{'account_holder_type', 'account_type'} =
map {lc} split /\s/, $content{'account_type'};
- $content{'ship_name'} = $content{'ship_first_name'}.' '.$content{'ship_last_name'};
+ $content{'ship_name'} = $content{'ship_first_name'} ?
+ ($content{'ship_first_name'}.' '.$content{'ship_last_name'}) : '';
$self->content(%content);
}