X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FBilling_Realtime.pm;h=cf4b16e59b289b491cfdc904259f7cd820a842df;hb=7aaf4684beb1016f0f1b1bdb8eec9adc37a11dff;hp=b892e97c2b89060d46e6590134fae01e1aaafd01;hpb=d860f85d2a4823a040996f9b1055e2d4054b864e;p=freeside.git diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index b892e97c2..cf4b16e59 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -556,6 +556,8 @@ sub realtime_bop { ? uc($options{'paytype'}) : uc($self->getfield('paytype')) || 'PERSONAL CHECKING'; + $content{company} = $self->company if $self->company; + if ( $content{account_type} =~ /BUSINESS/i && $self->company ) { $content{account_name} = $self->company; } else { @@ -1932,8 +1934,10 @@ sub realtime_verify_bop { ); $reverse->content( 'action' => 'Reverse Authorization', + $self->_bop_auth(\%options), # B:OP + 'amount' => '1.00', 'authorization' => $transaction->authorization, 'order_number' => $ordernum, @@ -1963,6 +1967,17 @@ sub realtime_verify_bop { } + } else { # is not success + + # status is 'done' not 'declined', as in _realtime_bop_result + $cust_pay_pending->status('done'); + $cust_pay_pending->statustext( $transaction->error_message || 'Unknown error' ); + # could also record failure_status here, + # but it's not supported by B::OP::vSecureProcessing... + # need a B::OP module with (reverse) auth only to test it with + my $cpp_declined_err = $cust_pay_pending->replace; + return $cpp_declined_err if $cpp_declined_err; + } ###