From aeefaf19907da445544d0eadc9c0e0e62f7b3d5d Mon Sep 17 00:00:00 2001 From: fbriere Date: Thu, 16 Feb 2006 23:44:35 +0000 Subject: [PATCH] Remove prod_string() taxes argument --- InternetSecure.pm | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/InternetSecure.pm b/InternetSecure.pm index c70b79f..65a9112 100755 --- a/InternetSecure.pm +++ b/InternetSecure.pm @@ -108,14 +108,13 @@ sub parse_expdate { # Convert a single product into a product string # sub prod_string { - my ($self, $currency, $taxes, %data) = @_; + my ($self, $currency, %data) = @_; croak "Missing amount in product" unless defined $data{amount}; my @flags = ($currency); - $taxes = uc $data{taxes} if defined $data{taxes}; - foreach (split ' ' => $taxes) { + foreach (split ' ' => uc($data{taxes} || '')) { croak "Unknown tax code $_" unless /^(GST|PST|HST)$/; push @flags, $_; } @@ -200,16 +199,16 @@ sub to_xml { if (ref $content{description}) { $data{Products} = join '|' => map $self->prod_string( - $content{currency}, - $content{taxes}, - %$_), - @{ $content{description} }; + $content{currency}, + taxes => $content{taxes}, + %$_), + @{ $content{description} }; } else { $self->required_fields(qw(amount)); $data{Products} = $self->prod_string( $content{currency}, - $content{taxes}, - amount => $content{amount}, + taxes => $content{taxes}, + amount => $content{amount}, description => $content{description}, ); } -- 2.11.0