File: lec.t

package info (click to toggle)
libbusiness-onlinepayment-payconnect-perl 0.02-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 84 kB
  • sloc: perl: 87; makefile: 6
file content (39 lines) | stat: -rw-r--r-- 1,050 bytes parent folder | download | duplicates (4)
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
BEGIN { $| = 1; print "1..2\n"; }

use Business::OnlinePayment;

foreach my $phone (qw( 4082435901 8107926049 )) {

  my $tx = new Business::OnlinePayment("PayConnect",
    partner => 's9Te1',
  );
  $tx->content(
      type           => 'LEC',
      login          => '7001',
      password       => '9PIci',
      action         => 'Authorization Only',
      description    => 'Business::OnlinePayment LEC test',
      amount         => '1.00',
      invoice_number => '100100',
      customer_id    => 'jsk',
      name           => 'Tofu Beast',
      first_name     => 'Tofu',
      last_name      => 'Beast',
      address        => '123 Anystreet',
      city           => 'Anywhere',
      state          => 'UT',
      zip            => '84058',
      phone          => $phone,
  );
  $tx->test_transaction(1); # test, dont really charge (NOP for this gateway)
  $tx->submit();

  $num++;
  if($tx->is_success()) {
      print "ok $num\n";
  } else {
      warn "*******". $tx->error_message. "*******";
      print "not ok $num\n";
  }

}