Debug v22 on param sessionkey
This commit is contained in:
parent
0c2dcefcfb
commit
99b1bcf4d0
3 changed files with 19 additions and 19 deletions
|
|
@ -786,14 +786,14 @@ if ($action == 'charge' && isModEnabled('stripe')) { // Test on permission not r
|
|||
|
||||
if ($error) {
|
||||
$randomseckey = getRandomPassword(true, null, 20);
|
||||
$_SESSION['paymentkosessionkey'] = $randomseckey; // key between newpayment.php to paymentko.php
|
||||
$_SESSION['paymentkosessioncode'] = $randomseckey; // key between newpayment.php to paymentko.php
|
||||
|
||||
$urlko .= '&paymentkosessionkey='.urlencode($randomseckey);
|
||||
$urlko .= '&paymentkosessioncode='.urlencode($randomseckey);
|
||||
} else {
|
||||
$randomseckey = getRandomPassword(true, null, 20);
|
||||
$_SESSION['paymentoksessionkey'] = $randomseckey; // key between newpayment.php to paymentok.php
|
||||
$_SESSION['paymentoksessioncode'] = $randomseckey; // key between newpayment.php to paymentok.php
|
||||
|
||||
$urlok .= '&paymentoksessionkey='.urlencode($randomseckey);
|
||||
$urlok .= '&paymentoksessioncode='.urlencode($randomseckey);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -839,9 +839,9 @@ if ($action == 'charge' && isModEnabled('stripe')) { // Test on permission not r
|
|||
$action = '';
|
||||
|
||||
$randomseckey = getRandomPassword(true, null, 20);
|
||||
$_SESSION['paymentkosessionkey'] = $randomseckey; // key between newpayment.php to paymentko.php
|
||||
$_SESSION['paymentkosessioncode'] = $randomseckey; // key between newpayment.php to paymentko.php
|
||||
|
||||
$urlko .= '&paymentkosessionkey='.urlencode($randomseckey);
|
||||
$urlko .= '&paymentkosessioncode='.urlencode($randomseckey);
|
||||
} else {
|
||||
// We can also record the payment mode into llx_societe_rib with stripe $paymentintent->payment_method
|
||||
// Note that with other old Stripe architecture (using Charge API), the payment mode was not recorded, so it is not mandatory to do it here.
|
||||
|
|
@ -866,9 +866,9 @@ if ($action == 'charge' && isModEnabled('stripe')) { // Test on permission not r
|
|||
dol_syslog("StatusOfRetrievedIntent is succeeded for amount = ".$amount." currency = ".$currency, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
$randomseckey = getRandomPassword(true, null, 20);
|
||||
$_SESSION['paymentoksessionkey'] = $randomseckey; // key between newpayment.php to paymentok.php
|
||||
$_SESSION['paymentoksessioncode'] = $randomseckey; // key between newpayment.php to paymentok.php
|
||||
|
||||
$urlok .= '&paymentoksessionkey='.urlencode($randomseckey);
|
||||
$urlok .= '&paymentoksessioncode='.urlencode($randomseckey);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -885,7 +885,7 @@ if ($action == 'charge' && isModEnabled('stripe')) { // Test on permission not r
|
|||
$_SESSION['errormessage'] = $errormessage;
|
||||
|
||||
dol_syslog("Action charge stripe STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION=".getDolGlobalInt('STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION')." ip=".$remoteip, LOG_DEBUG, 0, '_payment');
|
||||
dol_syslog("onlinetoken=".$_SESSION["onlinetoken"]." paymentoksessionkey=".$_SESSION["paymentoksessionkey"]." paymentkosessionkey=".$_SESSION["paymentkosessionkey"], LOG_DEBUG, 0, '_payment');
|
||||
dol_syslog("onlinetoken=".$_SESSION["onlinetoken"]." paymentoksessioncode=".$_SESSION["paymentoksessioncode"]." paymentkosessioncode=".$_SESSION["paymentkosessioncode"], LOG_DEBUG, 0, '_payment');
|
||||
dol_syslog("FinalPaymentAmt=".$_SESSION["FinalPaymentAmt"]." currencyCodeType=".$_SESSION["currencyCodeType"]." payerID=".$_SESSION['payerID']." TRANSACTIONID=".$_SESSION['TRANSACTIONID'], LOG_DEBUG, 0, '_payment');
|
||||
dol_syslog("FULLTAG=".$FULLTAG, LOG_DEBUG, 0, '_payment');
|
||||
dol_syslog("error=".$error." errormessage=".$errormessage, LOG_DEBUG, 0, '_payment');
|
||||
|
|
|
|||
|
|
@ -177,7 +177,7 @@ foreach ($_POST as $k => $v) {
|
|||
}
|
||||
dol_syslog("POST=".$tracepost, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
dol_syslog("paymentkosessionkey=".GETPOST('paymentkosessionkey')." SESSION['paymentkosessionkey']=".$_SESSION['paymentkosessionkey'], LOG_DEBUG, 0, '_payment');
|
||||
dol_syslog("paymentkosessioncode=".GETPOST('paymentkosessioncode')." SESSION['paymentkosessioncode']=".$_SESSION['paymentkosessioncode'], LOG_DEBUG, 0, '_payment');
|
||||
|
||||
// Set $appli for emails title
|
||||
$appli = $mysoc->name;
|
||||
|
|
@ -354,9 +354,9 @@ if (!empty($doactionsthenredirect)) {
|
|||
|
||||
// Paymentko page must be created for the specific website
|
||||
if (!defined('USEDOLIBARRSERVER') && !empty($ws_virtuelhost)) {
|
||||
$ext_urlko = $ws_virtuelhost . '/paymentko.php?paymentkosessionkey='.urlencode($randomseckey).'&fulltag='.$FULLTAG;
|
||||
$ext_urlko = $ws_virtuelhost . '/paymentko.php?paymentkosessioncode='.urlencode($randomseckey).'&fulltag='.$FULLTAG;
|
||||
} else {
|
||||
$ext_urlko = DOL_URL_ROOT.'/public/website/index.php?paymentkosessionkey='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG;
|
||||
$ext_urlko = DOL_URL_ROOT.'/public/website/index.php?paymentkosessioncode='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG;
|
||||
}
|
||||
|
||||
dol_syslog("Now do a redirect using Location : ".$ext_urlko, LOG_DEBUG, 0, '_payment');
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ foreach ($_SESSION as $k => $v) {
|
|||
}
|
||||
dol_syslog("SESSION=".$tracesession, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
dol_syslog("paymentoksessionkey=".GETPOST('paymentoksessionkey')." SESSION['paymentoksessionkey']=".$_SESSION['paymentoksessionkey'], LOG_DEBUG, 0, '_payment');
|
||||
dol_syslog("paymentoksessioncode=".GETPOST('paymentoksessioncode')." SESSION['paymentoksessioncode']=".$_SESSION['paymentoksessioncode'], LOG_DEBUG, 0, '_payment');
|
||||
|
||||
$head = '';
|
||||
if (getDolGlobalString('ONLINE_PAYMENT_CSS_URL')) {
|
||||
|
|
@ -2179,13 +2179,13 @@ if (!empty($doactionsthenredirect)) {
|
|||
if ($ispaymentok) {
|
||||
// Redirect to a success page
|
||||
$randomseckey = getRandomPassword(true, null, 20);
|
||||
$_SESSION['paymentoksessionkey'] = $randomseckey; // key between paymentok.php to another page like a paymentok of the website.
|
||||
$_SESSION['paymentoksessioncode'] = $randomseckey; // key between paymentok.php to another page like a paymentok of the website.
|
||||
|
||||
// Paymentok page must be created for the specific website
|
||||
if (!defined('USEDOLIBARRSERVER') && !empty($ws_virtuelhost)) {
|
||||
$ext_urlok = $ws_virtuelhost . '/paymentok.php?paymentoksessionkey='.urlencode($randomseckey).'&fulltag='.$FULLTAG;
|
||||
$ext_urlok = $ws_virtuelhost . '/paymentok.php?paymentoksessioncode='.urlencode($randomseckey).'&fulltag='.$FULLTAG;
|
||||
} else {
|
||||
$ext_urlok = DOL_URL_ROOT.'/public/website/index.php?paymentoksessionkey='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentok&fulltag='.$FULLTAG;
|
||||
$ext_urlok = DOL_URL_ROOT.'/public/website/index.php?paymentoksessioncode='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentok&fulltag='.$FULLTAG;
|
||||
}
|
||||
|
||||
dol_syslog("Now do a redirect using a Location: ".$ext_urlok, LOG_DEBUG, 0, '_payment');
|
||||
|
|
@ -2194,13 +2194,13 @@ if (!empty($doactionsthenredirect)) {
|
|||
} else {
|
||||
// Redirect to an error page
|
||||
$randomseckey = getRandomPassword(true, null, 20);
|
||||
$_SESSION['paymentkosessionkey'] = $randomseckey; // key between paymentok.php to another page like a paymentko of the website.
|
||||
$_SESSION['paymentkosessioncode'] = $randomseckey; // key between paymentok.php to another page like a paymentko of the website.
|
||||
|
||||
// Paymentko page must be created for the specific website
|
||||
if (!defined('USEDOLIBARRSERVER') && !empty($ws_virtuelhost)) {
|
||||
$ext_urlko = $ws_virtuelhost . '/paymentko.php?paymentkosessionkey='.urlencode($randomseckey).'&fulltag='.$FULLTAG;
|
||||
$ext_urlko = $ws_virtuelhost . '/paymentko.php?paymentkosessioncode='.urlencode($randomseckey).'&fulltag='.$FULLTAG;
|
||||
} else {
|
||||
$ext_urlko = DOL_URL_ROOT.'/public/website/index.php?paymentkosessionkey='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG;
|
||||
$ext_urlko = DOL_URL_ROOT.'/public/website/index.php?paymentkosessioncode='.urlencode($randomseckey).'&website='.urlencode($ws).'&pageref=paymentko&fulltag='.$FULLTAG;
|
||||
}
|
||||
|
||||
dol_syslog("Now do a redirect using a Location:".$ext_urlko, LOG_DEBUG, 0, '_payment');
|
||||
|
|
|
|||
Loading…
Reference in a new issue