-# vim:set syntax=perl:
+# vim:set syntax=perl encoding=utf-8:
-use Test::More tests => 4 + 2;
+use Test::More tests => 4 + 3;
BEGIN { use_ok('Business::OnlinePayment') };
BEGIN { use_ok('Business::OnlinePayment::InternetSecure') };
action => 'Normal Authorization',
type => 'Visa',
- card_number => '0000000000000000',
- exp_date => '2004-07',
+ card_number => '4111 1111 1111 1111',
+ expiration => '2004-07',
cvv2 => '000',
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",
email => 'fbriere@fbriere.net',
amount => undef,
- currency => 'CAD',
- taxes => 'GST PST',
+ currency => 'USD',
+ taxes => 'HST',
description => [
{
{
amount => 5.65,
description => 'Shipping',
+ taxes => 'GST PST',
},
{
amount => 10.00,
description => 'Some HST example',
- taxes => 'HST',
+ taxes => [ 'GST', 'PST' ],
},
],
},
action => 'Normal Authorization',
- type => 'Visa',
- card_number => '4000000000000000',
- exp_date => '7/2004',
+ card_number => '5111-1111-1111-1111',
+ expiration => '7/2004',
- name => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
+ name => "\x{201c}Fr\x{e9}d\x{e9}ric Bri\x{e8}re\x{201d}",
amount => 12.95,
- currency => 'USD',
- taxes => '',
description => "Box o' goodies",
+ currency => 'USD',
+ taxes => 'GST',
+ },
+ {
+ _test => -1,
+
+ action => 'Normal Authorization',
+
+ card_number => '5111-1111-1111-1111',
+ expiration => '0704',
+
+ name => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
+
+ amount => 13.95,
},
);
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<TranxRequest>
<MerchantNumber>0000</MerchantNumber>
- <xxxCard_Number>0000000000000000</xxxCard_Number>
+ <xxxCard_Number>4111111111111111</xxxCard_Number>
<xxxCCMonth>07</xxxCCMonth>
<xxxCCYear>2004</xxxCCYear>
<CVV2>1</CVV2>
<CVV2Indicator>000</CVV2Indicator>
- <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>
+ <Products>9.99::5::a 001::Some product::{USD}{HST}|5.65::1::::Shipping::{USD}{GST}{PST}|10.00::1::::Some HST example::{USD}{GST}{PST}</Products>
<xxxName>Frédéric Brière</xxxName>
<xxxCompany></xxxCompany>
<xxxAddress>123 Street</xxxAddress>
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<TranxRequest>
<MerchantNumber>0000</MerchantNumber>
- <xxxCard_Number>4000000000000000</xxxCard_Number>
+ <xxxCard_Number>5111111111111111</xxxCard_Number>
+ <xxxCCMonth>07</xxxCCMonth>
+ <xxxCCYear>2004</xxxCCYear>
+ <CVV2>0</CVV2>
+ <CVV2Indicator></CVV2Indicator>
+ <Products>12.95::1::::Box o' goodies::{USD}{GST}{TEST}</Products>
+ <xxxName>?Frédéric Brière?</xxxName>
+ <xxxCompany></xxxCompany>
+ <xxxAddress></xxxAddress>
+ <xxxCity></xxxCity>
+ <xxxProvince></xxxProvince>
+ <xxxPostal></xxxPostal>
+ <xxxCountry></xxxCountry>
+ <xxxPhone></xxxPhone>
+ <xxxEmail></xxxEmail>
+ <xxxShippingName></xxxShippingName>
+ <xxxShippingCompany></xxxShippingCompany>
+ <xxxShippingAddress></xxxShippingAddress>
+ <xxxShippingCity></xxxShippingCity>
+ <xxxShippingProvince></xxxShippingProvince>
+ <xxxShippingPostal></xxxShippingPostal>
+ <xxxShippingCountry></xxxShippingCountry>
+ <xxxShippingPhone></xxxShippingPhone>
+ <xxxShippingEmail></xxxShippingEmail>
+</TranxRequest>
+
+<?xml version="1.0" encoding="utf-8" standalone="yes"?>
+<TranxRequest>
+ <MerchantNumber>0000</MerchantNumber>
+ <xxxCard_Number>5111111111111111</xxxCard_Number>
<xxxCCMonth>07</xxxCCMonth>
<xxxCCYear>2004</xxxCCYear>
<CVV2>0</CVV2>
<CVV2Indicator></CVV2Indicator>
- <Products>12.95::1::::Box o' goodies::{USD}{TEST}</Products>
+ <Products>13.95::1::::::{CAD}{TESTD}</Products>
<xxxName>Frédéric Brière</xxxName>
<xxxCompany></xxxCompany>
<xxxAddress></xxxAddress>