X-Git-Url: http://git.freeside.biz/gitweb/?p=Business-OnlinePayment-InternetSecure.git;a=blobdiff_plain;f=t%2Fexp_date.t;fp=t%2Fexp_date.t;h=1c52314521ee9b0217f03c5e088ebabc5a5b0477;hp=0000000000000000000000000000000000000000;hb=e97a2d3512479f30718872b70196a2be18ec2b2e;hpb=980d429a92740e97ca84e1fa9fb951284160c820 diff --git a/t/exp_date.t b/t/exp_date.t new file mode 100755 index 0000000..1c52314 --- /dev/null +++ b/t/exp_date.t @@ -0,0 +1,52 @@ +# vim:set syntax=perl encoding=utf-8: + +# Check for backwards-compatible support for exp_date + +use Test::More tests => 2 + 1; + +BEGIN { use_ok('Business::OnlinePayment') }; +BEGIN { use_ok('XML::Simple', qw(xml_in)) }; + +my $txn = new Business::OnlinePayment 'InternetSecure', merchant_id => '0000'; + +$txn->content( + action => 'Normal Authorization', + + card_number => '5111-1111-1111-1111', + exp_date => '0704', + + amount => 13.95, + ); + +is_deeply( xml_in($txn->to_xml), xml_in(<<__EOF__) ); + + + 0000 + 5111111111111111 + 07 + 2004 + 0 + + 13.95::1::::::{CAD} + + + + + + + + + + + + + + + + + + + + +__EOF__ +