projects
/
Business-OnlinePayment-InternetSecure.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
aeefaf1
)
Simplify tax/currency initialization
author
fbriere
<fbriere>
Thu, 16 Feb 2006 23:46:45 +0000
(23:46 +0000)
committer
fbriere
<fbriere>
Thu, 16 Feb 2006 23:46:45 +0000
(23:46 +0000)
InternetSecure.pm
patch
|
blob
|
history
diff --git
a/InternetSecure.pm
b/InternetSecure.pm
index
65a9112
..
bb052b9
100755
(executable)
--- a/
InternetSecure.pm
+++ b/
InternetSecure.pm
@@
-148,13
+148,11
@@
sub to_xml {
croak 'Unsupported action'
unless $content{action} =~ /^Normal Authori[zs]ation$/i;
croak 'Unsupported action'
unless $content{action} =~ /^Normal Authori[zs]ation$/i;
- $content{currency} ||= 'CAD';
- $content{currency} = uc $content{currency};
+ $content{currency} = uc($content{currency} || 'CAD');
croak "Unknown currency code ", $content{currency}
unless $content{currency} =~ /^(CAD|USD)$/;
croak "Unknown currency code ", $content{currency}
unless $content{currency} =~ /^(CAD|USD)$/;
- $content{taxes} ||= '';
- $content{taxes} = uc $content{taxes};
+ $content{taxes} = uc($content{taxes} || '');
my %data = $self->get_remap_fields(qw(
xxxCard_Number card_number
my %data = $self->get_remap_fields(qw(
xxxCard_Number card_number