Merge pull request #22468 from ptibogxiv/patch-49

Fix token error
This commit is contained in:
Laurent Destailleur 2022-10-04 17:13:49 +02:00 committed by GitHub
commit f50c2af105
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -337,7 +337,7 @@ if ($conf->global->TAKEPOS_NUMPAD == 0) {
function fetchPaymentIntentClientSecret(amount, invoiceid) {
const bodyContent = JSON.stringify({ amount : amount, invoiceid : invoiceid });
<?php
$urlpaymentintent = DOL_URL_ROOT.'/stripe/ajax/ajax.php?action=createPaymentIntent&servicestatus='.$servicestatus;
$urlpaymentintent = DOL_URL_ROOT.'/stripe/ajax/ajax.php?action=createPaymentIntent&token='.newToken().'&servicestatus='.$servicestatus;
if (!empty($stripeacc)) $urlpaymentintent .= '&stripeacc='.$stripeacc;
?>
return fetch('<?php echo $urlpaymentintent; ?>', {