From: Ivan Kohler Date: Sun, 18 Aug 2013 05:37:46 +0000 (-0700) Subject: B:OP:AuthorizeNet (and others?) account_name: send company name instead of first... X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=0972e744b4b542550013a470f8b08cb090094a0f B:OP:AuthorizeNet (and others?) account_name: send company name instead of first+last for business accounts, RT#23586 --- diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index 1caa3e5af..6e89f71b8 100644 --- 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'; - $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'})