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',
61 card_number => '5111-1111-1111-1111',
64 name => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
69 description => "Box o' goodies",
74 my $txn = new Business::OnlinePayment 'InternetSecure', merchant_id => '0000';
76 foreach (TRANSACTIONS) {
77 $txn->test_transaction(delete $_->{_test});
81 # Work around bug #17687
94 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
96 <MerchantNumber>0000</MerchantNumber>
97 <xxxCard_Number>4111111111111111</xxxCard_Number>
98 <xxxCCMonth>07</xxxCCMonth>
99 <xxxCCYear>2004</xxxCCYear>
101 <CVV2Indicator>000</CVV2Indicator>
102 <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>
103 <xxxName>Frédéric Brière</xxxName>
104 <xxxCompany></xxxCompany>
105 <xxxAddress>123 Street</xxxAddress>
106 <xxxCity>Metropolis</xxxCity>
107 <xxxProvince>ZZ</xxxProvince>
108 <xxxPostal>A1A 1A1</xxxPostal>
109 <xxxCountry>CA</xxxCountry>
110 <xxxPhone>(555) 555-1212</xxxPhone>
111 <xxxEmail>fbriere@fbriere.net</xxxEmail>
112 <xxxShippingName></xxxShippingName>
113 <xxxShippingCompany></xxxShippingCompany>
114 <xxxShippingAddress></xxxShippingAddress>
115 <xxxShippingCity></xxxShippingCity>
116 <xxxShippingProvince></xxxShippingProvince>
117 <xxxShippingPostal></xxxShippingPostal>
118 <xxxShippingCountry></xxxShippingCountry>
119 <xxxShippingPhone></xxxShippingPhone>
120 <xxxShippingEmail></xxxShippingEmail>
123 <?xml version="1.0" encoding="utf-8" standalone="yes"?>
125 <MerchantNumber>0000</MerchantNumber>
126 <xxxCard_Number>5111111111111111</xxxCard_Number>
127 <xxxCCMonth>07</xxxCCMonth>
128 <xxxCCYear>2004</xxxCCYear>
130 <CVV2Indicator></CVV2Indicator>
131 <Products>12.95::1::::Box o' goodies::{USD}{TEST}</Products>
132 <xxxName>Frédéric Brière</xxxName>
133 <xxxCompany></xxxCompany>
134 <xxxAddress></xxxAddress>
136 <xxxProvince></xxxProvince>
137 <xxxPostal></xxxPostal>
138 <xxxCountry></xxxCountry>
139 <xxxPhone></xxxPhone>
140 <xxxEmail></xxxEmail>
141 <xxxShippingName></xxxShippingName>
142 <xxxShippingCompany></xxxShippingCompany>
143 <xxxShippingAddress></xxxShippingAddress>
144 <xxxShippingCity></xxxShippingCity>
145 <xxxShippingProvince></xxxShippingProvince>
146 <xxxShippingPostal></xxxShippingPostal>
147 <xxxShippingCountry></xxxShippingCountry>
148 <xxxShippingPhone></xxxShippingPhone>
149 <xxxShippingEmail></xxxShippingEmail>