diff options
author | mark <mark> | 2010-06-15 19:43:31 +0000 |
---|---|---|
committer | mark <mark> | 2010-06-15 19:43:31 +0000 |
commit | e74f5f0a651caeff48076605e220e3600118ae47 (patch) | |
tree | 2c239d1b0b43a37a339bb042a56d5648bde11ab8 /NMI.pm | |
parent | d1b9ecf606c0fd6a6b37a22e366c9ad8dbadc724 (diff) |
Cleanup for public release
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); } |