add check capability
[Business-OnlinePayment-LinkPoint.git] / t2 / credit_card.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 use Business::OnlinePayment;
4
5 my $tx = new Business::OnlinePayment("LinkPoint",
6   'storename' => '1909922411',
7   'keyfile'   => './test.pem',
8 );
9
10 $tx->content(
11     type           => 'VISA',
12     action         => 'Normal Authorization',
13     description    => 'Business::OnlinePayment::LinkPoint visa test',
14     amount         => '0.01',
15     first_name     => 'Tofu',
16     last_name      => 'Beast',
17     address        => '123 Anystreet',
18     city           => 'Anywhere',
19     state          => 'UT',
20     zip            => '84058',
21     country        => 'US',
22     email          => 'ivan-linkpoint@420.am',
23     card_number    => '4007000000027',
24     expiration     => '12/2008',
25 );
26
27 $tx->test_transaction(1);
28
29 $tx->submit();
30
31 if($tx->is_success()) {
32     print "ok 1\n";
33     $auth = $tx->authorization;
34     warn "********* $auth ***********\n";
35 } else {
36     print "not ok 1\n";
37     warn '***** '. $tx->error_message. " *****\n";
38     exit;
39 }
40