From f30cb431188e85c2b03dd16a3f9b3cc8c901d2ed Mon Sep 17 00:00:00 2001 From: fbriere Date: Sat, 18 Feb 2006 03:59:45 +0000 Subject: Allow taxes to be an array reference --- t/20emit.t | 57 +++++++++++++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 51 insertions(+), 6 deletions(-) (limited to 't/20emit.t') diff --git a/t/20emit.t b/t/20emit.t index 1f24ea1..2fca9bd 100755 --- a/t/20emit.t +++ b/t/20emit.t @@ -1,6 +1,6 @@ -# vim:set syntax=perl: +# vim:set syntax=perl encoding=utf-8: -use Test::More tests => 4 + 2; +use Test::More tests => 4 + 3; BEGIN { use_ok('Business::OnlinePayment') }; BEGIN { use_ok('Business::OnlinePayment::InternetSecure') }; @@ -32,7 +32,7 @@ use constant TRANSACTIONS => ( amount => undef, currency => 'USD', - taxes => 'GST PST', + taxes => 'HST', description => [ { @@ -44,11 +44,12 @@ use constant TRANSACTIONS => ( { amount => 5.65, description => 'Shipping', + taxes => 'GST PST', }, { amount => 10.00, description => 'Some HST example', - taxes => 'HST', + taxes => [ 'GST', 'PST' ], }, ], }, @@ -63,6 +64,21 @@ use constant TRANSACTIONS => ( name => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re", amount => 12.95, + description => "Box o' goodies", + currency => 'USD', + taxes => 'GST', + }, + { + _test => -1, + + action => 'Normal Authorization', + + card_number => '5111-1111-1111-1111', + exp_date => '0704', + + name => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re", + + amount => 13.95, }, ); @@ -95,7 +111,7 @@ __DATA__ 2004 1 000 - 9.99::5::a 001::Some product::{USD}{GST}{PST}|5.65::1::::Shipping::{USD}{GST}{PST}|10.00::1::::Some HST example::{USD}{HST} + 9.99::5::a 001::Some product::{USD}{HST}|5.65::1::::Shipping::{USD}{GST}{PST}|10.00::1::::Some HST example::{USD}{GST}{PST} Frédéric Brière 123 Street @@ -124,7 +140,36 @@ __DATA__ 2004 0 - 12.95::1::::::{CAD}{TEST} + 12.95::1::::Box o' goodies::{USD}{GST}{TEST} + Frédéric Brière + + + + + + + + + + + + + + + + + + + + + + 0000 + 5111111111111111 + 07 + 2004 + 0 + + 13.95::1::::::{CAD}{TESTD} Frédéric Brière -- cgit v1.2.1