diff options
author | Christopher Burger <burgerc@freeside.biz> | 2018-06-12 09:51:58 -0400 |
---|---|---|
committer | Christopher Burger <burgerc@freeside.biz> | 2018-06-12 09:51:58 -0400 |
commit | 360f89789c45e1fd7cb84b1442d2f0c8353066d9 (patch) | |
tree | 2bfadf26b82c95ac6df124739590a07a7478bad2 /httemplate/misc/process/payment.cgi | |
parent | f079061ec1005edbb9d292377bf4eb1a769fa681 (diff) |
RT# 74435 - fixed errors in posting a echeck refund when no account is listed.
Diffstat (limited to 'httemplate/misc/process/payment.cgi')
-rw-r--r-- | httemplate/misc/process/payment.cgi | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi index 717d57c85..5620b5b4b 100644 --- a/httemplate/misc/process/payment.cgi +++ b/httemplate/misc/process/payment.cgi @@ -90,6 +90,7 @@ if ( (my $custpaybynum = scalar($cgi->param('custpaybynum'))) > 0 ) { $paycvv = $cust_payby->paycvv; # pass it if we got it, running a transaction will clear it ( $month, $year ) = $cust_payby->paydate_mon_year; $payname = $cust_payby->payname; + $cgi->param(-name=>"paytype", -value=>$cust_payby->paytype) unless $cgi->param("paytype"); } else { @@ -208,6 +209,10 @@ if ( (my $custpaybynum = scalar($cgi->param('custpaybynum'))) > 0 ) { my $error = ''; my $paynum = ''; +my $paydate; +if ($cust_payby->paydate) { $paydate = "$year-$month-01"; } +else { $paydate = "2037-12-01"; } + if ( $cgi->param('batch') ) { $error = 'Prepayment discounts not supported with batched payments' @@ -217,7 +222,7 @@ if ( $cgi->param('batch') ) { 'payby' => $payby, 'amount' => $amount, 'payinfo' => $payinfo, - 'paydate' => "$year-$month-01", + 'paydate' => $paydate, 'payname' => $payname, map { $_ => scalar($cgi->param($_)) } @{$payby2fields{$payby}} |