X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=t%2F20emit.t;h=8ba4804bc1a528d8c6728a3dfb88b0039378e29a;hb=aee9564f2cae2cd7b63aba4d52105dbf24422bae;hp=e51f5e77a3491317c946ab513dc25213d8ead7aa;hpb=a9053abd282a2c574bb03833db29b39ed5cac14b;p=Business-OnlinePayment-InternetSecure.git diff --git a/t/20emit.t b/t/20emit.t index e51f5e7..8ba4804 100755 --- a/t/20emit.t +++ b/t/20emit.t @@ -1,4 +1,6 @@ -use Test::More tests => 4 + 2; +# vim:set syntax=perl encoding=utf-8: + +use Test::More tests => 4 + 3; BEGIN { use_ok('Business::OnlinePayment') }; BEGIN { use_ok('Business::OnlinePayment::InternetSecure') }; @@ -14,7 +16,7 @@ use constant TRANSACTIONS => ( action => 'Normal Authorization', type => 'Visa', - card_number => '0000000000000000', + card_number => '4111 1111 1111 1111', exp_date => '2004-07', cvv2 => '000', @@ -29,8 +31,8 @@ use constant TRANSACTIONS => ( email => 'fbriere@fbriere.net', amount => undef, - currency => 'CAD', - taxes => 'GST PST', + currency => 'USD', + taxes => 'HST', description => [ { @@ -42,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' ], }, ], }, @@ -55,16 +58,27 @@ use constant TRANSACTIONS => ( action => 'Normal Authorization', - type => 'Visa', - card_number => '4000000000000000', + card_number => '5111-1111-1111-1111', exp_date => '7/2004', - name => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re", + name => "\x{201c}Fr\x{e9}d\x{e9}ric Bri\x{e8}re\x{201d}", amount => 12.95, - currency => 'USD', - taxes => '', 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, }, ); @@ -92,12 +106,12 @@ __DATA__ 0000 - 0000000000000000 + 4111111111111111 07 2004 1 000 - 9.99::5::a 001::Some product::{CAD}{GST}{PST}|5.65::1::::Shipping::{CAD}{GST}{PST}|10.00::1::::Some HST example::{CAD}{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 @@ -121,12 +135,41 @@ __DATA__ 0000 - 4000000000000000 + 5111111111111111 + 07 + 2004 + 0 + + 12.95::1::::Box o' goodies::{USD}{GST}{TEST} + ?Frédéric Brière? + + + + + + + + + + + + + + + + + + + + + + 0000 + 5111111111111111 07 2004 0 - 12.95::1::::Box o' goodies::{USD}{TEST} + 13.95::1::::::{CAD}{TESTD} Frédéric Brière