diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-02-06 01:22:06 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-02-06 01:22:06 -0800 |
commit | c1b518f59064671309c220489efd8d59daade4aa (patch) | |
tree | 923656164810295ca6bd29e048d845480c70cf4f /t/transaction.t |
first crack at module
Diffstat (limited to 't/transaction.t')
-rw-r--r-- | t/transaction.t | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/t/transaction.t b/t/transaction.t new file mode 100644 index 0000000..09de282 --- /dev/null +++ b/t/transaction.t @@ -0,0 +1,37 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use POSIX qw(strftime); +use Test::More; + +use Business::OnlinePayment; + +my %content = ( + action => "Normal Authorization", + type => "CC", + description => "Business::OnlinePayment::IATSPayments test", + card_number => '4111111111111111', + cvv2 => '123', + expiration => '12/20', + amount => '2.00', + first_name => 'Tofu', + last_name => 'Beast', + address => '1234 Soybean Ln.', + city => 'Soyville', + state => 'CA', #where else? + zip => '54545', +); + +my $tx = new Business::OnlinePayment( 'IATSPayments' ); + +$tx->content( %content ); + +$tx->test_transaction(1); + +$tx->submit; + +is( $tx->is_success, 1, 'Test transaction successful') + or diag('iATS Payments error: '. $tx->error_message); + +1; |