add multiple_xactions test
[Business-OnlinePayment-StGeorge.git] / t2 / credit_card.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 use Business::OnlinePayment;
4
5 my $tx = new Business::OnlinePayment("StGeorge",
6 #  'cert_path'   => './java.cert',
7   'cert_path'   => '/home/ivan/Business-OnlinePayment-StGeorge/t2/java.cert',
8 );
9
10 $tx->content(
11     login          => '10005432',
12     password       => 'certphrase',
13     type           => 'CC',
14     action         => 'Normal Authorization',
15     description    => 'Business::OnlinePayment::LinkPoint visa test',
16     amount         => '1.00',
17     first_name     => 'Tofu',
18     last_name      => 'Beast',
19     address        => '123 Anystreet',
20     city           => 'Anywhere',
21     state          => 'UT',
22     zip            => '84058',
23     country        => 'US',
24     email          => 'ivan-stgeorge@420.am',
25     card_number    => '4564456445644564',
26     expiration     => '12/2005',
27 );
28
29 $tx->test_transaction(1);
30
31 $tx->submit();
32
33 if($tx->is_success()) {
34     print "ok 1\n";
35     $auth = $tx->authorization;
36     warn "********* $auth ***********\n";
37 } else {
38     print "not ok 1\n";
39     warn '***** '. $tx->error_message. " *****\n";
40     exit;
41 }
42
43