X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=InternetSecure.pm;h=cb6d00e17306e022f7d21860fec8b263f550c34d;hb=33cf2e33b4bbd232498303166d1852e9425cd310;hp=f3eacc892d2b5a2a9ff3d909c88ab536ae653695;hpb=f30cb431188e85c2b03dd16a3f9b3cc8c901d2ed;p=Business-OnlinePayment-InternetSecure.git

diff --git a/InternetSecure.pm b/InternetSecure.pm
index f3eacc8..cb6d00e 100755
--- a/InternetSecure.pm
+++ b/InternetSecure.pm
@@ -42,12 +42,12 @@ sub set_defaults {
 				receipt_number	sales_number	uuid	guid
 				date
 				card_type	cardholder
-				total_amount	taxes
+				total_amount	tax_amounts
 				avs_response	cvv2_response
 			));
 	
-	# Just in case someone tries to call taxes() *before* submit()
-	$self->taxes( {} );
+	# Just in case someone tries to call tax_amounts() *before* submit()
+	$self->tax_amounts( {} );
 }
 
 # OnlinePayment's get_fields now filters out undefs in 3.x. :(
@@ -231,10 +231,10 @@ sub infuse {
 	}
 }
 
-sub extract_taxes {
+sub extract_tax_amounts {
 	my ($self, $response) = @_;
 
-	my %taxes;
+	my %tax_amounts;
 
 	my $products = $response->{Products};
 	return unless $products;
@@ -245,11 +245,11 @@ sub extract_taxes {
 			grep($_ eq '{TAX}', @$flags) &&
 			grep($_ eq '{CALCULATED}', @$flags))
 		{
-			$taxes{ $node->{code} } = $node->{subtotal};
+			$tax_amounts{ $node->{code} } = $node->{subtotal};
 		}
 	}
 
-	return %taxes;
+	return %tax_amounts;
 }
 
 # Parse the server's response and set various fields
@@ -296,7 +296,7 @@ sub parse_response {
 	
 	$self->card_type(CARD_TYPES->{$self->card_type});
 	
-	$self->taxes( { $self->extract_taxes($response) } );
+	$self->tax_amounts( { $self->extract_tax_amounts($response) } );
 
 	return $self;
 }
@@ -544,10 +544,11 @@ Date and time of the transaction.  Format is C<YYYY/MM/DD hh:mm:ss>.
 
 Total amount billed for this order, including taxes.
 
-=item taxes()
+=item tax_amounts()
 
-Returns a I<reference> to a hash that maps tax names (such as C<GST>) to the
-amount that was billed for each.
+Returns a I<reference> to a hash that maps taxes, which were listed under the
+B<taxes> argument to B<submit>(), to the amount that was calculated by
+InternetSecure.
 
 =item cardholder()