More logs

This commit is contained in:
Laurent Destailleur 2020-02-04 18:59:49 +01:00
parent 9c8119def9
commit 0b45ceaf92

View File

@ -561,7 +561,7 @@ class Stripe extends CommonObject
{
global $conf;
dol_syslog("getSetupIntent", LOG_INFO, 1);
dol_syslog("getSetupIntent description=".$description.' confirmnow='.$confirmnow, LOG_INFO, 1);
$error = 0;
@ -603,6 +603,8 @@ class Stripe extends CommonObject
global $stripearrayofkeysbyenv;
\Stripe\Stripe::setApiKey($stripearrayofkeysbyenv[$status]['secret_key']);
dol_syslog("getSetupIntent ".$stripearrayofkeysbyenv[$status]['publishable_key'], LOG_DEBUG);
// Note: If all data for payment intent are same than a previous on, even if we use 'create', Stripe will return ID of the old existing payment intent.
if (empty($key)) { // If the Stripe connect account not set, we use common API usage
//$setupintent = \Stripe\SetupIntent::create($dataforintent, array("idempotency_key" => "$description"));
@ -668,14 +670,14 @@ class Stripe extends CommonObject
}
}
dol_syslog("getSetupIntent return error=".$error, LOG_INFO, -1);
if (!$error)
{
dol_syslog("getSetupIntent ".(is_object($setupintent) ? $setupintent->id : ''), LOG_INFO, -1);
return $setupintent;
}
else
{
dol_syslog("getSetupIntent return error=".$error, LOG_INFO, -1);
return null;
}
}