Файловый менеджер - Редактировать - /var/www/html/omnipay.zip
Ðазад
PK ! @�} A vendor/xown/omnipay-epay/src/Message/CompletePurchaseResponse.phpnu �[��� <?php namespace Omnipay\Epay\Message; use Omnipay\Common\Message\AbstractResponse; /** * Epay Complete Purchase Response */ class CompletePurchaseResponse extends AbstractResponse { public function isSuccessful() { return true; } public function getTransactionId() { return isset($this->data['orderid']) ? $this->data['orderid'] : null; } public function getTransactionReference() { return isset($this->data['txnid']) ? $this->data['txnid'] : null; } } PK ! ��I I 7 vendor/xown/omnipay-epay/src/Message/CaptureRequest.phpnu �[��� <?php namespace Omnipay\Epay\Message; use Omnipay\Common\Message\ResponseInterface; /** * Epay Capture Request */ class CaptureRequest extends PurchaseRequest { protected $endpoint = 'https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx'; public function getSupportedKeys() { return ['merchantnumber', 'amount', 'transactionid', 'group']; } public function setTransactionId($value) { return $this->setParameter('transactionid', $value); } public function getData() { $this->validate('merchantnumber', 'amount', 'transactionid'); $data = array(); foreach($this->getSupportedKeys() as $key) { $value = $this->parameters->get($key); if (!empty($value)) { $data[$key] = $value; } } /** Hack from SOAP description */ $data['pbsResponse'] = -1; $data['epayresponse'] = -1; return $data; } /** * @param mixed $data * @return CaptureResponse */ public function sendData($data) { $client = new \SoapClient($this->endpoint.'?WSDL'); $result = $client->capture($data); return $this->response = new CaptureResponse($this, array( 'captureResult' => $result->captureResult, 'pbsResponse' => $result->pbsResponse, 'epayresponse' => $result->epayresponse, )); } /** * Send the request * * @return ResponseInterface */ public function send() { return $this->sendData($this->getData()); } } PK ! Ja�� � 9 vendor/xown/omnipay-epay/src/Message/PurchaseResponse.phpnu �[��� <?php namespace Omnipay\Epay\Message; use Omnipay\Common\Message\AbstractResponse; use Omnipay\Common\Message\RedirectResponseInterface; /** * Epay Purchase Response */ class PurchaseResponse extends AbstractResponse implements RedirectResponseInterface { protected $endpoint = 'https://ssl.ditonlinebetalingssystem.dk/integration/ewindow/Default.aspx'; public function isSuccessful() { return false; } public function isRedirect() { return true; } public function getRedirectUrl() { return $this->endpoint.'?'.http_build_query($this->data); } public function getRedirectMethod() { return 'GET'; } public function getRedirectData() { return null; } } PK ! ���r 6 vendor/xown/omnipay-epay/src/Message/DeleteRequest.phpnu �[��� <?php namespace Omnipay\Epay\Message; use Omnipay\Common\Message\ResponseInterface; /** * Epay Refund Request */ class DeleteRequest extends CaptureRequest { protected $endpoint = 'https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx'; public function getSupportedKeys() { return ['merchantnumber', 'transactionid', 'group']; } public function getData() { $this->validate('merchantnumber', 'transactionid'); $data = array(); foreach($this->getSupportedKeys() as $key) { $value = $this->parameters->get($key); if (!empty($value)) { $data[$key] = $value; } } /** Hack from SOAP description */ $data['pbsresponse'] = -1; $data['epayresponse'] = -1; return $data; } /** * @param mixed $data * @return CaptureResponse */ public function sendData($data) { $client = new \SoapClient($this->endpoint.'?WSDL'); $result = $client->delete($data); return $this->response = new RefundResponse($this, array( 'creditResult' => isset($result->creditResult) ? $result->creditResult : null, 'pbsResponse' => isset($result->pbsresponse) ? $result->pbsresponse : null, 'epayresponse' => $result->epayresponse, )); } /** * Send the request * * @return ResponseInterface */ public function send() { return $this->sendData($this->getData()); } } PK ! /�� � 8 vendor/xown/omnipay-epay/src/Message/PurchaseRequest.phpnu �[��� <?php namespace Omnipay\Epay\Message; use Omnipay\Common\Helper; use Omnipay\Common\Message\AbstractRequest; use Omnipay\Common\Exception\RuntimeException; use Omnipay\Common\Message\ResponseInterface; use Symfony\Component\HttpFoundation\ParameterBag; /** * Epay Purchase Request */ class PurchaseRequest extends AbstractRequest { /** * @inheritdoc */ public function initialize(array $parameters = array()) { if (null !== $this->response) { throw new RuntimeException('Request cannot be modified after it has been sent!'); } $this->parameters = new ParameterBag(); $supportedKeys = $this->getSupportedKeys(); if (is_array($parameters)) { foreach ($parameters as $key => $value) { $method = 'set'.ucfirst(Helper::camelCase($key)); if (method_exists($this, $method)) { $this->$method($value); } else if(in_array($key, $supportedKeys)) { $this->parameters->set($key, $value); } } } return $this; } public function getSupportedKeys() { return ['merchantnumber', 'currency','amount', 'secret', 'orderid', 'windowstate', 'mobile', 'windowid', 'paymentcollection', 'lockpaymentcollection', 'paymenttype', 'language', 'encoding', 'cssurl', 'mobilecssurl', 'instantcapture', 'splitpayment', 'instantcallback', 'callbackurl', 'accepturl', 'cancelurl', 'ownreceipt', 'ordertext', 'group', 'description', 'subscription', 'subscriptionname', 'mailreceipt', 'googletracker', 'backgroundcolor', 'opacity', 'declinetext', 'iframeheight', 'iframewidth', 'timeout']; } public function getData() { $this->validate('merchantnumber', 'currency', 'accepturl', 'amount'); $data = array(); foreach($this->getSupportedKeys() as $key) { $value = $this->parameters->get($key); if ($value !== null) { $data[$key] = $value; } } $data['amount'] = $this->getAmountInteger(); if (isset($data['secret'])) { unset($data['secret']); $data['hash'] = md5(implode("", array_values($data)) . $this->getParameter('secret')); } return $data; } public function sendData($data) { return $this->response = new PurchaseResponse($this, $data); } /** * Send the request * * @return ResponseInterface */ public function send() { return $this->sendData($this->getData()); } public function setOrderId($value) { return $this->setParameter('orderid', $value); } public function getOrderId($value) { return $this->getParameter('orderid'); } public function setAccepturl($value) { return $this->setParameter('accepturl', $value); } public function getAccepturl($value) { return $this->getParameter('accepturl'); } public function setTimeout($value) { return $this->setParameter('timeout', $value); } public function getTimeout($value) { return $this->getParameter('timeout'); } } PK ! b�{\? ? 7 vendor/xown/omnipay-epay/src/Message/RefundResponse.phpnu �[��� <?php namespace Omnipay\Epay\Message; use Omnipay\Common\Message\AbstractResponse; /** * Epay Refund Response */ class RefundResponse extends AbstractResponse { public function isSuccessful() { $data = $this->getData(); return isset($data['creditResult']) && $data['creditResult']; } } PK ! Ə C C 8 vendor/xown/omnipay-epay/src/Message/CaptureResponse.phpnu �[��� <?php namespace Omnipay\Epay\Message; use Omnipay\Common\Message\AbstractResponse; /** * Epay Capture Response */ class CaptureResponse extends AbstractResponse { public function isSuccessful() { $data = $this->getData(); return isset($data['captureResult']) && $data['captureResult']; } } PK ! ��a1? ? 7 vendor/xown/omnipay-epay/src/Message/DeleteResponse.phpnu �[��� <?php namespace Omnipay\Epay\Message; use Omnipay\Common\Message\AbstractResponse; /** * Epay Delete Response */ class DeleteResponse extends AbstractResponse { public function isSuccessful() { $data = $this->getData(); return isset($data['deleteResult']) && $data['deleteResult']; } } PK ! ����S S 6 vendor/xown/omnipay-epay/src/Message/RefundRequest.phpnu �[��� <?php namespace Omnipay\Epay\Message; use Omnipay\Common\Message\ResponseInterface; /** * Epay Refund Request */ class RefundRequest extends CaptureRequest { protected $endpoint = 'https://ssl.ditonlinebetalingssystem.dk/remote/payment.asmx'; public function getData() { $this->validate('merchantnumber', 'amount', 'transactionid'); $data = array(); foreach($this->getSupportedKeys() as $key) { $value = $this->parameters->get($key); if (!empty($value)) { $data[$key] = $value; } } /** Hack from SOAP description */ $data['pbsresponse'] = -1; $data['epayresponse'] = -1; return $data; } /** * @param mixed $data * @return CaptureResponse */ public function sendData($data) { $client = new \SoapClient($this->endpoint.'?WSDL'); $result = $client->credit($data); return $this->response = new RefundResponse($this, array( 'creditResult' => $result->creditResult, 'pbsResponse' => $result->pbsresponse, 'epayresponse' => $result->epayresponse, )); } /** * Send the request * * @return ResponseInterface */ public function send() { return $this->sendData($this->getData()); } } PK ! -ا~r r @ vendor/xown/omnipay-epay/src/Message/CompletePurchaseRequest.phpnu �[��� <?php namespace Omnipay\Epay\Message; use Omnipay\Common\Exception\InvalidResponseException; use Omnipay\Common\Message\ResponseInterface; /** * Epay Complete Purchase Request */ class CompletePurchaseRequest extends PurchaseRequest { public function getData() { if($this->getParameter('secret') && !$this->verifyHash($this->httpRequest->query->all())) { throw new InvalidResponseException('Invalid key'); } return $this->httpRequest->query->all(); } public function verifyHash($data) { $var = ''; foreach ($data as $key => $value) { if($key != "hash") { $var .= $value; } } $genstamp = md5($var . $this->getParameter('secret')); return isset($data['hash']) && $genstamp == $data['hash']; } public function sendData($data) { return $this->response = new CompletePurchaseResponse($this, $data); } /** * Send the request * * @return ResponseInterface */ public function send() { return $this->sendData($this->getData()); } } PK ! ��a ( vendor/xown/omnipay-epay/src/Gateway.phpnu �[��� <?php namespace Omnipay\Epay; use Omnipay\Common\AbstractGateway; use Omnipay\Epay\Message\CaptureRequest; use Omnipay\Epay\Message\CompletePurchaseRequest; use Omnipay\Epay\Message\DeleteRequest; use Omnipay\Epay\Message\PurchaseRequest; use Omnipay\Epay\Message\RefundRequest; /** * Epay Gateway */ class Gateway extends AbstractGateway { public function getName() { return 'Epay'; } /** * @link http://tech.epay.dk/en/payment-window-parameters * @return array */ public function getDefaultParameters() { return array( 'merchantnumber' => '', 'secret' => '', 'language' => '0', 'ownreceipt' => '1', 'timeout' => '', 'paymentcollection' => '1', 'lockpaymentcollection' => '1', 'windowid' => '1' ); } public function setTimeout($timeout) { $this->parameters->set('timeout', $timeout); } public function setMerchantnumber($merchantNumber) { $this->parameters->set('merchantnumber', (string) $merchantNumber); } public function setPaymenttype($paymenttype) { $this->parameters->set('paymenttype', $paymenttype); } public function setPaymentcollection($paymentcollection) { $this->parameters->set('paymentcollection', $paymentcollection); } public function setSecret($secret) { $this->parameters->set('secret', $secret); } public function setLanguage($language) { $this->parameters->set('language', $language); } public function setWindowstate($windowstate) { $this->parameters->set('windowstate', $windowstate); } public function setWindowid($windowId) { $this->parameters->set('windowid', $windowId); } public function setMobile($mobile) { $this->parameters->set('mobile', $mobile); } public function purchase(array $parameters = array()) { return $this->createRequest('\Omnipay\Epay\Message\PurchaseRequest', $parameters); } /** * @param array $parameters * @return CompletePurchaseRequest */ public function completePurchase(array $parameters = array()) { return $this->createRequest('\Omnipay\Epay\Message\CompletePurchaseRequest', $parameters); } /** * @param array $parameters * @return CaptureRequest */ public function capture(array $parameters = array()) { return $this->createRequest('\Omnipay\Epay\Message\CaptureRequest', $parameters); } /** * @param array $parameters * @return RefundRequest */ public function refund(array $parameters = array()) { return $this->createRequest('\Omnipay\Epay\Message\RefundRequest', $parameters); } /** * @param array $parameters * @return DeleteRequest */ public function delete(array $parameters = array()) { return $this->createRequest('\Omnipay\Epay\Message\DeleteRequest', $parameters); } } PK ! ņ��� � &