diff options
Diffstat (limited to 't/40live.t')
-rwxr-xr-x | t/40live.t | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/t/40live.t b/t/40live.t new file mode 100755 index 0000000..4d59f68 --- /dev/null +++ b/t/40live.t @@ -0,0 +1,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?'); + |