Skip to content

issue/147 - process_webhooks() bocks on sleep fix - #148

Open
DMG-01 wants to merge 1 commit into
PaystackOSS:masterfrom
DMG-01:master
Open

DMG-01 wants to merge 1 commit into
PaystackOSS:masterfrom
DMG-01:master

Conversation

@DMG-01

@DMG-01 DMG-01 commented Sep 15, 2026

Copy link
Copy Markdown

process_webhooks() blocks on sleep(10) before responding causing intermittent lost order confirmations

This PR resolves the issue by acknowledging the webhook immediately and processing the sleep(10) and subsequent API verification in the background.

Specifically, this PR adds the following right before the sleep(10) call:

ignore_user_abort( true ); — Ensures PHP doesn't kill the script when Paystack disconnects.

http_response_code( 200 ); — Sends the success header immediately.

fastcgi_finish_request(); (with fallbacks for LiteSpeed and standard Apache/PHP) — Cleanly closes the client connection so Paystack receives the response instantly, while allowing the rest of the script to safely execute in the background.

… causing intermittent lost order confirmations (especially Bank Transfer)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant