diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 0d6a36e07b7..b0b18de20dc 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -768,17 +768,17 @@ if ($action == 'edit') { if (function_exists('fsockopen') && $port && $server) { - print ''.$langs->trans("DoTestServerAvailability").''; + print ''.$langs->trans("DoTestServerAvailability").''; } } else { print ''.$langs->trans("DoTestServerAvailability").''; } - print ''.$langs->trans("DoTestSend").''; + print ''.$langs->trans("DoTestSend").''; if (!empty($conf->fckeditor->enabled)) { - print ''.$langs->trans("DoTestSendHTML").''; + print ''.$langs->trans("DoTestSendHTML").''; } } @@ -844,6 +844,7 @@ if ($action == 'edit') // Run the test to connect if ($action == 'testconnect') { + print '
'; print load_fiche_titre($langs->trans("DoTestServerAvailability")); include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php'; @@ -858,6 +859,7 @@ if ($action == 'edit') } setEventMessages($errormsg, null, 'errors'); + print $errormsg; } print '
'; } diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 793e370f634..dc532457965 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -321,7 +321,7 @@ class Stripe extends CommonObject * @param string $noidempotency_key Do not use the idempotency_key when creating the PaymentIntent * @return \Stripe\PaymentIntent|null Stripe PaymentIntent or null if not found and failed to create */ - public function getPaymentIntent($amount, $currency_code, $tag, $description = '', $object = null, $customer = null, $key = null, $status = 0, $usethirdpartyemailforreceiptemail = 0, $mode = 'automatic', $confirmnow = false, $payment_method = null, $off_session = 0, $noidempotency_key = 0) + public function getPaymentIntent($amount, $currency_code, $tag, $description = '', $object = null, $customer = null, $key = null, $status = 0, $usethirdpartyemailforreceiptemail = 0, $mode = 'automatic', $confirmnow = false, $payment_method = null, $off_session = 0, $noidempotency_key = 1) { global $conf, $user; @@ -434,8 +434,10 @@ class Stripe extends CommonObject if ($off_session) { unset($dataforintent['setup_future_usage']); + // We can't use both "setup_future_usage" = "off_session" and "off_session" = true. + // Because $off_session parameter is dedicated to create paymentintent off_line (and not future payment), we need to use "off_session" = true. //$dataforintent["setup_future_usage"] = "off_session"; - $dataforintent["off_session"] = true; // Restore value to test if it solve a regression + $dataforintent["off_session"] = true; } if (!empty($conf->global->STRIPE_GIROPAY)) unset($dataforintent['setup_future_usage']);