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/job-board.corals.io/Corals/modules/Payment/Coinbase/Message/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/corals/job-board.corals.io/Corals/modules/Payment/Coinbase/Message/PurchaseRequest.php
<?php

namespace Corals\Modules\Payment\Coinbase\Message;

/**
 * Coinbase Purchase Request
 *
 * @method \Corals\Modules\Payment\Coinbase\Message\PurchaseResponse send()
 */
class PurchaseRequest extends AbstractRequest
{
    public function setMetaData($value)
    {
        return $this->setParameter('metadata', $value);
    }

    public function getMetaData()
    {
        return $this->getParameter('metadata');
    }

    public function setRedirectUrl($value)
    {
        return $this->setParameter('redirect_url', $value);
    }

    public function getRedirectUrl()
    {
        return $this->getParameter('redirect_url');
    }

    public function setName($value)
    {
        return $this->setParameter('name', $value);
    }

    public function getName()
    {
        return $this->getParameter('name');
    }

    public function getData()
    {
        $this->validate('name', 'description', 'amount', 'currency', 'metadata', 'pricing_type');
        $data = [];
        $data['amount'] = $this->getAmount();
        $data['name'] = $this->getName();
        $data['description'] = $this->getDescription();
        $data['pricing_type'] = $this->getParameter('pricing_type');
        $data['redirect_url'] = $this->getRedirectUrl();
        $data['metadata'] = $this->getMetaData();
        if ($this->getParameter('pricing_type') == 'fixed_price') {
            $data['local_price'] = [
                'amount' => $this->getAmount(),
                'currency' => $this->getCurrency(),
            ];
        }
        return $data;
    }

    public function sendData($data)
    {
        $response = $this->sendRequest('POST', '/charges', $data);

        return $this->response = new PurchaseResponse($this, $response);
    }
}

Spamworldpro Mini