From 90a9cb6d1b1c4bc0185af17e30417197f8d058f4 Mon Sep 17 00:00:00 2001 From: Glauber Silva Date: Mon, 2 Sep 2024 21:12:10 -0300 Subject: [PATCH] refactor: change async job search parameter --- .../Webhooks/OffSiteGatewaysWebhookNotificationHandler.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/OffSiteGateway/Webhooks/OffSiteGatewaysWebhookNotificationHandler.php b/src/OffSiteGateway/Webhooks/OffSiteGatewaysWebhookNotificationHandler.php index e0a45c7..fc8e62c 100644 --- a/src/OffSiteGateway/Webhooks/OffSiteGatewaysWebhookNotificationHandler.php +++ b/src/OffSiteGateway/Webhooks/OffSiteGatewaysWebhookNotificationHandler.php @@ -32,9 +32,8 @@ public function __invoke(OffSiteGatewayWebhookNotification $webhookNotification) switch (strtolower($webhookNotification->gatewayPaymentStatus)) { case 'complete': - $asyncJobHookName = 'givewp_' . OffSiteGateway::id() . '_event_donation_completed'; AsBackgroundJobs::enqueueAsyncAction( - $asyncJobHookName, + 'givewp_' . OffSiteGateway::id() . '_event_donation_completed', [$webhookNotification->gatewayPaymentId], 'ADDON_TEXTDOMAIN' ); @@ -43,7 +42,7 @@ public function __invoke(OffSiteGatewayWebhookNotification $webhookNotification) * The block below is not necessary for real-world integrations; * We are adding it here just for educational purposes. */ - $asyncJobUrl = admin_url('tools.php?page=action-scheduler&s=' . $asyncJobHookName); + $asyncJobUrl = admin_url('tools.php?page=action-scheduler&s=' . $webhookNotification->gatewayPaymentId); ?>