1 # vim:set syntax=perl encoding=utf-8:
3 # Check for backwards-compatible support for exp_date
5 use Test::More tests => 2 + 1;
7 BEGIN { use_ok('Business::OnlinePayment') };
8 BEGIN { use_ok('XML::Simple', qw(xml_in)) };
10 my $txn = new Business::OnlinePayment 'InternetSecure', merchant_id => '0000';
13 action => 'Normal Authorization',
15 card_number => '5111-1111-1111-1111',
21 is_deeply( xml_in($txn->to_xml), xml_in(<<__EOF__) );
22 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
24 <MerchantNumber>0000</MerchantNumber>
25 <xxxCard_Number>5111111111111111</xxxCard_Number>
26 <xxxCCMonth>07</xxxCCMonth>
27 <xxxCCYear>2004</xxxCCYear>
29 <CVV2Indicator></CVV2Indicator>
30 <Products>13.95::1::::::{CAD}</Products>
32 <xxxCompany></xxxCompany>
33 <xxxAddress></xxxAddress>
35 <xxxProvince></xxxProvince>
36 <xxxPostal></xxxPostal>
37 <xxxCountry></xxxCountry>
40 <xxxShippingName></xxxShippingName>
41 <xxxShippingCompany></xxxShippingCompany>
42 <xxxShippingAddress></xxxShippingAddress>
43 <xxxShippingCity></xxxShippingCity>
44 <xxxShippingProvince></xxxShippingProvince>
45 <xxxShippingPostal></xxxShippingPostal>
46 <xxxShippingCountry></xxxShippingCountry>
47 <xxxShippingPhone></xxxShippingPhone>
48 <xxxShippingEmail></xxxShippingEmail>