summaryrefslogtreecommitdiff
path: root/httemplate/misc/process/payment.cgi
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2018-07-16 18:43:48 -0700
committerIvan Kohler <ivan@freeside.biz>2018-07-16 18:43:48 -0700
commit2a9d2460814b37e07d7cb83392723146a60d34c7 (patch)
tree074f234834e4389a0da90c15e4a91c72a25d68b9 /httemplate/misc/process/payment.cgi
parent4facec5414f411b97c9b19772c13f125a0b748cb (diff)
parente44835f640559a6eb5bc831e08732d5ab8947dd4 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/misc/process/payment.cgi')
-rw-r--r--httemplate/misc/process/payment.cgi7
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}}