mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Add sleep(2) to allow the app to catch up with speed of webhooks
This commit is contained in:
parent
a90fa63b0b
commit
800025bf5d
@ -273,6 +273,9 @@ class MolliePaymentDriver extends BaseDriver
|
||||
|
||||
public function processWebhookRequest(PaymentWebhookRequest $request)
|
||||
{
|
||||
// Allow app to catch up with webhook request.
|
||||
sleep(2);
|
||||
|
||||
$validator = Validator::make($request->all(), [
|
||||
'id' => ['required', 'starts_with:tr'],
|
||||
]);
|
||||
|
@ -390,6 +390,9 @@ class StripePaymentDriver extends BaseDriver
|
||||
|
||||
public function processWebhookRequest(PaymentWebhookRequest $request)
|
||||
{
|
||||
// Allow app to catch up with webhook request.
|
||||
sleep(2);
|
||||
|
||||
if ($request->type === 'charge.succeeded' || $request->type === 'source.chargeable') {
|
||||
foreach ($request->data as $transaction) {
|
||||
$payment = Payment::query()
|
||||
|
Loading…
x
Reference in New Issue
Block a user