BOP Cardcom, RT13058
[Business-OnlinePayment-Cardcom.git] / t / credit_card.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 use Business::OnlinePayment;
4
5 my $tx = new Business::OnlinePayment("Cardcom", terminalnumber => 1000);
6
7 $Business::OnlinePayment::Cardcom::DEBUG = 2;
8
9 $tx->content(
10     type           => 'CC',
11     login          => 'moot',
12     password       => 'moot',
13     action         => 'Normal Authorization',
14     amount         => '0.80',
15     currency       => 'CAD',
16     card_number    => '4580000000000000',
17     expiration     => '01/14',
18 );
19 $tx->test_transaction(1); # test, dont really charge
20 $tx->submit();
21
22 if($tx->is_success()) {
23     print "ok 1\n";
24 } else {
25     warn $tx->server_response."\n";
26     warn $tx->error_message. "\n";
27     print "not ok 1\n";
28 }
29