initial checkin
[Business-OnlinePayment-SecureHostingUPG.git] / t / crypt_bad_card.t
1 BEGIN {
2   $| = 1; print "1..1\n";
3   $Business::OnlinePayment::HTTPS::skip_NetSSLeay=1;
4   $Business::OnlinePayment::HTTPS::skip_NetSSLeay=1;
5 }
6
7 eval "use Crypt::SSLeay;";
8 if ( $@ ) {
9   print "ok 1 # Skipped: Crypt::SSLeay is not installed\n"; exit;
10 }
11
12 use Business::OnlinePayment;
13
14 my $tx = new Business::OnlinePayment("SecureHostingUPG");
15
16 $tx->content(
17     type           => 'VISA',
18     login          => 'SH207361', #SecureHosting Reference
19     password       => '495376',   #SecureHosting Checkcode value
20     action         => 'Normal Authorization',
21     description    => 'Business::OnlinePayment visa test',
22     amount         => '49.95',
23     currency       => 'GBP',
24     name           => 'Tofu Beast',
25     address        => '123 Anystreet',
26     city           => 'Anywhere',
27     state          => 'UT',
28     zip            => '84058',
29     phone          => '420-543-2199',
30     email          => 'tofu.beast@example.com',
31     card_number    => '4005550000000020',
32     expiration     => '08/06',
33     card_start     => '05/04',
34     cvv2           => '1234', #optional
35     issue_number   => '5678',
36 );
37 $tx->test_transaction(1); # test, dont really charge
38 $tx->submit();
39
40 if($tx->is_success()) {
41     print "not ok 1\n";
42 } else {
43     #warn $tx->server_response."\n";
44     #warn $tx->error_message. "\n";
45     print "ok 1\n";
46 }
47