From 3e49935eaca54961bc0235b8a57af711c20cfcfd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 6 Oct 2018 15:48:47 +0200 Subject: [PATCH] Fix online payment --- htdocs/public/payment/newpayment.php | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index b9e79d78a6a..6c44d0e57eb 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -233,9 +233,7 @@ if (! empty($conf->global->PAYMENT_SECURITY_TOKEN)) if (! $valid) { print '
Bad value for key.
'; - //prin '.$langs->trans("SaveSource").' -1563 -t 'SECUREKEY='.$SECUREKEY.' token='.$token.' valid='.$valid; + //print 'SECUREKEY='.$SECUREKEY.' token='.$token.' valid='.$valid; exit; } } @@ -413,9 +411,9 @@ if ($action == 'charge' && ! empty($conf->stripe->enabled)) $email = GETPOST("email",'alpha'); $thirdparty_id=GETPOST('thirdparty_id', 'int'); // Note that for payment following online registration for members, this is empty because thirdparty is created once payment is confirmed by paymentok.php $dol_type=(GETPOST('s', 'alpha') ? GETPOST('s', 'alpha') : GETPOST('source', 'alpha')); - $dol_id=GETPOST('dol_id', 'int'); + $dol_id=GETPOST('dol_id', 'int'); $vatnumber = GETPOST('vatnumber','alpha'); - $savesource=GETPOST('savesource', 'int'); + $savesource=GETPOST('savesource', 'int'); dol_syslog("stripeToken = ".$stripeToken, LOG_DEBUG, 0, '_stripe'); dol_syslog("email = ".$email, LOG_DEBUG, 0, '_stripe'); @@ -468,7 +466,7 @@ if ($action == 'charge' && ! empty($conf->stripe->enabled)) $action=''; } else - { + { if (! empty($FULLTAG)) $metadata["FULLTAG"] = $FULLTAG; if (! empty($dol_id)) $metadata["dol_id"] = $dol_id; if (! empty($dol_type)) $metadata["dol_type"] = $dol_type; @@ -505,7 +503,7 @@ if ($action == 'charge' && ! empty($conf->stripe->enabled)) 'source' => $stripeToken // source can be a token OR array('object'=>'card', 'exp_month'=>xx, 'exp_year'=>xxxx, 'number'=>xxxxxxx, 'cvc'=>xxx, 'name'=>'Cardholder's full name', zip ?) )); // Return $customer = array('id'=>'cus_XXXX', ...) - + if (! empty($FULLTAG)) $metadata["FULLTAG"] = $FULLTAG; if (! empty($dol_id)) $metadata["dol_id"] = $dol_id; if (! empty($dol_type)) $metadata["dol_type"] = $dol_type;