Better logs
This commit is contained in:
parent
996713aec7
commit
1c865a53b4
1 changed files with 9 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in a new issue