Spamworldpro Mini Shell
Spamworldpro


Server : Apache
System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64
User : corals ( 1002)
PHP Version : 7.4.33
Disable Function : exec,passthru,shell_exec,system
Directory :  /home/corals/inventory.corals.io/Corals/modules/Payment/Cheque/Message/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/inventory.corals.io/Corals/modules/Payment/Cheque/Message/CreateChargeRequest.php
<?php

namespace Corals\Modules\Payment\Cheque\Message;


class CreateChargeRequest extends AbstractRequest
{
    public function setDetails($details)
    {
        $this->setParameter('details', $details);
    }

    public function getDetails()
    {
        return $this->getParameter('details');
    }

    public function getData()
    {
        return [
            'details'=>$this->getDetails()
        ];
    }

    /**
     * @param $data
     * @return CreateChargeResponse
     */
    public function sendData($data)
    {
        $checkoutToken = data_get($data,'details.checkoutToken');
        $amount = data_get($data,'details.payment_details.paid_amount');
        $transaction_status = 'pending';
        $data=[
            'gateway'=>'Cheque',
            'checkoutToken'=>$checkoutToken,
            'payment_details'=>data_get($data,'details.payment_details'),
            'amount'=>$amount,
            'paid_amount'=>0,
            'transaction_status'=>$transaction_status
        ];

        return new CreateChargeResponse($this,$data);
    }
}

Spamworldpro Mini