File manager - Edit - /home/opticamezl/www/newok/libraries/fabrik/vendor/omnipay/paymentexpress/src/Message/PxPayAuthorizeRequest.php
Back
<?php namespace Omnipay\PaymentExpress\Message; use SimpleXMLElement; use Omnipay\Common\Message\AbstractRequest; /** * PaymentExpress PxPay Authorize Request */ class PxPayAuthorizeRequest extends AbstractRequest { protected $endpoint = 'https://sec.paymentexpress.com/pxaccess/pxpay.aspx'; protected $action = 'Auth'; public function getUsername() { return $this->getParameter('username'); } public function setUsername($value) { return $this->setParameter('username', $value); } public function getPassword() { return $this->getParameter('password'); } public function setPassword($value) { return $this->setParameter('password', $value); } public function getData() { $this->validate('amount', 'returnUrl'); $data = new SimpleXMLElement('<GenerateRequest/>'); $data->PxPayUserId = $this->getUsername(); $data->PxPayKey = $this->getPassword(); $data->TxnType = $this->action; $data->AmountInput = $this->getAmount(); $data->CurrencyInput = $this->getCurrency(); $data->MerchantReference = $this->getDescription(); $data->UrlSuccess = $this->getReturnUrl(); $data->UrlFail = $this->getReturnUrl(); return $data; } public function sendData($data) { $httpResponse = $this->httpClient->post($this->endpoint, null, $data->asXML())->send(); return $this->createResponse($httpResponse->xml()); } protected function createResponse($data) { return $this->response = new PxPayAuthorizeResponse($this, $data); } }
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0.06 |
proxy
|
phpinfo
|
Settings