diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 6c41e1e4dc5..ab6a835a383 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -2160,11 +2160,11 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme } }, - save_payment_method: /* true when a customer was provided when creating payment intent. true ask to save the card */ + } else { + print 'false'; + } ?> /* true when a customer was provided when creating payment intent. true ask to save the card */ } ).then(function(result) { console.log(result); @@ -2175,7 +2175,7 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme // Inform the user if there was an error var errorElement = document.getElementById('card-errors'); errorElement.textContent = result.error.message; - } else { + } else { // The payment has succeeded. Display a success message. console.log("No error on result of handleCardPayment, so we submit the form"); // Submit the form @@ -2183,7 +2183,7 @@ if (preg_match('/^dopayment/', $action)) { // If we choosed/click on the payme jQuery('#hourglasstopay').show(); // Send form (action=charge that will do nothing) jQuery('#payment-form').submit(); - } + } }); } }); diff --git a/test/phpunit/DateLibTzFranceTest.php b/test/phpunit/DateLibTzFranceTest.php index 348eff7ae59..63eadc1a98f 100644 --- a/test/phpunit/DateLibTzFranceTest.php +++ b/test/phpunit/DateLibTzFranceTest.php @@ -78,7 +78,8 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function setUpBeforeClass() { + public static function setUpBeforeClass() + { global $conf,$user,$langs,$db; if (getServerTimeZoneString() != 'Europe/Paris' && getServerTimeZoneString() != 'Europe/Berlin') { @@ -95,7 +96,8 @@ class DateLibTzFranceTest extends PHPUnit\Framework\TestCase * * @return void */ - public static function tearDownAfterClass() { + public static function tearDownAfterClass() + { global $conf,$user,$langs,$db; $db->rollback();