Файловый менеджер - Редактировать - /var/www/html/netaxept.zip
Ðазад
PK ! ز��G G src/Message/CaptureRequest.phpnu �[��� <?php namespace Omnipay\Netaxept\Message; use Omnipay\Common\Exception\InvalidResponseException; /** * Netaxept Capture Request * * @author Antonio Peric-Mazar <antonio@locastic.com> */ class CaptureRequest extends PurchaseRequest { public function getData() { $data = array(); $data['transactionAmount'] = $this->getAmountInteger(); $data['transactionId'] = $this->getTransactionId(); $data['merchantId'] = $this->getMerchantId(); $data['token'] = $this->getPassword(); $data['operation'] = 'CAPTURE'; if (empty($data['transactionAmount']) || empty($data['transactionId'])) { throw new InvalidResponseException; } return $data; } public function sendData($data) { $url = $this->getEndpoint().'/Netaxept/Process.aspx?'; $httpResponse = $this->httpClient->request('GET', $url.http_build_query($data)); return $this->response = new Response($this, simplexml_load_string($httpResponse->getBody()->getContents())); } } PK ! ���� � src/Message/PurchaseRequest.phpnu �[��� <?php namespace Omnipay\Netaxept\Message; use Omnipay\Common\Message\AbstractRequest; /** * Netaxept Purchase Request */ class PurchaseRequest extends AbstractRequest { protected $liveEndpoint = 'https://epayment.nets.eu'; protected $testEndpoint = 'https://test.epayment.nets.eu'; public function getMerchantId() { return $this->getParameter('merchantId'); } public function setMerchantId($value) { return $this->setParameter('merchantId', $value); } public function getPassword() { return $this->getParameter('password'); } public function setPassword($value) { return $this->setParameter('password', $value); } public function getLanguage() { return $this->getParameter('language'); } public function setLanguage($value) { return $this->setParameter('language', $value); } public function getData() { $this->validate('amount', 'currency', 'transactionId', 'returnUrl'); $data = array(); $data['merchantId'] = $this->getMerchantId(); $data['token'] = $this->getPassword(); $data['serviceType'] = 'B'; $data['orderNumber'] = $this->getTransactionId(); $data['currencyCode'] = $this->getCurrency(); $data['amount'] = $this->getAmountInteger(); $data['redirectUrl'] = $this->getReturnUrl(); $data['language'] = $this->getLanguage(); if ($this->getCard()) { $data['customerFirstName'] = $this->getCard()->getFirstName(); $data['customerLastName'] = $this->getCard()->getLastName(); $data['customerEmail'] = $this->getCard()->getEmail(); $data['customerPhoneNumber'] = $this->getCard()->getPhone(); $data['customerAddress1'] = $this->getCard()->getAddress1(); $data['customerAddress2'] = $this->getCard()->getAddress2(); $data['customerPostcode'] = $this->getCard()->getPostcode(); $data['customerTown'] = $this->getCard()->getCity(); $data['customerCountry'] = $this->getCard()->getCountry(); } return $data; } public function sendData($data) { $url = $this->getEndpoint().'/Netaxept/Register.aspx?'; $httpResponse = $this->httpClient->request('GET', $url.http_build_query($data)); return $this->response = new Response($this, simplexml_load_string($httpResponse->getBody()->getContents())); } public function getEndpoint() { return $this->getTestMode() ? $this->testEndpoint : $this->liveEndpoint; } } PK ! Bm=�q q src/Message/CreditRequest.phpnu �[��� <?php namespace Omnipay\Netaxept\Message; use Omnipay\Common\Exception\InvalidResponseException; use Omnipay\Common\Message\AbstractRequest; /** * Netaxept Credit Request * * @author Antonio Peric-Mazar <antonio@locastic.com> */ class CreditRequest extends PurchaseRequest { public function getData() { $data = array(); $data['transactionAmount'] = $this->getAmountInteger(); $data['transactionId'] = $this->getTransactionId(); $data['merchantId'] = $this->getMerchantId(); $data['token'] = $this->getPassword(); $data['operation'] = 'CREDIT'; if (empty($data['transactionAmount']) || empty($data['transactionId'])) { throw new InvalidResponseException; } return $data; } public function sendData($data) { $url = $this->getEndpoint().'/Netaxept/Process.aspx?'; $httpResponse = $this->httpClient->request('GET', $url.http_build_query($data)); return $this->response = new Response($this, simplexml_load_string($httpResponse->getBody()->getContents())); } } PK ! O�a[ src/Message/Response.phpnu �[��� <?php namespace Omnipay\Netaxept\Message; use Omnipay\Common\Message\AbstractResponse; use Omnipay\Common\Message\RedirectResponseInterface; /** * Netaxept Response */ class Response extends AbstractResponse implements RedirectResponseInterface { public function isSuccessful() { return isset($this->data->ResponseCode) && 'OK' === (string) $this->data->ResponseCode; } public function isRedirect() { return !$this->isSuccessful() && 'RegisterResponse' === (string) $this->data->getName(); } public function getTransactionReference() { return isset($this->data->TransactionId) ? (string) $this->data->TransactionId : null; } public function getMessage() { if (isset($this->data->Error->Message)) { return (string) $this->data->Error->Message; } elseif (isset($this->data->ResponseCode)) { return (string) $this->data->ResponseCode; } } public function getRedirectUrl() { if ($this->isRedirect()) { $data = array( 'merchantId' => $this->getRequest()->getMerchantId(), 'transactionId' => $this->getTransactionReference(), ); return $this->getRequest()->getEndpoint().'/Terminal/Default.aspx?'.http_build_query($data); } } public function getRedirectMethod() { return 'GET'; } public function getRedirectData() { return null; } } PK ! ĝO4n n src/Message/AnnulRequest.phpnu �[��� <?php namespace Omnipay\Netaxept\Message; use Omnipay\Common\Exception\InvalidResponseException; use Omnipay\Common\Message\AbstractRequest; /** * Netaxept Annul Request * * @author Antonio Peric-Mazar <antonio@locastic.com> */ class AnnulRequest extends PurchaseRequest { public function getData() { $data = array(); $data['transactionAmount'] = $this->getAmountInteger(); $data['transactionId'] = $this->getTransactionId(); $data['merchantId'] = $this->getMerchantId(); $data['token'] = $this->getPassword(); $data['operation'] = 'ANNUL'; if (empty($data['transactionAmount']) || empty($data['transactionId'])) { throw new InvalidResponseException; } return $data; } public function sendData($data) { $url = $this->getEndpoint().'/Netaxept/Process.aspx?'; $httpResponse = $this->httpClient->request('GET', $url.http_build_query($data)); return $this->response = new Response($this, simplexml_load_string($httpResponse->getBody()->getContents())); } } PK ! �Fѽ� � src/Message/ErrorResponse.phpnu �[��� <?php namespace Omnipay\Netaxept\Message; use Omnipay\Common\Message\AbstractResponse; /** * Netaxept Response */ class ErrorResponse extends AbstractResponse { public function isSuccessful() { return false; } public function getTransactionReference() { return $this->data['transactionId']; } public function getMessage() { return $this->data['responseCode']; } } PK ! D�� � '