403Webshell
Server IP : 192.158.238.246  /  Your IP : 18.219.250.4
Web Server : LiteSpeed
System : Linux uniform.iwebfusion.net 4.18.0-553.27.1.lve.1.el8.x86_64 #1 SMP Wed Nov 20 15:58:00 UTC 2024 x86_64
User : jenniferflocom ( 1321)
PHP Version : 8.1.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /proc/7779/cwd/plugins/give/src/Donations/LegacyListeners/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/7779/cwd/plugins/give/src/Donations/LegacyListeners/DispatchGiveInsertPayment.php
<?php

namespace Give\Donations\LegacyListeners;

use Give\Donations\Models\Donation;
use Give\Helpers\Hooks;
use Give\PaymentGateways\DataTransferObjects\GiveInsertPaymentData;

class DispatchGiveInsertPayment
{
    /**
     * @since 2.22.3 Use $donor->userId instead of $donor->id on the userInfo key
     * @since      2.20.0 only run this listener if the legacy hook is used
     * @since      2.19.6
     *
     * @param Donation $donation
     *
     * @return void
     */
    public function __invoke(Donation $donation)
    {
        if (!has_action('give_insert_payment')) {
            return;
        }

        $donor = $donation->donor;

        $giveInsertPaymentData = GiveInsertPaymentData::fromArray([
            'price' => $donation->amount->formatToDecimal(),
            'formTitle' => $donation->formTitle,
            'formId' => $donation->formId,
            'priceId' => give_get_price_id($donation->formId, $donation->amount->formatToDecimal()),
            'date' => $donation->createdAt,
            'donorEmail' => $donor->email,
            'purchaseKey' => $donation->purchaseKey,
            'currency' => $donation->amount->getCurrency()->getCode(),
            'paymentGateway' => $donation->gatewayId,
            'donorId' => $donation->donorId,
            'userInfo' => [
                'id' => $donor->userId,
                'firstName' => $donor->firstName,
                'lastName' => $donor->lastName,
                'title' => $donor->prefix,
                'email' => $donor->email,
                'address' => $donation->billingAddress,
            ],
        ]);

        /**
         * @deprecated
         */
        Hooks::doAction('give_insert_payment', $donation->id, $giveInsertPaymentData->toArray());
    }
}

Youez - 2016 - github.com/yon3zu
LinuXploit