diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-02-12 14:27:41 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-02-12 14:27:41 -0800 |
commit | 28425f2f6ecee736d64cf6a45a74dc4f4992edbd (patch) | |
tree | 0087ff57298a6a175a95c0d3ec647fd28404e6a6 /t/t_transaction_decline.t | |
parent | 59dc9c0128f8c9258c9ec80f11754dd1e7ecf26e (diff) |
- Update for production URL
- Use username/password for auth like other B:OP modules
- Fix tests
- Remove extraneous extra/ stuff in repo
Diffstat (limited to 't/t_transaction_decline.t')
-rw-r--r-- | t/t_transaction_decline.t | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/t/t_transaction_decline.t b/t/t_transaction_decline.t deleted file mode 100644 index 2e15eb2..0000000 --- a/t/t_transaction_decline.t +++ /dev/null @@ -1,46 +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; -my %content = ( - appid => $opts{'appid'}, - action => 'Normal Authorization', - description => 'Business::OnlinePayment visa test', - card_number => '4111111111111112', # trigger failure - 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 ); - -$tx->test_transaction(1); - -$tx->submit; - -is( $tx->is_success, 0, 'declined purchase') - or diag('Test transaction should have failed, but succeeded'); -is( $tx->failure_status, 'nsf', 'failure status' ) - or diag('Failure status reported as '.$tx->failure_status); - -1; |