diff options
Diffstat (limited to 'NMI.pm')
-rw-r--r-- | NMI.pm | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -9,7 +9,7 @@ use URI::Escape; use vars qw($VERSION @ISA $DEBUG); @ISA = qw(Business::OnlinePayment::HTTPS); -$VERSION = '0.01'; +$VERSION = '0.02'; $DEBUG = 0; @@ -151,12 +151,13 @@ sub map_fields { $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); } |