6 plan skip_all => 'MERCHANT_ID environment variable not set'
7 unless defined $ENV{MERCHANT_ID};
10 BEGIN { plan tests => 1 + 2 };
12 BEGIN { use_ok('Business::OnlinePayment') };
15 my $txn = new Business::OnlinePayment 'InternetSecure',
16 merchant_id => $ENV{MERCHANT_ID};
18 $txn->test_transaction(1);
21 action => 'Normal Authorization',
24 card_number => '0000000000000000',
25 expiration => '2004/07',
27 name => "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
28 address => '123 Nowhere',
33 phone => '123-456-7890',
34 email => 'fbriere@fbriere.net',
37 description => 'Test transaction',
42 is($txn->result_code, '2000', 'Result code is ok');
43 is($txn->cardholder, "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
44 'Cardholder name is encoded properly');