3 use Test::More tests => 4 + 2;
5 BEGIN { use_ok('Business::OnlinePayment') };
6 BEGIN { use_ok('Business::OnlinePayment::InternetSecure') };
7 BEGIN { use_ok('XML::Simple', qw(xml_in)) };
8 BEGIN { use_ok('Encode') };
10 use charnames ':full'; # Why doesn't this work with use_ok?
12 use constant TRANSACTIONS => (
16 action => 'Normal Authorization',
19 card_number => '4111 1111 1111 1111',
20 exp_date => '2004-07',
23 name => "Fr\N{LATIN SMALL LETTER E WITH ACUTE}d\N{LATIN SMALL LETTER E WITH ACUTE}ric Bri\N{LATIN SMALL LETTER E WITH GRAVE}re",
25 address => '123 Street',
30 phone => '(555) 555-1212',
31 email => 'fbriere@fbriere.net',
42 description => 'Some product',
46 description => 'Shipping',
50 description => 'Some HST example',
58 action => 'Normal Authorization',
60 card_number => '5111-1111-1111-1111',
63 name => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
70 my $txn = new Business::OnlinePayment 'InternetSecure', merchant_id => '0000';
72 foreach (TRANSACTIONS) {
73 $txn->test_transaction(delete $_->{_test});
77 # Work around bug #17687
90 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
92 <MerchantNumber>0000</MerchantNumber>
93 <xxxCard_Number>4111111111111111</xxxCard_Number>
94 <xxxCCMonth>07</xxxCCMonth>
95 <xxxCCYear>2004</xxxCCYear>
97 <CVV2Indicator>000</CVV2Indicator>
98 <Products>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}</Products>
99 <xxxName>Frédéric Brière</xxxName>
100 <xxxCompany></xxxCompany>
101 <xxxAddress>123 Street</xxxAddress>
102 <xxxCity>Metropolis</xxxCity>
103 <xxxProvince>ZZ</xxxProvince>
104 <xxxPostal>A1A 1A1</xxxPostal>
105 <xxxCountry>CA</xxxCountry>
106 <xxxPhone>(555) 555-1212</xxxPhone>
107 <xxxEmail>fbriere@fbriere.net</xxxEmail>
108 <xxxShippingName></xxxShippingName>
109 <xxxShippingCompany></xxxShippingCompany>
110 <xxxShippingAddress></xxxShippingAddress>
111 <xxxShippingCity></xxxShippingCity>
112 <xxxShippingProvince></xxxShippingProvince>
113 <xxxShippingPostal></xxxShippingPostal>
114 <xxxShippingCountry></xxxShippingCountry>
115 <xxxShippingPhone></xxxShippingPhone>
116 <xxxShippingEmail></xxxShippingEmail>
119 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
121 <MerchantNumber>0000</MerchantNumber>
122 <xxxCard_Number>5111111111111111</xxxCard_Number>
123 <xxxCCMonth>07</xxxCCMonth>
124 <xxxCCYear>2004</xxxCCYear>
126 <CVV2Indicator></CVV2Indicator>
127 <Products>12.95::1::::::{CAD}{TEST}</Products>
128 <xxxName>Frédéric Brière</xxxName>
129 <xxxCompany></xxxCompany>
130 <xxxAddress></xxxAddress>
132 <xxxProvince></xxxProvince>
133 <xxxPostal></xxxPostal>
134 <xxxCountry></xxxCountry>
135 <xxxPhone></xxxPhone>
136 <xxxEmail></xxxEmail>
137 <xxxShippingName></xxxShippingName>
138 <xxxShippingCompany></xxxShippingCompany>
139 <xxxShippingAddress></xxxShippingAddress>
140 <xxxShippingCity></xxxShippingCity>
141 <xxxShippingProvince></xxxShippingProvince>
142 <xxxShippingPostal></xxxShippingPostal>
143 <xxxShippingCountry></xxxShippingCountry>
144 <xxxShippingPhone></xxxShippingPhone>
145 <xxxShippingEmail></xxxShippingEmail>