From 1764d3528bb43bb63c54d0899ea1265b3f60cc1b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 Jan 2021 19:45:52 +0100 Subject: [PATCH 1/5] Fix test email --- htdocs/admin/mails.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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 '
'; } From 099fcd7e4efe2b869e6eece3c6901fe1daeefef9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 Jan 2021 19:45:52 +0100 Subject: [PATCH 2/5] Fix test email Conflicts: htdocs/admin/mails.php --- htdocs/admin/mails.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/admin/mails.php b/htdocs/admin/mails.php index 00d954883f9..4b471263542 100644 --- a/htdocs/admin/mails.php +++ b/htdocs/admin/mails.php @@ -719,7 +719,7 @@ else { if (function_exists('fsockopen') && $port && $server) { - print ''.$langs->trans("DoTestServerAvailability").''; + print ''.$langs->trans("DoTestServerAvailability").''; } } else @@ -789,6 +789,7 @@ else // 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'; @@ -804,6 +805,7 @@ else } setEventMessages($errormsg, null, 'errors'); + print $errormsg; } print '
'; } From 848b4db509c33ef7e0a43c8b8aca91e9726bba6a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 Jan 2021 23:13:43 +0100 Subject: [PATCH 3/5] Fix regression: It was not more possible to create payment offline --- htdocs/stripe/class/stripe.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 4e534276c47..2198493d0fd 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -430,7 +430,8 @@ class Stripe extends CommonObject if ($off_session) { unset($dataforintent['setup_future_usage']); - $dataforintent["setup_future_usage"] = "off_session"; + //$dataforintent["setup_future_usage"] = "off_session"; + $dataforintent["off_session"] = true; } if (!is_null($payment_method)) { From 62622a206579ccdde1cfaf8d27d0684a4e12f63d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 Jan 2021 23:16:24 +0100 Subject: [PATCH 4/5] Fix: It was no more possible to create paymentintent for offline payment --- htdocs/stripe/class/stripe.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index a691b7bff40..9f44645d3a0 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -431,7 +431,8 @@ class Stripe extends CommonObject if ($off_session) { unset($dataforintent['setup_future_usage']); - $dataforintent["setup_future_usage"] = "off_session"; + //$dataforintent["setup_future_usage"] = "off_session"; + $dataforintent["off_session"] = true; } if (!is_null($payment_method)) { From 6ed3a1c227a5c60cfb4e4a17fbb6a022a9850663 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 28 Jan 2021 23:18:10 +0100 Subject: [PATCH 5/5] Fix idempotencey make stripe payment fails --- htdocs/stripe/class/stripe.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 2198493d0fd..e1ee0138287 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;