Your IP : 216.73.217.77


Current Path : /home/users/unlimited/www/mpos.codeskitter.site/vendor/omnipay/paypal/src/Message/
Upload File :
Current File : /home/users/unlimited/www/mpos.codeskitter.site/vendor/omnipay/paypal/src/Message/RefundRequest.php

<?php

namespace Omnipay\PayPal\Message;

/**
 * PayPal Refund Request
 */
class RefundRequest extends AbstractRequest
{
    public function getData()
    {
        $this->validate('transactionReference');

        $data = $this->getBaseData();
        $data['METHOD'] = 'RefundTransaction';
        $data['TRANSACTIONID'] = $this->getTransactionReference();
        $data['REFUNDTYPE'] = 'Full';
        if ($this->getAmount() > 0) {
            $data['REFUNDTYPE'] = 'Partial';
            $data['AMT'] = $this->getAmount();
            $data['CURRENCYCODE'] = $this->getCurrency();
        }

        return $data;
    }
}