← All changes
|
src/Framework/PaymentGateways/ServiceProvider.php
+10
-2
4.15.5
→
4.16.9
View file →
| @@ -48,8 +48,9 @@ | ||
| 48 | 48 | }, 999); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | /** |
| 52 | + * @since 4.16.0 Add $donationId to support gateways that only receive the transaction ID via webhook (e.g. PayFast). | |
| 52 | 53 | * @since 4.5.0 |
| 53 | 54 | */ |
| 54 | 55 | private function addDonationStatusEventHandlers(string $gatewayId) |
| 55 | 56 | { |
| @@ -56,9 +57,12 @@ | ||
| 56 | 57 | foreach (DonationStatus::values() as $status) { |
| 57 | 58 | if ($eventHandlerClass = (new GetEventHandlerClassByDonationStatus())($status)) { |
| 58 | 59 | Hooks::addAction( |
| 59 | 60 | sprintf('givewp_%s_webhook_event_donation_status_%s', $gatewayId, $status->getValue()), |
| 60 | - $eventHandlerClass, '__invoke', 10, 3 | |
| 61 | + $eventHandlerClass, | |
| 62 | + '__invoke', | |
| 63 | + 10, | |
| 64 | + 4 | |
| 61 | 65 | ); |
| 62 | 66 | } |
| 63 | 67 | } |
| 64 | 68 | } |
| @@ -79,8 +83,9 @@ | ||
| 79 | 83 | } |
| 80 | 84 | } |
| 81 | 85 | |
| 82 | 86 | /** |
| 87 | + * @since 4.16.0 Add $donationId to support gateways that only receive the transaction ID via webhook (e.g. PayFast). | |
| 83 | 88 | * @since 4.5.0 |
| 84 | 89 | */ |
| 85 | 90 | private function addSubscriptionFirstDonationEventHandler(string $gatewayId) |
| 86 | 91 | { |
| @@ -85,9 +90,12 @@ | ||
| 85 | 90 | private function addSubscriptionFirstDonationEventHandler(string $gatewayId) |
| 86 | 91 | { |
| 87 | 92 | Hooks::addAction( |
| 88 | 93 | sprintf('givewp_%s_webhook_event_subscription_first_donation', $gatewayId), |
| 89 | - SubscriptionFirstDonationCompleted::class, '__invoke', 10, 5 | |
| 94 | + SubscriptionFirstDonationCompleted::class, | |
| 95 | + '__invoke', | |
| 96 | + 10, | |
| 97 | + 6 | |
| 90 | 98 | ); |
| 91 | 99 | } |
| 92 | 100 | |
| 93 | 101 | /** |