fix a "false success" problem caused by discrepancy between test and live systems...
[Business-OnlinePayment-TransactionCentral.git] / lib / Business / OnlinePayment / TransactionCentral.pm
index 1e96722..c9d7653 100644 (file)
@@ -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'}   );