From 28425f2f6ecee736d64cf6a45a74dc4f4992edbd Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Thu, 12 Feb 2015 14:27:41 -0800 Subject: - Update for production URL - Use username/password for auth like other B:OP modules - Fix tests - Remove extraneous extra/ stuff in repo --- t/t_transaction.t | 64 ------------------------------------------------------- 1 file changed, 64 deletions(-) delete mode 100644 t/t_transaction.t (limited to 't/t_transaction.t') diff --git a/t/t_transaction.t b/t/t_transaction.t deleted file mode 100644 index 897e6f7..0000000 --- a/t/t_transaction.t +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/perl - -use strict; -use warnings; -use POSIX qw(strftime); -use Test::More; -use Business::OnlinePayment; -require "t/lib/test_account.pl"; - -my %opts = test_account('card'); - -if (!$opts{'gid'} || !$opts{'appid'}) { - plan skip_all => "no test credentials provided; fill out t/lib/test_account.pl to test communication with the gateway.", - 1; - exit(0); -} - -plan tests => 2; - -### -# Purchase -### -my %content = ( - appid => $opts{'appid'}, - action => 'Normal Authorization', - description => 'Business::OnlinePayment visa test', - card_number => '4111111111111111', - cvv2 => '111', - expiration => expiration_date(), - amount => '24.42', - name => 'Murphy Law', - email => 'fake@acme.com', - address => '123 Anystreet', - zip => '84058', -); - -my $tx = new Business::OnlinePayment( 'vSecureProcessing', \%opts ); - -$tx->content( %content, - action => 'Normal Authorization' ); - -$tx->test_transaction(1); - -$tx->submit; - -is( $tx->is_success, 1, 'purchase' ) - or diag('Gateway error: '. $tx->error_message); - -### -# Refund -### -my $auth = $tx->authorization; -$tx = new Business::OnlinePayment( 'vSecureProcessing' ); -$tx->content( %content, - action => 'Credit', - authorization => $auth ); -$tx->test_transaction(1); - -$tx->submit; - -is( $tx->is_success, 1, 'refund' ) - or diag('Gateway error: '. $tx->error_message); - -1; -- cgit v1.2.1