# give/4.15.5/src/Framework/PaymentGateways/Webhooks/EventHandlers/DonationProcessing.php

GiveWP – Donation Plugin and Fundraising Platform, version 4.15.5. 33 lines.

- Page: https://pluginprobe.com/plugins/give/4.15.5/code/src/Framework/PaymentGateways/Webhooks/EventHandlers/DonationProcessing.php
- Raw: https://pluginprobe.com/plugins/give/4.15.5/raw/src/Framework/PaymentGateways/Webhooks/EventHandlers/DonationProcessing.php
- Modified: 2024-03-13T21:54:14+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/give/4.15.5/code/src/Framework/PaymentGateways/Webhooks/EventHandlers/DonationProcessing.php#L10-L20`.

```php
<?php

namespace Give\Framework\PaymentGateways\Webhooks\EventHandlers;

use Exception;
use Give\Donations\ValueObjects\DonationStatus;
use Give\Framework\PaymentGateways\Webhooks\EventHandlers\Actions\UpdateDonationStatus;

/**
 * @since 3.6.0
 */
class DonationProcessing
{
    /**
     * @since 3.6.0
     * @throws Exception
     */
    public function __invoke(string $gatewayTransactionId, string $message = '', $skipRecurringDonations = false)
    {
        $donation = give()->donations->getByGatewayTransactionId($gatewayTransactionId);

        if ( ! $donation || $donation->status->isProcessing()) {
            return;
        }

        if ($skipRecurringDonations && ! $donation->type->isSingle()) {
            return;
        }

        (new UpdateDonationStatus())($donation, DonationStatus::PROCESSING(), $message);
    }
}

```
