From f6660ccc1cf3719650dc179aa7b1fd117b07ed0b Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Wed, 9 Jul 2014 12:13:23 -0700 Subject: initial try at a module --- t/transaction.t | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 t/transaction.t (limited to 't/transaction.t') 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; -- cgit v1.2.1