Open Journal Systems  3.3.0
vendor/omnipay/paypal/src/Message/ExpressCompleteAuthorizeRequest.php
1 <?php
2 
3 namespace Omnipay\PayPal\Message;
4 
8 class ExpressCompleteAuthorizeRequest extends AbstractRequest
9 {
10  public function getData()
11  {
12  $this->validate('amount');
13 
14  $data = $this->getBaseData();
15  $data['METHOD'] = 'DoExpressCheckoutPayment';
16  $data['PAYMENTREQUEST_0_PAYMENTACTION'] = 'Authorization';
17  $data['PAYMENTREQUEST_0_AMT'] = $this->getAmount();
18  $data['PAYMENTREQUEST_0_CURRENCYCODE'] = $this->getCurrency();
19  $data['PAYMENTREQUEST_0_INVNUM'] = $this->getTransactionId();
20  $data['PAYMENTREQUEST_0_DESC'] = $this->getDescription();
21  $data['PAYMENTREQUEST_0_NOTIFYURL'] = $this->getNotifyUrl();
22 
23  $data['MAXAMT'] = $this->getMaxAmount();
24  $data['PAYMENTREQUEST_0_TAXAMT'] = $this->getTaxAmount();
25  $data['PAYMENTREQUEST_0_SHIPPINGAMT'] = $this->getShippingAmount();
26  $data['PAYMENTREQUEST_0_HANDLINGAMT'] = $this->getHandlingAmount();
27  $data['PAYMENTREQUEST_0_SHIPDISCAMT'] = $this->getShippingDiscount();
28  $data['PAYMENTREQUEST_0_INSURANCEAMT'] = $this->getInsuranceAmount();
29 
30  $data['TOKEN'] = $this->getToken() ? $this->getToken() : $this->httpRequest->query->get('token');
31  $data['PAYERID'] = $this->getPayerID() ? $this->getPayerID() : $this->httpRequest->query->get('PayerID');
32 
33  $data = array_merge($data, $this->getItemData());
34 
35  return $data;
36  }
37 
38  public function getPayerID()
39  {
40  return $this->getParameter('payerID');
41  }
42 
43  public function setPayerID($value)
44  {
45  return $this->setParameter('payerID', $value);
46  }
47 }
Omnipay\PayPal\Message\AbstractRequest\getShippingAmount
getShippingAmount()
Definition: lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:192
Omnipay\PayPal\Message\ExpressCompleteAuthorizeRequest\setPayerID
setPayerID($value)
Definition: vendor/omnipay/paypal/src/Message/ExpressCompleteAuthorizeRequest.php:43
Omnipay\PayPal\Message\AbstractRequest\getShippingDiscount
getShippingDiscount()
Definition: lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:212
Omnipay\Common\Message\AbstractRequest\getToken
getToken()
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:266
Omnipay\PayPal\Message\AbstractRequest\getHandlingAmount
getHandlingAmount()
Definition: lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:202
Omnipay\Common\Message\AbstractRequest\getParameter
getParameter($key)
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:172
Omnipay\Common\Message\AbstractRequest\setParameter
setParameter($key, $value)
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:185
Omnipay\Common\Message\AbstractRequest\getCurrency
getCurrency()
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:391
Omnipay\PayPal\Message\AbstractRequest\getItemData
getItemData()
Definition: lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:298
Omnipay\Common\Message\AbstractRequest\getDescription
getDescription()
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:461
Omnipay\PayPal\Message\AbstractRequest\getMaxAmount
getMaxAmount()
Definition: lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:172
Omnipay\PayPal\Message\ExpressCompleteAuthorizeRequest\getPayerID
getPayerID()
Definition: lib/vendor/omnipay/paypal/src/Message/ExpressCompleteAuthorizeRequest.php:38
Omnipay\PayPal\Message\AbstractRequest\getInsuranceAmount
getInsuranceAmount()
Definition: lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:222
Omnipay\Common\Message\AbstractRequest\getNotifyUrl
getNotifyUrl()
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:617
Omnipay\PayPal\Message\ExpressCompleteAuthorizeRequest\getData
getData()
Definition: vendor/omnipay/paypal/src/Message/ExpressCompleteAuthorizeRequest.php:10
Omnipay\Common\Message\AbstractRequest\validate
validate()
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:226
Omnipay\PayPal\Message\AbstractRequest\getTaxAmount
getTaxAmount()
Definition: lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:182
Omnipay\PayPal\Message\AbstractRequest\getBaseData
getBaseData()
Definition: lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:282
Omnipay\PayPal\Message
Definition: lib/vendor/omnipay/paypal/src/Message/AbstractRequest.php:6
Omnipay\Common\Message\AbstractRequest\getTransactionId
getTransactionId()
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:484
Omnipay\Common\Message\AbstractRequest\getAmount
getAmount()
Definition: lib/vendor/omnipay/common/src/Omnipay/Common/Message/AbstractRequest.php:327