summaryrefslogtreecommitdiff
path: root/t2/multiple_xactions.t
blob: b756f0585357e13a00efa05520fad28a204e4bbc (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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
BEGIN { $| = 1; print "1..2\n"; }

use Business::OnlinePayment;

for my $testnum ( 1 .. 2 ) {
  &run_xaction($testnum);
}

sub run_xaction {

  my $testnum = shift;

  my $tx = new Business::OnlinePayment("StGeorge",
  #  'cert_path'   => './java.cert',
    'cert_path'   => '/home/ivan/Business-OnlinePayment-StGeorge/t2/java.cert',
  );

  $tx->content(
      login          => '10005432',
      password       => 'certphrase',
      type           => 'CC',
      action         => 'Normal Authorization',
      description    => 'Business::OnlinePayment::LinkPoint visa test',
      amount         => '1.00',
      first_name     => 'Tofu',
      last_name      => 'Beast',
      address        => '123 Anystreet',
      city           => 'Anywhere',
      state          => 'UT',
      zip            => '84058',
      country        => 'US',
      email          => 'ivan-stgeorge@420.am',
      card_number    => '4564456445644564',
      expiration     => '12/2005',
  );

  $tx->test_transaction(1);

  $tx->submit();

  if($tx->is_success()) {
      print "ok $testnum\n";
      $auth = $tx->authorization;
      warn "********* $auth ***********\n";
  } else {
      print "not ok $testnum\n";
      warn '***** '. $tx->error_message. " *****\n";
      exit;
  }

}