first crack at module
[Business-OnlinePayment-IATSPayments.git] / t / transaction_decline.t
1 #!/usr/bin/perl
2
3 use strict;
4 use warnings;
5 use POSIX qw(strftime);
6 use Test::More;
7
8 use Business::OnlinePayment;
9
10 my %content = (                                                                 
11     action         => "Normal Authorization",                                   
12     type           => "CC",                                                     
13     description    => "Business::OnlinePayment::IATSPayments test",     
14     card_number    => '4111111111111111',
15     cvv2           => '123',
16     expiration     => '12/20',
17     amount         => '1.00',
18     first_name     => 'Tofu',
19     last_name      => 'Beast',
20     address        => '1234 Soybean Ln.',
21     city           => 'Soyville',
22     state          => 'CA', #where else?
23     zip            => '54545',
24
25     customer_ip => '1.2.3.4',
26     invoice_num => 64,
27 );                                                                              
28
29 my $tx = new Business::OnlinePayment( 'IATSPayments' );
30
31 $tx->content( %content );
32
33 $tx->test_transaction(1);
34
35 $tx->submit;
36
37 is( $tx->is_success, 0, 'Test decline transaction successful');
38             
39 1;