Better logs

This commit is contained in:
Laurent Destailleur 2026-03-27 11:26:06 +01:00
parent 996713aec7
commit 1c865a53b4

View file

@ -1168,15 +1168,17 @@ class Stripe extends CommonObject
if (!$cs) {
$this->error = 'Link SEPA <-> setupIntent->create failed';
dol_syslog($this->error, LOG_ERR);
$cs2 = null;
} else {
// note: $cs->mandate contains ID of mandate on Stripe side
$cs2 = $s->setupIntents->confirm($cs->id, ['mandate_data' => ['customer_acceptance' => ['type' => 'offline']]]);
if (!$cs2) {
$this->error = 'Link SEPA <-> setupIntent->confirm failed';
dol_syslog($this->error, LOG_ERR);
}
}
$cs = $s->setupIntents->confirm($cs->id, ['mandate_data' => ['customer_acceptance' => ['type' => 'offline']]]);
// note: $cs->mandate contains ID of mandate on Stripe side
if (!$cs) {
$this->error = 'Link SEPA <-> setupIntent->confirm failed';
dol_syslog($this->error, LOG_ERR);
} else {
if ($cs && $cs2) {
dol_syslog("Update the payment mode of the customer");
// print json_encode($sepa);