summaryrefslogtreecommitdiff
path: root/InternetSecure.pm
diff options
context:
space:
mode:
authorfbriere <fbriere>2006-02-16 23:46:45 +0000
committerfbriere <fbriere>2006-02-16 23:46:45 +0000
commit4e53412a879f819c9af5711e12dee73ba52d268f (patch)
tree27984c83644f9d15e380a16649a739a000d8ef5c /InternetSecure.pm
parentaeefaf19907da445544d0eadc9c0e0e62f7b3d5d (diff)
Simplify tax/currency initialization
Diffstat (limited to 'InternetSecure.pm')
-rwxr-xr-xInternetSecure.pm6
1 files changed, 2 insertions, 4 deletions
diff --git a/InternetSecure.pm b/InternetSecure.pm
index 65a9112..bb052b9 100755
--- a/InternetSecure.pm
+++ b/InternetSecure.pm
@@ -148,13 +148,11 @@ sub to_xml {
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)$/;
- $content{taxes} ||= '';
- $content{taxes} = uc $content{taxes};
+ $content{taxes} = uc($content{taxes} || '');
my %data = $self->get_remap_fields(qw(
xxxCard_Number card_number