diff options
author | Ivan Kohler <ivan@freeside.biz> | 2014-07-09 12:13:23 -0700 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2014-07-09 12:13:23 -0700 |
commit | f6660ccc1cf3719650dc179aa7b1fd117b07ed0b (patch) | |
tree | 76a750ca7ebe6fee19507681060e4642f947514b /t/transaction.t |
initial try at a module
Diffstat (limited to 't/transaction.t')
-rw-r--r-- | t/transaction.t | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/t/transaction.t b/t/transaction.t new file mode 100644 index 0000000..28db227 --- /dev/null +++ b/t/transaction.t @@ -0,0 +1,39 @@ +#!/usr/bin/perl + +use strict; +use warnings; +use POSIX qw(strftime); +use Test::More tests => 1; + +use Business::OnlinePayment; + +my %content = ( + login => '124freeside', + password => 'freeside124', + action => "Normal Authorization", + type => "CC", + description => "Business::OnlinePayment::FirstDataGlobalGateway test", + card_number => '4111111111111111', + cvv2 => '123', + expiration => '12/20', + amount => '1.00', + first_name => 'Tofu', + last_name => 'Beast', + address => '1234 Soybean Ln.', + city => 'Soyville', + state => 'CA', #where else? + zip => '54545', +); + +my $tx = new Business::OnlinePayment( 'FirstDataGlobalGateway' ); + +$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; |