Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into develop

Conflicts:
	htdocs/stripe/class/stripe.class.php
This commit is contained in:
Laurent Destailleur
2021-01-28 23:22:35 +01:00
2 changed files with 9 additions and 5 deletions

View File

@@ -768,17 +768,17 @@ if ($action == 'edit')
{
if (function_exists('fsockopen') && $port && $server)
{
print '<a class="butAction reposition" href="'.$_SERVER["PHP_SELF"].'?action=testconnect">'.$langs->trans("DoTestServerAvailability").'</a>';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testconnect&date='.dol_now().'#formmailaftertstconnect">'.$langs->trans("DoTestServerAvailability").'</a>';
}
} else {
print '<a class="butActionRefused classfortooltip" href="#" title="'.$langs->trans("FeatureNotAvailableOnLinux").'">'.$langs->trans("DoTestServerAvailability").'</a>';
}
print '<a class="butAction reposition" href="'.$_SERVER["PHP_SELF"].'?action=test&mode=init#formmailbeforetitle">'.$langs->trans("DoTestSend").'</a>';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=test&mode=init#formmailbeforetitle">'.$langs->trans("DoTestSend").'</a>';
if (!empty($conf->fckeditor->enabled))
{
print '<a class="butAction reposition" href="'.$_SERVER["PHP_SELF"].'?action=testhtml&mode=init#formmailbeforetitle">'.$langs->trans("DoTestSendHTML").'</a>';
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?action=testhtml&mode=init#formmailbeforetitle">'.$langs->trans("DoTestSendHTML").'</a>';
}
}
@@ -844,6 +844,7 @@ if ($action == 'edit')
// Run the test to connect
if ($action == 'testconnect')
{
print '<div id="formmailaftertstconnect" name="formmailaftertstconnect"></div>';
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 '<br>';
}

View File

@@ -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']);