summaryrefslogtreecommitdiff
path: root/t/40live.t
blob: 4d59f689205c8210fb67518780aa0abb1c9ff84c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
use Test::More;

BEGIN {
	plan skip_all => 'MERCHANT_ID environment variable not set'
		unless defined $ENV{MERCHANT_ID};
};

BEGIN { plan tests => 1 + 2 };

BEGIN { use_ok('Business::OnlinePayment') };


my $txn = new Business::OnlinePayment 'InternetSecure',
		merchant_id => $ENV{MERCHANT_ID};

$txn->test_transaction(1);

$txn->content(
		action		=> 'Normal Authorization',
		type		=> 'Visa',
		card_number	=> '0000000000000000',
		exp_date	=> '2004/07',
		name		=> "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
		amount		=> 0.01,
	);

$txn->submit;

is($txn->result_code, '2000', 'is result_code 2000?');
is($txn->cardholder, "Fr\x{e9}d\x{e9}ric Bri\x{e8}re",
	'is cardholder encoded properly?');