From 0b45ceaf920186544e1fe40dcaa41e2afa0291ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 4 Feb 2020 18:59:49 +0100 Subject: [PATCH] More logs --- htdocs/stripe/class/stripe.class.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index 0953bda125d..32d9fd4784b 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -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; } }