From: ivan Date: Mon, 22 Jun 2009 23:42:19 +0000 (+0000) Subject: fix using encryption produces non-decrypted data in payment receipts, RT#5536 X-Git-Tag: root_of_svc_elec_features~1102 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=961ed0b05abcd9c9180d4c91ef4dd75cca4e3eb2 fix using encryption produces non-decrypted data in payment receipts, RT#5536 --- diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index 0caba7574..201b427aa 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -216,11 +216,15 @@ sub insert { my $payby = $self->payby; my $payinfo = $self->payinfo; $payby =~ s/^BILL$/Check/ if $payinfo; - $payinfo = $self->paymask if $payby eq 'CARD' || $payby eq 'CHEK'; + if ( $payby eq 'CARD' || $payby eq 'CHEK' ) { + $payinfo = $self->paymask + } else { + $payinfo = $self->decrypt($payinfo); + } $payby =~ s/^CHEK$/Electronic check/; $error = send_email( - 'from' => $conf->config('invoice_from', $self->cust_main->agentnum), + 'from' => $conf->config('invoice_from', $cust_main->agentnum), #invoice_from??? well as good as any 'to' => \@invoicing_list, 'subject' => 'Payment receipt',