File manager - Edit - /home/opticamezl/www/newok/pin.zip
Back
PK ���\�5�d runtests.shnu &1i� #!/bin/sh # # Command line runner for unit tests for composer projects # (c) Del 2015 http://www.babel.com.au/ # No Rights Reserved # # # Clean up after any previous test runs # mkdir -p documents rm -rf documents/coverage-html-new rm -f documents/coverage.xml # # Run phpunit # vendor/bin/phpunit --coverage-html documents/coverage-html-new --coverage-clover documents/coverage.xml if [ -d documents/coverage-html-new ]; then rm -rf documents/coverage-html mv documents/coverage-html-new documents/coverage-html fi PK ���\�W� � .travis.ymlnu &1i� language: php php: - 5.3 - 5.4 - 5.5 - 5.6 - hhvm before_script: - composer install -n --dev --prefer-source script: vendor/bin/phpcs --standard=PSR2 src && vendor/bin/phpunit --coverage-text PK ���\�%'�r r makedoc.shnu &1i� #!/bin/sh # # Smart little documentation generator. # GPL/LGPL # (c) Del 2015 http://www.babel.com.au/ # APPNAME='Omnipay Pin Gateway Module' CMDFILE=apigen.cmd.$$ DESTDIR=./documents # # Find apigen, either in the path or as a local phar file # if [ -f apigen.phar ]; then APIGEN="php apigen.phar" else APIGEN=`which apigen` if [ ! -f "$APIGEN" ]; then # Search for phpdoc if apigen is not found. if [ -f phpDocumentor.phar ]; then PHPDOC="php phpDocumentor.phar" else PHPDOC=`which phpdoc` if [ ! -f "$PHPDOC" ]; then echo "Neither apigen nor phpdoc is installed in the path or locally, please install one of them" echo "see http://www.apigen.org/ or http://www.phpdoc.org/" exit 1 fi fi fi fi # # As of version 4 of apigen need to use the generate subcommand # if [ ! -z "$APIGEN" ]; then APIGEN="$APIGEN generate" fi # # Without any arguments this builds the entire system documentation, # making the cache file first if required. # if [ -z "$1" ]; then # # Check to see that the cache has been made. # if [ ! -f dirlist.cache ]; then echo "Making dirlist.cache file" $0 makecache fi # # Build the apigen/phpdoc command in a file. # if [ ! -z "$APIGEN" ]; then echo "$APIGEN --php --tree --title '$APPNAME API Documentation' --destination $DESTDIR/main \\" > $CMDFILE cat dirlist.cache | while read dir; do echo "--source $dir \\" >> $CMDFILE done echo "" >> $CMDFILE elif [ ! -z "$PHPDOC" ]; then echo "$PHPDOC --sourcecode --title '$APPNAME API Documentation' --target $DESTDIR/main --directory \\" > $CMDFILE cat dirlist.cache | while read dir; do echo "${dir},\\" >> $CMDFILE done echo "" >> $CMDFILE else "Neither apigen nor phpdoc are found, how did I get here?" exit 1 fi # # Run the apigen command # rm -rf $DESTDIR/main mkdir -p $DESTDIR/main . ./$CMDFILE /bin/rm -f ./$CMDFILE # # The "makecache" argument causes the script to just make the cache file # elif [ "$1" = "makecache" ]; then echo "Find application source directories" find src -name \*.php -print | \ ( while read file; do grep -q 'class' $file && dirname $file done ) | sort -u | \ grep -v -E 'config|docs|migrations|phpunit|test|Test|views|web' > dirlist.app echo "Find vendor source directories" find vendor -name \*.php -print | \ ( while read file; do grep -q 'class' $file && dirname $file done ) | sort -u | \ grep -v -E 'config|docs|migrations|phpunit|codesniffer|test|Test|views' > dirlist.vendor # # Filter out any vendor directories for which apigen fails # echo "Filter source directories" mkdir -p $DESTDIR/tmp cat dirlist.app dirlist.vendor | while read dir; do if [ ! -z "$APIGEN" ]; then $APIGEN --quiet --title "Test please ignore" \ --source $dir \ --destination $DESTDIR/tmp && ( echo "Including $dir" echo $dir >> dirlist.cache ) || ( echo "Excluding $dir" ) elif [ ! -z "$PHPDOC" ]; then $PHPDOC --quiet --title "Test please ignore" \ --directory $dir \ --target $DESTDIR/tmp && ( echo "Including $dir" echo $dir >> dirlist.cache ) || ( echo "Excluding $dir" ) fi done echo "Documentation cache dirlist.cache built OK" # # Clean up # /bin/rm -rf $DESTDIR/tmp fi 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 ���\�g1H H README.mdnu &1i� # Omnipay: Pin Payments **Pin Payments driver for the Omnipay PHP payment processing library** [](https://travis-ci.org/thephpleague/omnipay-pin) [](https://packagist.org/packages/omnipay/pin) [](https://packagist.org/packages/omnipay/pin) [Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP 5.3+. This package implements [Pin](https://pin.net.au/) 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/pin": "~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: * Pin For general usage instructions, please see the main [Omnipay](https://github.com/thephpleague/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/thephpleague/omnipay-pin/issues), or better yet, fork the library and submit a pull request. PK ���\a^2w w .gitignorenu &1i� /vendor composer.lock composer.phar phpunit.xml .directory /documents/ .idea/ dirlist.app dirlist.cache dirlist.vendor PK ���\���7� � composer.jsonnu &1i� { "name": "omnipay/pin", "type": "library", "description": "Pin Payments driver for the Omnipay payment processing library", "keywords": [ "gateway", "merchant", "omnipay", "pay", "payment", "pin" ], "homepage": "https://github.com/thephpleague/omnipay-pin", "license": "MIT", "authors": [ { "name": "Adrian Macneil", "email": "adrian@adrianmacneil.com" }, { "name": "Omnipay Contributors", "homepage": "https://github.com/thephpleague/omnipay-pin/contributors" } ], "autoload": { "psr-4": { "Omnipay\\Pin\\" : "src/" } }, "require": { "omnipay/common": "~2.0" }, "require-dev": { "omnipay/tests": "~2.0" }, "extra": { "branch-alias": { "dev-master": "2.0.x-dev" } } } PK ���\���� � # tests/Message/RefundRequestTest.phpnu &1i� <?php namespace Omnipay\Pin\Message; use Omnipay\Tests\TestCase; class RefundRequestTest extends TestCase { public function setUp() { $this->request = new RefundRequest($this->getHttpClient(), $this->getHttpRequest()); $this->request->setTransactionReference('ch_bZ3RhJnIUZ8HhfvH8CCvfA') ->setAmount('400.00'); } public function testSendSuccess() { $this->setMockHttpResponse('RefundSuccess.txt'); $response = $this->request->send(); $this->assertTrue($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertEquals('rf_ERCQy--Ay6o-NKGiUVcKKA', $response->getTransactionReference()); $this->assertSame('Pending', $response->getMessage()); } public function testSendError() { $this->setMockHttpResponse('RefundFailure.txt'); $response = $this->request->send(); $this->assertFalse($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertNull($response->getTransactionReference()); $this->assertSame('Refund amount is more than your available Pin Payments balance.', $response->getMessage()); } } PK ���\�/5 5 % tests/Message/CaptureResponseTest.phpnu &1i� <?php namespace Omnipay\Pin\Message; use Omnipay\Tests\TestCase; class CaptureResponseTest extends TestCase { public function testCaptureSuccess() { $httpResponse = $this->getMockHttpResponse('CaptureSuccess.txt'); $response = new CaptureResponse($this->getMockRequest(), $httpResponse->json()); $this->assertTrue($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertEquals('ch_lfUYEBK14zotCTykezJkfg', $response->getTransactionReference()); $this->assertTrue($response->getCaptured()); } public function testCaptureFailure() { $httpResponse = $this->getMockHttpResponse('CaptureFailure.txt'); $response = new CaptureResponse($this->getMockRequest(), $httpResponse->json()); $this->assertFalse($response->isSuccessful()); $this->assertFalse($response->isRedirect()); $this->assertSame('The authorisation has expired and can not be captured.', $response->getMessage()); $this->assertNull($response->getCaptured()); } } PK ���\�ٛB� � '