1 use Test::More tests => 4 + 2;
3 BEGIN { use_ok('Business::OnlinePayment') };
4 BEGIN { use_ok('Business::OnlinePayment::InternetSecure') };
5 BEGIN { use_ok('XML::Simple', qw(xml_in)) };
6 BEGIN { use_ok('Encode') };
8 use charnames ':full'; # Why doesn't this work with use_ok?
10 use constant TRANSACTIONS => (
14 action => 'Normal Authorization',
17 card_number => '0000000000000000',
18 exp_date => '2004-07',
21 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",
23 address => '123 Street',
28 phone => '(555) 555-1212',
29 email => 'fbriere@fbriere.net',
40 description => 'Some product',
44 description => 'Shipping',
48 description => 'Some HST example',
56 action => 'Normal Authorization',
59 card_number => '4000000000000000',
62 name => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
67 description => "Box o' goodies",
72 my $txn = new Business::OnlinePayment 'InternetSecure', merchant_id => '0000';
74 foreach (TRANSACTIONS) {
75 $txn->test_transaction(delete $_->{_test});
79 # Work around bug #17687
92 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
94 <MerchantNumber>0000</MerchantNumber>
95 <xxxCard_Number>0000000000000000</xxxCard_Number>
96 <xxxCCMonth>07</xxxCCMonth>
97 <xxxCCYear>2004</xxxCCYear>
99 <CVV2Indicator>000</CVV2Indicator>
100 <Products>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}</Products>
101 <xxxName>Frédéric Brière</xxxName>
102 <xxxCompany></xxxCompany>
103 <xxxAddress>123 Street</xxxAddress>
104 <xxxCity>Metropolis</xxxCity>
105 <xxxProvince>ZZ</xxxProvince>
106 <xxxPostal>A1A 1A1</xxxPostal>
107 <xxxCountry>CA</xxxCountry>
108 <xxxPhone>(555) 555-1212</xxxPhone>
109 <xxxEmail>fbriere@fbriere.net</xxxEmail>
110 <xxxShippingName></xxxShippingName>
111 <xxxShippingCompany></xxxShippingCompany>
112 <xxxShippingAddress></xxxShippingAddress>
113 <xxxShippingCity></xxxShippingCity>
114 <xxxShippingProvince></xxxShippingProvince>
115 <xxxShippingPostal></xxxShippingPostal>
116 <xxxShippingCountry></xxxShippingCountry>
117 <xxxShippingPhone></xxxShippingPhone>
118 <xxxShippingEmail></xxxShippingEmail>
121 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
123 <MerchantNumber>0000</MerchantNumber>
124 <xxxCard_Number>4000000000000000</xxxCard_Number>
125 <xxxCCMonth>07</xxxCCMonth>
126 <xxxCCYear>2004</xxxCCYear>
128 <CVV2Indicator></CVV2Indicator>
129 <Products>12.95::1::::Box o' goodies::{USD}{TEST}</Products>
130 <xxxName>Frédéric Brière</xxxName>
131 <xxxCompany></xxxCompany>
132 <xxxAddress></xxxAddress>
134 <xxxProvince></xxxProvince>
135 <xxxPostal></xxxPostal>
136 <xxxCountry></xxxCountry>
137 <xxxPhone></xxxPhone>
138 <xxxEmail></xxxEmail>
139 <xxxShippingName></xxxShippingName>
140 <xxxShippingCompany></xxxShippingCompany>
141 <xxxShippingAddress></xxxShippingAddress>
142 <xxxShippingCity></xxxShippingCity>
143 <xxxShippingProvince></xxxShippingProvince>
144 <xxxShippingPostal></xxxShippingPostal>
145 <xxxShippingCountry></xxxShippingCountry>
146 <xxxShippingPhone></xxxShippingPhone>
147 <xxxShippingEmail></xxxShippingEmail>