diff options
author | ivan <ivan> | 2007-11-30 01:16:45 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-11-30 01:16:45 +0000 |
commit | 0696d72bf5c5d0294b1c73fe6283da47eb2ceae1 (patch) | |
tree | 425340433b3b6f190e9a8f87940d5126f7e68090 /FS | |
parent | 49d37cfcbe366b28de81944ebe28e4f768942ec1 (diff) |
remove unnecessary redefinition of %method2payby, add a quick hack to fake B:OP success and failure for testing purposes
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_main.pm | 22 |
1 files changed, 15 insertions, 7 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 4e22a904e..74d7bcbfb 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -3186,7 +3186,21 @@ sub realtime_bop { my $cpp_pending_err = $cust_pay_pending->replace; return $cpp_pending_err if $cpp_pending_err; - $transaction->submit(); + #config? + my $BOP_TESTING = 0; + my $BOP_TESTING_SUCCESS = 1; + + unless ( $BOP_TESTING ) { + $transaction->submit(); + } else { + if ( $BOP_TESTING_SUCCESS ) { + $transaction->is_success(1); + $transaction->authorization('fake auth'); + } else { + $transaction->is_success(0); + $transaction->error_message('fake failure'); + } + } if ( $transaction->is_success() && $action2 ) { @@ -3261,12 +3275,6 @@ sub realtime_bop { if ( $transaction->is_success() ) { - my %method2payby = ( - 'CC' => 'CARD', - 'ECHECK' => 'CHEK', - 'LEC' => 'LECB', - ); - my $paybatch = ''; if ( $payment_gateway ) { # agent override $paybatch = $payment_gateway->gatewaynum. '-'; |