NEW Add a delay to be sure that any Stripe action from webhooks are
executed after interactive actions
This commit is contained in:
parent
da982d1106
commit
186c1bd036
1 changed files with 4 additions and 1 deletions
|
|
@ -165,7 +165,6 @@ if (isModEnabled('multicompany') && !empty($conf->stripeconnect->enabled) && is_
|
|||
$ret = $mc->switchEntity($key);
|
||||
}
|
||||
|
||||
// list of action
|
||||
$stripe = new Stripe($db);
|
||||
|
||||
// Subject
|
||||
|
|
@ -180,6 +179,10 @@ dol_syslog("***** Stripe IPN was called with event->type=".$event->type." servic
|
|||
dol_syslog("***** Stripe IPN was called with event->type=".$event->type." service=".$service, LOG_DEBUG, 0, '_payment');
|
||||
|
||||
|
||||
// Add a delay to be sure that any Stripe action from webhooks are executed after interactive actions
|
||||
sleep(2);
|
||||
|
||||
|
||||
if ($event->type == 'payout.created' && getDolGlobalString('STRIPE_AUTO_RECORD_PAYOUT')) {
|
||||
// When a payout is created by Stripe to transfer money to your account
|
||||
dol_syslog("object = ".var_export($event->data, true));
|
||||
|
|
|
|||
Loading…
Reference in a new issue