0.01
[Business-OnlinePayment-PayflowPro.git] / t / credit_card.t
1 BEGIN { $| = 1; print "1..1\n"; }
2
3 use Business::OnlinePayment;
4
5 my $tx = new Business::OnlinePayment("PayflowPro",
6     #'vendor'    => 'your_vendor',
7     'partner'   => 'verisign',
8     'cert_path' => '/home/ivan/Business-OnlinePayment-PayflowPro.docs/verisign/payflowpro/linux/certs/',
9 );
10
11 $tx->content(
12     type           => 'VISA',
13     login          => 'test231',
14     password       => '231test',
15     action         => 'Normal Authorization',
16     description    => 'Business::OnlinePayment::PayflowPro visa test',
17     amount         => '0.01',
18     first_name     => 'Tofu',
19     last_name      => 'Beast',
20     address        => '123 Anystreet',
21     city           => 'Anywhere',
22     state          => 'UT',
23     zip            => '84058',
24     country        => 'US',
25     email          => 'ivan-payflowpro@420.am',
26     #card_number    => '4007000000027',
27     card_number    => '4111111111111111',
28     expiration     => '12/2004',
29 );
30
31 $tx->test_transaction(1);
32
33 $tx->submit();
34
35 if($tx->is_success()) {
36     print "ok 1\n";
37     $auth = $tx->authorization;
38     warn "********* $auth ***********\n";
39 } else {
40     print "not ok 1\n";
41     warn '***** '. $tx->error_message. " *****\n";
42     exit;
43 }
44