4 plan skip_all => 'MERCHANT_ID environment variable not set'
5 unless defined $ENV{MERCHANT_ID};
8 BEGIN { plan tests => 1 + 2 };
10 BEGIN { use_ok('Business::OnlinePayment') };
13 my $txn = new Business::OnlinePayment 'InternetSecure',
14 merchant_id => $ENV{MERCHANT_ID};
16 $txn->test_transaction(1);
19 action => 'Normal Authorization',
22 card_number => '0000000000000000',
23 exp_date => '2007/07',
25 name => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
26 address => '123 Nowhere',
31 phone => '123-456-7890',
32 email => 'fbriere@fbriere.net',
35 description => [ { amount => 19.99, sku => '123',
36 description => 'Something' } ],
41 is($txn->result_code, '2000', 'Result code is ok');
42 is($txn->cardholder, "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
43 'Cardholder name is encoded properly');