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