X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FBilling_Realtime.pm;h=5980bf5de365a78cb86ea81bc641c73abcaaf195;hb=6bf88c075270636dd11150941de53f152e6018a7;hp=f70bab2134c9ede90082a8af5471049b01d77766;hpb=7fe9f776655a9a7fc3b93b4f0e06c8b8193834b6;p=freeside.git diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm index f70bab213..5980bf5de 100644 --- a/FS/FS/cust_main/Billing_Realtime.pm +++ b/FS/FS/cust_main/Billing_Realtime.pm @@ -343,8 +343,9 @@ sub realtime_bop { my $cc_surcharge = 0; my $cc_surcharge_pct = 0; $cc_surcharge_pct = $conf->config('credit-card-surcharge-percentage') - if $conf->config('credit-card-surcharge-percentage'); - + if $conf->config('credit-card-surcharge-percentage') + && $options{method} eq 'CC'; + # always add cc surcharge if called from event if($options{'cc_surcharge_from_event'} && $cc_surcharge_pct > 0) { $cc_surcharge = $options{'amount'} * $cc_surcharge_pct / 100; @@ -1107,10 +1108,7 @@ sub _realtime_bop_result { }; my $error = send_email( - 'from' => $conf->config('invoice_from_name', $self->agentnum ) ? - $conf->config('invoice_from_name', $self->agentnum ) . ' <' . - $conf->config('invoice_from', $self->agentnum ) . '>' : - $conf->config('invoice_from', $self->agentnum ), + 'from' => $conf->invoice_from_full( $self->agentnum ), 'to' => [ grep { $_ ne 'POST' } $self->invoicing_list ], 'subject' => 'Your payment could not be processed', 'body' => [ $template->fill_in(HASH => $templ_hash) ],