From 17c9073161c041e34a7d98fdce43e386797785b8 Mon Sep 17 00:00:00 2001 From: ivan Date: Wed, 30 May 2007 18:55:09 +0000 Subject: [PATCH] fix a "false success" problem caused by discrepancy between test and live systems: "Auth" field comes back as "Declined" rather than empty --- Changes | 4 +++- lib/Business/OnlinePayment/TransactionCentral.pm | 2 +- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Changes b/Changes index 11b08da..547b726 100644 --- a/Changes +++ b/Changes @@ -1,7 +1,9 @@ Revision history for Perl extension Business::OnlinePayment::TransactionCentral. -0.04 unreleased +0.04 Wed May 30 11:53:00 PDT 2007 - depend on B:OP v3 + - fix a "false success" problem caused by discrepancy between test and + live systems: "Auth" field comes back as "Declined" rather than empty 0.03 Sat May 19 15:03:43 PDT 2007 - add/finish ECHECK support (google of TCInterfaceGuide indicated diff --git a/lib/Business/OnlinePayment/TransactionCentral.pm b/lib/Business/OnlinePayment/TransactionCentral.pm index 1e96722..c9d7653 100644 --- a/lib/Business/OnlinePayment/TransactionCentral.pm +++ b/lib/Business/OnlinePayment/TransactionCentral.pm @@ -140,7 +140,7 @@ sub submit { $self->avs_code( $return{'AVSCode'} ); $self->cvv2_response( $return{'CVV2ResponseMsg'} ); - if ( $return{'Auth'} =~ /^\s*(\w+)\s*$/ ) { + if ( $return{'Auth'} =~ /^\s*(\w+)\s*$/ && lc($1) ne 'declined' ) { $self->is_success(1); $self->authorization( $return{'Auth'} ); -- 2.11.0