initial import
[Business-OnlinePayment-PayConnect.git] / t / lec.t
1 BEGIN { $| = 1; print "1..2\n"; }
2
3 use Business::OnlinePayment;
4
5 foreach my $phone (qw( 4082435901 8107926049 )) {
6
7   my $tx = new Business::OnlinePayment("PayConnect",
8     partner => 's9Te1',
9   );
10   $tx->content(
11       type           => 'LEC',
12       login          => '7001',
13       password       => '9PIci',
14       action         => 'Authorization Only',
15       description    => 'Business::OnlinePayment LEC test',
16       amount         => '1.00',
17       invoice_number => '100100',
18       customer_id    => 'jsk',
19       name           => 'Tofu Beast',
20       first_name     => 'Tofu',
21       last_name      => 'Beast',
22       address        => '123 Anystreet',
23       city           => 'Anywhere',
24       state          => 'UT',
25       zip            => '84058',
26       phone          => $phone,
27   );
28   $tx->test_transaction(1); # test, dont really charge (NOP for this gateway)
29   $tx->submit();
30
31   $num++;
32   if($tx->is_success()) {
33       print "ok $num\n";
34   } else {
35       warn "*******". $tx->error_message. "*******";
36       print "not ok $num\n";
37   }
38
39 }