projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
"on hold" package ordering and status, RT#28508
[freeside.git]
/
FS
/
FS
/
cust_main
/
Billing_Realtime.pm
diff --git
a/FS/FS/cust_main/Billing_Realtime.pm
b/FS/FS/cust_main/Billing_Realtime.pm
index
1caa3e5
..
e5e5291
100644
(file)
--- a/
FS/FS/cust_main/Billing_Realtime.pm
+++ b/
FS/FS/cust_main/Billing_Realtime.pm
@@
-507,8
+507,13
@@
sub realtime_bop {
(exists($options{'paytype'}) && $options{'paytype'})
? uc($options{'paytype'})
: uc($self->getfield('paytype')) || 'PERSONAL CHECKING';
(exists($options{'paytype'}) && $options{'paytype'})
? uc($options{'paytype'})
: uc($self->getfield('paytype')) || 'PERSONAL CHECKING';
- $content{account_name} = $self->getfield('first'). ' '.
- $self->getfield('last');
+
+ if ( $content{account_type} =~ /BUSINESS/i && $self->company ) {
+ $content{account_name} = $self->company;
+ } else {
+ $content{account_name} = $self->getfield('first'). ' '.
+ $self->getfield('last');
+ }
$content{customer_org} = $self->company ? 'B' : 'I';
$content{state_id} = exists($options{'stateid'})
$content{customer_org} = $self->company ? 'B' : 'I';
$content{state_id} = exists($options{'stateid'})
@@
-1005,8
+1010,9
@@
sub _realtime_bop_result {
} else {
} else {
- my $perror = $payment_gateway->gateway_module. " error: ".
- $transaction->error_message;
+ my $perror = $transaction->error_message;
+ #$payment_gateway->gateway_module. " error: ".
+ # removed for conciseness
my $jobnum = $cust_pay_pending->jobnum;
if ( $jobnum ) {
my $jobnum = $cust_pay_pending->jobnum;
if ( $jobnum ) {
@@
-1104,7
+1110,11
@@
sub _realtime_bop_result {
}
$cust_pay_pending->status('done');
}
$cust_pay_pending->status('done');
- $cust_pay_pending->statustext("declined: $perror");
+ $cust_pay_pending->statustext($perror);
+ #'declined:': no, that's failure_status
+ if ( $transaction->can('failure_status') ) {
+ $cust_pay_pending->failure_status( $transaction->failure_status );
+ }
my $cpp_done_err = $cust_pay_pending->replace;
if ( $cpp_done_err ) {
my $e = "WARNING: $options{method} declined but pending payment not ".
my $cpp_done_err = $cust_pay_pending->replace;
if ( $cpp_done_err ) {
my $e = "WARNING: $options{method} declined but pending payment not ".