From ada8d21fba42ea26447fee1e53b190da64f47393 Mon Sep 17 00:00:00 2001 From: Sander Hagenaars Date: Wed, 6 Jul 2016 12:59:35 +0200 Subject: [PATCH 01/21] added way to set GA client id --- src/Gateway.php | 18 ++++++++++++++++++ src/Message/AbstractRequest.php | 17 +++++++++++++++++ 2 files changed, 35 insertions(+) diff --git a/src/Gateway.php b/src/Gateway.php index cfee9e2..6018e53 100755 --- a/src/Gateway.php +++ b/src/Gateway.php @@ -32,6 +32,7 @@ public function getDefaultParameters() 'privatekey' => '', 'language' => '', 'google_analytics_tracking_id' => '', + 'google_analytics_client_id' => '', 'description' => '', 'order_id' => '', 'payment_methods' => array() @@ -155,6 +156,23 @@ public function setGoogleAnalyticsTrackingID($value) return $this->setParameter('google_analytics_tracking_id', $value); } + /** + * @return string + */ + public function getGoogleAnalyticsClientID() + { + return $this->getParameter('google_analytics_client_id'); + } + + /** + * @param $value + * @return mixed + */ + public function setGoogleAnalyticsClientID($value) + { + return $this->setParameter('google_analytics_client_id', $value); + } + /** * @return string */ diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index a9271a5..b29414b 100755 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -227,6 +227,23 @@ public function setGoogleAnalyticsTrackingID($value) return $this->setParameter('google_analytics_tracking_id', $value); } + /** + * @return string + */ + public function getGoogleAnalyticsClientID() + { + return $this->getParameter('google_analytics_client_id'); + } + + /** + * @param $value + * @return mixed + */ + public function setGoogleAnalyticsClientID($value) + { + return $this->setParameter('google_analytics_client_id', $value); + } + /** * @return string */ From 9b05d20ceeebd54c1483026bd7ccd63fe6696448 Mon Sep 17 00:00:00 2001 From: sanderha Date: Wed, 6 Jul 2016 13:22:43 +0200 Subject: [PATCH 02/21] update readme --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index dc7be39..c34b6d4 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,14 @@ # omnipay-quickpay A work in progress Omnipay driver for the Quickpay payment processor. +##### Supported parameters +* type +* merchant +* agreement +* apikey +* privatekey +* language +* google_analytics_tracking_id +* google_analytics_client_id +* description +* order_id +* payment_methods From 5eb8bd9d407763decfca4ae6b945fb625dad2892 Mon Sep 17 00:00:00 2001 From: sanderha Date: Wed, 6 Jul 2016 13:25:48 +0200 Subject: [PATCH 03/21] Update README.md --- README.md | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c34b6d4..2ac50f3 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,15 @@ # omnipay-quickpay A work in progress Omnipay driver for the Quickpay payment processor. -##### Supported parameters +### Supported Omnipay functionality +* Authorize +* Purchase +* Capture +* Refund +* Void +* Notification +* Recurring (Not supported by Omnipay, but Quickpay has made this functionality very similar to regular payments) + +### Supported Quickpay parameters * type * merchant * agreement From ab9fb47a848656a4ee91079f1fbc78399b401174 Mon Sep 17 00:00:00 2001 From: Thomas Faurbye Nielsen Date: Thu, 14 Jul 2016 16:45:29 +0200 Subject: [PATCH 04/21] Add a method for using the link facility quickpay provides. http://tech.quickpay.net/payments/link/ --- .gitignore | 3 +- composer.json | 8 +- composer.lock | 1056 +++++++++++++++++ phpunit.xml.dist | 25 + src/Gateway.php | 741 ++++++------ src/Message/CompleteRequest.php | 58 +- src/Message/LinkRequest.php | 105 ++ src/Message/LinkResponse.php | 69 ++ src/Message/Notification.php | 2 +- src/Message/PurchaseRequest.php | 226 ++-- tests/GatewayTest.php | 112 ++ tests/Message/AuthorizeRequestTest.php | 40 + tests/Message/CompleteRequestTest.php | 78 ++ tests/Message/LinkRequestTest.php | 112 ++ tests/Message/NotificationTest.php | 127 ++ .../LinkRequestCreatePaymentLinkFailure.txt | 10 + .../LinkRequestCreatePaymentLinkSuccess.txt | 12 + .../Mock/LinkRequestCreatePaymentSuccess.txt | 13 + 18 files changed, 2299 insertions(+), 498 deletions(-) create mode 100644 composer.lock create mode 100644 phpunit.xml.dist create mode 100644 src/Message/LinkRequest.php create mode 100644 src/Message/LinkResponse.php create mode 100644 tests/GatewayTest.php create mode 100644 tests/Message/AuthorizeRequestTest.php create mode 100644 tests/Message/CompleteRequestTest.php create mode 100644 tests/Message/LinkRequestTest.php create mode 100644 tests/Message/NotificationTest.php create mode 100644 tests/Mock/LinkRequestCreatePaymentLinkFailure.txt create mode 100644 tests/Mock/LinkRequestCreatePaymentLinkSuccess.txt create mode 100644 tests/Mock/LinkRequestCreatePaymentSuccess.txt diff --git a/.gitignore b/.gitignore index 57f1cb2..ce0c956 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/.idea/ \ No newline at end of file +/.idea/ +vendor/ diff --git a/composer.json b/composer.json index 43db41a..41b18cb 100644 --- a/composer.json +++ b/composer.json @@ -21,5 +21,11 @@ "autoload": { "psr-4": { "Omnipay\\Quickpay\\" : "src/" } }, - "minimum-stability": "dev" + "minimum-stability": "dev", + "require": { + "omnipay/common": "~2.0" + }, + "require-dev": { + "omnipay/tests": "~2.0" + } } diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..26db357 --- /dev/null +++ b/composer.lock @@ -0,0 +1,1056 @@ +{ + "_readme": [ + "This file locks the dependencies of your project to a known state", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "This file is @generated automatically" + ], + "hash": "e7d505d8648456964b3528bbc2776fbf", + "content-hash": "b522cc874142165d1584bedc6e799fe4", + "packages": [ + { + "name": "guzzle/guzzle", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle3.git", + "reference": "b3f5050cb6270c7a728a0b74ac2de50a262b3e02" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/b3f5050cb6270c7a728a0b74ac2de50a262b3e02", + "reference": "b3f5050cb6270c7a728a0b74ac2de50a262b3e02", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "php": ">=5.3.3", + "symfony/event-dispatcher": "~2.1" + }, + "replace": { + "guzzle/batch": "self.version", + "guzzle/cache": "self.version", + "guzzle/common": "self.version", + "guzzle/http": "self.version", + "guzzle/inflection": "self.version", + "guzzle/iterator": "self.version", + "guzzle/log": "self.version", + "guzzle/parser": "self.version", + "guzzle/plugin": "self.version", + "guzzle/plugin-async": "self.version", + "guzzle/plugin-backoff": "self.version", + "guzzle/plugin-cache": "self.version", + "guzzle/plugin-cookie": "self.version", + "guzzle/plugin-curlauth": "self.version", + "guzzle/plugin-error-response": "self.version", + "guzzle/plugin-history": "self.version", + "guzzle/plugin-log": "self.version", + "guzzle/plugin-md5": "self.version", + "guzzle/plugin-mock": "self.version", + "guzzle/plugin-oauth": "self.version", + "guzzle/service": "self.version", + "guzzle/stream": "self.version" + }, + "require-dev": { + "doctrine/cache": "~1.3", + "monolog/monolog": "~1.0", + "phpunit/phpunit": "3.7.*", + "psr/log": "~1.0", + "symfony/class-loader": "~2.1", + "zendframework/zend-cache": "2.*,<2.3", + "zendframework/zend-log": "2.*,<2.3" + }, + "suggest": { + "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.9-dev" + } + }, + "autoload": { + "psr-0": { + "Guzzle": "src/", + "Guzzle\\Tests": "tests/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Guzzle Community", + "homepage": "https://github.com/guzzle/guzzle/contributors" + } + ], + "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "abandoned": "guzzlehttp/guzzle", + "time": "2015-04-29 17:06:53" + }, + { + "name": "omnipay/common", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/omnipay-common.git", + "reference": "731386e54688405a475d6dd43cd6397728cd709e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/omnipay-common/zipball/731386e54688405a475d6dd43cd6397728cd709e", + "reference": "731386e54688405a475d6dd43cd6397728cd709e", + "shasum": "" + }, + "require": { + "guzzle/guzzle": "~3.9", + "php": ">=5.3.2", + "symfony/http-foundation": "~2.1|~3.0" + }, + "require-dev": { + "omnipay/tests": "~2.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.5.x-dev" + }, + "gateways": [ + "AuthorizeNet_AIM", + "AuthorizeNet_SIM", + "Buckaroo_CreditCard", + "Buckaroo_Ideal", + "Buckaroo_PayPal", + "CardSave", + "Coinbase", + "Dummy", + "Eway_Rapid", + "FirstData_Connect", + "GoCardless", + "Manual", + "Migs_ThreeParty", + "Migs_TwoParty", + "Mollie", + "MultiSafepay", + "Netaxept", + "NetBanx", + "PayFast", + "Payflow_Pro", + "PaymentExpress_PxPay", + "PaymentExpress_PxPost", + "PayPal_Express", + "PayPal_Pro", + "Pin", + "SagePay_Direct", + "SagePay_Server", + "SecurePay_DirectPost", + "Stripe", + "TargetPay_Directebanking", + "TargetPay_Ideal", + "TargetPay_Mrcash", + "WorldPay" + ] + }, + "autoload": { + "psr-0": { + "Omnipay\\Common\\": "src/" + }, + "classmap": [ + "src/Omnipay/Omnipay.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Adrian Macneil", + "email": "adrian@adrianmacneil.com" + }, + { + "name": "Omnipay Contributors", + "homepage": "https://github.com/thephpleague/omnipay-common/contributors" + } + ], + "description": "Common components for Omnipay payment processing library", + "homepage": "https://github.com/thephpleague/omnipay-common", + "keywords": [ + "gateway", + "merchant", + "omnipay", + "pay", + "payment", + "purchase" + ], + "time": "2016-07-07 09:52:09" + }, + { + "name": "symfony/event-dispatcher", + "version": "2.8.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/event-dispatcher.git", + "reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b180b70439dca70049b6b9b7e21d75e6e5d7aca9", + "reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "require-dev": { + "psr/log": "~1.0", + "symfony/config": "~2.0,>=2.0.5|~3.0.0", + "symfony/dependency-injection": "~2.6|~3.0.0", + "symfony/expression-language": "~2.6|~3.0.0", + "symfony/stopwatch": "~2.3|~3.0.0" + }, + "suggest": { + "symfony/dependency-injection": "", + "symfony/http-kernel": "" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\EventDispatcher\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony EventDispatcher Component", + "homepage": "https://symfony.com", + "time": "2016-06-29 05:29:29" + }, + { + "name": "symfony/http-foundation", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "1c9b7deebc55aed2d36c05399b22129522ec4ca2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1c9b7deebc55aed2d36c05399b22129522ec4ca2", + "reference": "1c9b7deebc55aed2d36c05399b22129522ec4ca2", + "shasum": "" + }, + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.1" + }, + "require-dev": { + "symfony/expression-language": "~2.8|~3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2016-07-10 09:37:41" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8a6bdec191138e01c92ae026e5aacb7b3e66267d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8a6bdec191138e01c92ae026e5aacb7b3e66267d", + "reference": "8a6bdec191138e01c92ae026e5aacb7b3e66267d", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2016-06-29 14:58:48" + } + ], + "packages-dev": [ + { + "name": "hamcrest/hamcrest-php", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "b72949ccf2f640e7de66ff7dd92d83f577ce782e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b72949ccf2f640e7de66ff7dd92d83f577ce782e", + "reference": "b72949ccf2f640e7de66ff7dd92d83f577ce782e", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "1.3.3", + "phpunit/phpunit": "~4.0", + "satooshi/php-coveralls": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ], + "files": [ + "hamcrest/Hamcrest.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "time": "2016-01-19 12:08:55" + }, + { + "name": "mockery/mockery", + "version": "0.9.x-dev", + "source": { + "type": "git", + "url": "https://github.com/padraic/mockery.git", + "reference": "0f3617e31907c2f5a061cb2e652596449ddd54f7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/padraic/mockery/zipball/0f3617e31907c2f5a061cb2e652596449ddd54f7", + "reference": "0f3617e31907c2f5a061cb2e652596449ddd54f7", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "~1.1", + "lib-pcre": ">=7.0", + "php": ">=5.3.2" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "0.9.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", + "homepage": "http://github.com/padraic/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "time": "2016-07-14 08:27:13" + }, + { + "name": "omnipay/tests", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/omnipay-tests.git", + "reference": "137fdeaa8ef449c88ced15a50e02821732e7a125" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/omnipay-tests/zipball/137fdeaa8ef449c88ced15a50e02821732e7a125", + "reference": "137fdeaa8ef449c88ced15a50e02821732e7a125", + "shasum": "" + }, + "require": { + "guzzle/plugin-mock": "~3.1", + "mockery/mockery": "~0.8", + "phpunit/phpunit": "~3.7.0", + "squizlabs/php_codesniffer": "~1.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0.x-dev" + } + }, + "autoload": { + "psr-0": { + "Omnipay\\Tests\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Adrian Macneil", + "email": "adrian@adrianmacneil.com" + }, + { + "name": "Omnipay Contributors", + "homepage": "https://github.com/thephpleague/omnipay-tests/contributors" + } + ], + "description": "Testing components for Omnipay payment processing library", + "homepage": "https://github.com/thephpleague/omnipay-tests", + "keywords": [ + "gateway", + "merchant", + "omnipay", + "pay", + "payment", + "purchase" + ], + "time": "2016-07-07 09:35:23" + }, + { + "name": "phpunit/php-code-coverage", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b", + "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-file-iterator": ">=1.3.0@stable", + "phpunit/php-text-template": ">=1.2.0@stable", + "phpunit/php-token-stream": ">=1.1.3,<1.3.0" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*@dev" + }, + "suggest": { + "ext-dom": "*", + "ext-xdebug": ">=2.0.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2014-09-02 10:13:14" + }, + { + "name": "phpunit/php-file-iterator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2015-06-21 13:08:43" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21 13:50:34" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", + "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "require-dev": { + "phpunit/phpunit": "~4|~5" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2016-05-12 18:03:57" + }, + { + "name": "phpunit/php-token-stream", + "version": "1.2.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32", + "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "classmap": [ + "PHP/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "time": "2014-03-03 05:10:30" + }, + { + "name": "phpunit/phpunit", + "version": "3.7.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/38709dc22d519a3d1be46849868aa2ddf822bcf6", + "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6", + "shasum": "" + }, + "require": { + "ext-ctype": "*", + "ext-dom": "*", + "ext-json": "*", + "ext-pcre": "*", + "ext-reflection": "*", + "ext-spl": "*", + "php": ">=5.3.3", + "phpunit/php-code-coverage": "~1.2", + "phpunit/php-file-iterator": "~1.3", + "phpunit/php-text-template": "~1.1", + "phpunit/php-timer": "~1.0", + "phpunit/phpunit-mock-objects": "~1.2", + "symfony/yaml": "~2.0" + }, + "require-dev": { + "pear-pear.php.net/pear": "1.9.4" + }, + "suggest": { + "phpunit/php-invoker": "~1.1" + }, + "bin": [ + "composer/bin/phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.7.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "", + "../../symfony/yaml/" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "http://www.phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2014-10-17 09:04:17" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "1.2.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "c39c4511c3b007539eb170c32cbc2af49a07351a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c39c4511c3b007539eb170c32cbc2af49a07351a", + "reference": "c39c4511c3b007539eb170c32cbc2af49a07351a", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "phpunit/php-text-template": ">=1.1.1@stable" + }, + "require-dev": { + "phpunit/phpunit": "3.7.*@dev" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2.x-dev" + } + }, + "autoload": { + "classmap": [ + "PHPUnit/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "include-path": [ + "" + ], + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "time": "2014-02-16 12:43:56" + }, + { + "name": "squizlabs/php_codesniffer", + "version": "1.5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", + "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6f3e42d311b882b25b4d409d23a289f4d3b803d5", + "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": ">=5.1.2" + }, + "suggest": { + "phpunit/php-timer": "dev-master" + }, + "bin": [ + "scripts/phpcs" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-phpcs-fixer": "2.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "CodeSniffer.php", + "CodeSniffer/CLI.php", + "CodeSniffer/Exception.php", + "CodeSniffer/File.php", + "CodeSniffer/Report.php", + "CodeSniffer/Reporting.php", + "CodeSniffer/Sniff.php", + "CodeSniffer/Tokens.php", + "CodeSniffer/Reports/", + "CodeSniffer/CommentParser/", + "CodeSniffer/Tokenizers/", + "CodeSniffer/DocGenerators/", + "CodeSniffer/Standards/AbstractPatternSniff.php", + "CodeSniffer/Standards/AbstractScopeSniff.php", + "CodeSniffer/Standards/AbstractVariableSniff.php", + "CodeSniffer/Standards/IncorrectPatternException.php", + "CodeSniffer/Standards/Generic/Sniffs/", + "CodeSniffer/Standards/MySource/Sniffs/", + "CodeSniffer/Standards/PEAR/Sniffs/", + "CodeSniffer/Standards/PSR1/Sniffs/", + "CodeSniffer/Standards/PSR2/Sniffs/", + "CodeSniffer/Standards/Squiz/Sniffs/", + "CodeSniffer/Standards/Zend/Sniffs/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Greg Sherwood", + "role": "lead" + } + ], + "description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", + "homepage": "http://www.squizlabs.com/php-codesniffer", + "keywords": [ + "phpcs", + "standards" + ], + "time": "2014-12-04 22:32:15" + }, + { + "name": "symfony/yaml", + "version": "2.8.x-dev", + "source": { + "type": "git", + "url": "https://github.com/symfony/yaml.git", + "reference": "b57a8d1b316b6aaf6dc77852fed4ddb8adac77a7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/yaml/zipball/b57a8d1b316b6aaf6dc77852fed4ddb8adac77a7", + "reference": "b57a8d1b316b6aaf6dc77852fed4ddb8adac77a7", + "shasum": "" + }, + "require": { + "php": ">=5.3.9" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.8-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\Yaml\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony Yaml Component", + "homepage": "https://symfony.com", + "time": "2016-07-01 06:55:04" + } + ], + "aliases": [], + "minimum-stability": "dev", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +} diff --git a/phpunit.xml.dist b/phpunit.xml.dist new file mode 100644 index 0000000..a35b736 --- /dev/null +++ b/phpunit.xml.dist @@ -0,0 +1,25 @@ + + + + + ./tests/ + + + + + + + + ./src + + + diff --git a/src/Gateway.php b/src/Gateway.php index 6018e53..070e372 100755 --- a/src/Gateway.php +++ b/src/Gateway.php @@ -10,373 +10,380 @@ */ class Gateway extends AbstractGateway { - /** - * @return string - */ - public function getName() - { - return 'Quickpay'; - } - - /** - * @return array - */ - public function getDefaultParameters() - { - parent::getDefaultParameters(); - return array( - 'type' => '', - 'merchant' => '', - 'agreement' => '', - 'apikey' => '', - 'privatekey' => '', - 'language' => '', - 'google_analytics_tracking_id' => '', - 'google_analytics_client_id' => '', - 'description' => '', - 'order_id' => '', - 'payment_methods' => array() - ); - } - - /** - * @return array - */ - public function getPaymentMethods(){ - return $this->getParameter('payment_methods'); - } - - /** - * @param array $value - * @return mixed - */ - public function setPaymentMethods($value = array()){ - return $this->setParameter('payment_methods', $value); - } - - /** - * @return int - */ - public function getMerchant() - { - return $this->getParameter('merchant'); - } - - /** - * @param $value - * @return mixed - */ - public function setMerchant($value) - { - return $this->setParameter('merchant', $value); - } - - /** - * @return int - */ - public function getAgreement() - { - return $this->getParameter('agreement'); - } - - /** - * @param $value - * @return mixed - */ - public function setAgreement($value) - { - return $this->setParameter('agreement', $value); - } - - /** - * @param $value - * @return mixed - */ - public function setApikey($value) - { - return $this->setParameter('apikey', $value); - } - - /** - * @return string - */ - public function getApikey() - { - return $this->getParameter('apikey'); - } - - /** - * @param $value - * @return mixed - */ - public function setPrivatekey($value) - { - return $this->setParameter('privatekey', $value); - } - - /** - * @return string - */ - public function getPrivatekey() - { - return $this->getParameter('privatekey'); - } - - /** - * @return string - */ - public function getLanguage() - { - return $this->getParameter('language'); - } - - /** - * @param $value - * @return mixed - */ - public function setLanguage($value) - { - return $this->setParameter('language', $value); - } - - /** - * @return string - */ - public function getGoogleAnalyticsTrackingID() - { - return $this->getParameter('google_analytics_tracking_id'); - } - - /** - * @param $value - * @return mixed - */ - public function setGoogleAnalyticsTrackingID($value) - { - return $this->setParameter('google_analytics_tracking_id', $value); - } - - /** - * @return string - */ - public function getGoogleAnalyticsClientID() - { - return $this->getParameter('google_analytics_client_id'); - } - - /** - * @param $value - * @return mixed - */ - public function setGoogleAnalyticsClientID($value) - { - return $this->setParameter('google_analytics_client_id', $value); - } - - /** - * @return string - */ - public function getType() - { - return $this->getParameter('type'); - } - - /** - * @param $value - * @return mixed - */ - public function setType($value) - { - return $this->setParameter('type', $value); - } - - /** - * @return string - */ - public function getDescription() - { - return $this->getParameter('description'); - } - - /** - * @param $value - * @return mixed - */ - public function setDescription($value) - { - return $this->setParameter('description', $value); - } - - /** - * @return string - */ - public function getOrderID() - { - return $this->getParameter('order_id'); - } - - /** - * @param $value - * @return mixed - */ - public function setOrderID($value) - { - return $this->setParameter('order_id', $value); - } - - /** - * Start an authorize request - * - * @param array $parameters array of options - * @return \Omnipay\Quickpay\Message\AuthorizeRequest - */ - public function authorize(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\AuthorizeRequest', $parameters); - } - - /** - * Start a purchase request - * - * @param array $parameters array of options - * @return \Omnipay\Quickpay\Message\PurchaseRequest - */ - public function purchase(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\PurchaseRequest', $parameters); - } - - /** - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CaptureRequest - */ - public function capture(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\CaptureRequest', $parameters); - } - - /** - * @param array $parameters - * @return \Omnipay\Quickpay\Message\VoidRequest - */ - public function void(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\VoidRequest', $parameters); - } - - /** - * @param array $parameters - * @return \Omnipay\Quickpay\Message\RefundRequest - */ - public function refund(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\RefundRequest', $parameters); - } - - /** - * @param array $parameters - * @return \Omnipay\Quickpay\Message\RefundRequest - */ - public function recurring(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\RecurringRequest', $parameters); - } - - /** - * Is used for callbacks coming in to the system - * notify will verify these callbacks and eventually return the body of the callback to the app - * @param array $parameters - * @return \Omnipay\Quickpay\Message\NotifyRequest - */ - public function notify(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\NotifyRequest', $parameters); - } - - /** - * Complete a purchase - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completePurchase(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * Complete an authorization - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeAuthorize(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * A complete request - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeRequest(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\CompleteRequest', $parameters); - } - - /** - * Complete capture - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeCapture(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * Complete cancel - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeVoid(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * Complete refund - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeRefund(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * Complete recurring - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeRecurring(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * @return Notification - */ - public function acceptNotification() - { - return new Notification($this->httpRequest, $this->getPrivatekey()); - } + /** + * @return string + */ + public function getName() + { + return 'Quickpay'; + } + + /** + * @return array + */ + public function getDefaultParameters() + { + parent::getDefaultParameters(); + return array( + 'type' => '', + 'merchant' => '', + 'agreement' => '', + 'apikey' => '', + 'privatekey' => '', + 'language' => '', + 'google_analytics_tracking_id' => '', + 'google_analytics_client_id' => '', + 'description' => '', + 'order_id' => '', + 'payment_methods' => array() + ); + } + + /** + * @return array + */ + public function getPaymentMethods() + { + return $this->getParameter('payment_methods'); + } + + /** + * @param array $value + * @return mixed + */ + public function setPaymentMethods($value = array()) + { + return $this->setParameter('payment_methods', $value); + } + + /** + * @return int + */ + public function getMerchant() + { + return $this->getParameter('merchant'); + } + + /** + * @param $value + * @return mixed + */ + public function setMerchant($value) + { + return $this->setParameter('merchant', $value); + } + + /** + * @return int + */ + public function getAgreement() + { + return $this->getParameter('agreement'); + } + + /** + * @param $value + * @return mixed + */ + public function setAgreement($value) + { + return $this->setParameter('agreement', $value); + } + + /** + * @param $value + * @return mixed + */ + public function setApikey($value) + { + return $this->setParameter('apikey', $value); + } + + /** + * @return string + */ + public function getApikey() + { + return $this->getParameter('apikey'); + } + + /** + * @param $value + * @return mixed + */ + public function setPrivatekey($value) + { + return $this->setParameter('privatekey', $value); + } + + /** + * @return string + */ + public function getPrivatekey() + { + return $this->getParameter('privatekey'); + } + + /** + * @return string + */ + public function getLanguage() + { + return $this->getParameter('language'); + } + + /** + * @param $value + * @return mixed + */ + public function setLanguage($value) + { + return $this->setParameter('language', $value); + } + + /** + * @return string + */ + public function getGoogleAnalyticsTrackingID() + { + return $this->getParameter('google_analytics_tracking_id'); + } + + /** + * @param $value + * @return mixed + */ + public function setGoogleAnalyticsTrackingID($value) + { + return $this->setParameter('google_analytics_tracking_id', $value); + } + + /** + * @return string + */ + public function getGoogleAnalyticsClientID() + { + return $this->getParameter('google_analytics_client_id'); + } + + /** + * @param $value + * @return mixed + */ + public function setGoogleAnalyticsClientID($value) + { + return $this->setParameter('google_analytics_client_id', $value); + } + + /** + * @return string + */ + public function getType() + { + return $this->getParameter('type'); + } + + /** + * @param $value + * @return mixed + */ + public function setType($value) + { + return $this->setParameter('type', $value); + } + + /** + * @return string + */ + public function getDescription() + { + return $this->getParameter('description'); + } + + /** + * @param $value + * @return mixed + */ + public function setDescription($value) + { + return $this->setParameter('description', $value); + } + + /** + * @return string + */ + public function getOrderID() + { + return $this->getParameter('order_id'); + } + + /** + * @param $value + * @return mixed + */ + public function setOrderID($value) + { + return $this->setParameter('order_id', $value); + } + + /** + * Start an authorize request + * + * @param array $parameters array of options + * @return \Omnipay\Quickpay\Message\AuthorizeRequest + */ + public function authorize(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\AuthorizeRequest', $parameters); + } + + /** + * Start a purchase request + * + * @param array $parameters array of options + * @return \Omnipay\Quickpay\Message\PurchaseRequest + */ + public function purchase(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\PurchaseRequest', $parameters); + } + + /** + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CaptureRequest + */ + public function capture(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\CaptureRequest', $parameters); + } + + /** + * @param array $parameters + * @return \Omnipay\Quickpay\Message\VoidRequest + */ + public function void(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\VoidRequest', $parameters); + } + + /** + * @param array $parameters + * @return \Omnipay\Quickpay\Message\RefundRequest + */ + public function refund(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\RefundRequest', $parameters); + } + + /** + * @param array $parameters + * @return \Omnipay\Quickpay\Message\RefundRequest + */ + public function recurring(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\RecurringRequest', $parameters); + } + + /** + * Is used for callbacks coming in to the system + * notify will verify these callbacks and eventually return the body of the callback to the app + * @param array $parameters + * @return \Omnipay\Quickpay\Message\NotifyRequest + */ + public function notify(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\NotifyRequest', $parameters); + } + + /** + * Complete a purchase + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completePurchase(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * Complete an authorization + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeAuthorize(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * A complete request + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeRequest(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\CompleteRequest', $parameters); + } + + /** + * Complete capture + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeCapture(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * Complete cancel + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeVoid(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * Complete refund + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeRefund(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * Complete recurring + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeRecurring(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * @return Notification + */ + public function acceptNotification() + { + return new Notification($this->httpRequest, $this->getPrivatekey()); + } + + public function link(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\LinkRequest', $parameters); + } } diff --git a/src/Message/CompleteRequest.php b/src/Message/CompleteRequest.php index e16d6cb..39da000 100755 --- a/src/Message/CompleteRequest.php +++ b/src/Message/CompleteRequest.php @@ -10,30 +10,38 @@ */ class CompleteRequest extends AbstractRequest { - public function getData() - { - $data = $this->httpRequest->query->all(); - - // if its the notifyUrl (callback) being handled and not returnUrl - if($this->httpRequest->headers->get('Content-Type') == "application/json"){ - $data = $this->httpRequest->getContent(); - - $header_checksum = $this->httpRequest->headers->get('Quickpay-Checksum-Sha256'); - // validate with accounts private key. - $our_checksum = hash_hmac("sha256", $this->httpRequest->getContent(), $this->getPrivateKey()); - if ($our_checksum != $header_checksum) { - throw new InvalidResponseException; - } - } - - return $data; - } - - public function sendData($data) - { - return $this->response = new Response($this, $data); - } - - public function getHttpMethod(){} + public function getData() + { + $data = $this->httpRequest->query->all(); + + // if its the notifyUrl (callback) being handled and not returnUrl + if ($this->httpRequest->headers->get('Content-Type') == "application/json") { + $data = $this->httpRequest->getContent(); + + $header_checksum = $this->httpRequest->headers->get('Quickpay-Checksum-Sha256'); + // validate with accounts private key. + $our_checksum = hash_hmac("sha256", $this->httpRequest->getContent(), $this->getPrivateKey()); + if ($our_checksum != $header_checksum) { + throw new InvalidResponseException; + } + } + + return $data; + } + + /** + * @codeCoverageIgnore + */ + public function sendData($data) + { + return $this->response = new Response($this, $data); + } + + /** + * @codeCoverageIgnore + */ + public function getHttpMethod() + { + } } diff --git a/src/Message/LinkRequest.php b/src/Message/LinkRequest.php new file mode 100644 index 0000000..5dd9c6b --- /dev/null +++ b/src/Message/LinkRequest.php @@ -0,0 +1,105 @@ + 24) { + throw new InvalidRequestException('transactionId has a max length of 24'); + } + return parent::setTransactionId($value); + } + + /** + * @return array + */ + public function getQuickpayParams() + { + $params = array( + 'version' => 'v10', + 'agreement_id' => $this->getAgreement(), + 'order_id' => $this->getTransactionId(), + 'amount' => $this->getAmountInteger(), + 'currency' => $this->getCurrency(), + 'continue_url' => $this->getReturnUrl(), + 'cancel_url' => $this->getCancelUrl(), + 'callback_url' => $this->getNotifyUrl(), + 'language' => $this->getLanguage(), + 'google_analytics_tracking_id' => $this->getGoogleAnalyticsTrackingID(), + 'google_analytics_client_id' => $this->getGoogleAnalyticsClientID(), + 'auto_capture' => false, + 'payment_methods' => $this->getPaymentMethods() + ); + + + return $params; + } + + public function getData() + { + $this->validate('apikey', 'agreement', 'amount', 'transactionId', 'currency'); + + return $this->getQuickpayParams(); + } + + + public function send() + { + $fullData = $this->getData(); + $reference = $this->getTransactionReference(); + + if (!$reference) { + $url = $this->getEndPoint() . '/' . $this->getTypeOfRequest() . '/'; + $data = [ + 'order_id' => $fullData['order_id'], + 'currency' => $fullData['currency'], + ]; + + $httpRequest = $this->httpClient->createRequest('POST', $url, null, $data) + ->setHeader('Authorization', ' Basic ' . base64_encode(":" . $this->getApikey())) + ->setHeader('Accept-Version', ' v10') + ->setHeader('QuickPay-Callback-Url', $this->getNotifyUrl()); + try { + $httpResponse = $httpRequest->send(); + } catch (ClientErrorResponseException $e) { + $httpResponse = $e->getResponse(); + } + $body = $httpResponse->getBody(true); + $response = json_decode($body, true); + if (array_key_exists('id', $response)) { + $reference = $response['id']; + } else { + return new LinkResponse($this, $body); + } + } + unset($fullData['order_id']); + unset($fullData['currency']); + + $url = $this->getEndPoint() . '/' . $this->getTypeOfRequest() . '/' . $reference . '/link'; + + + $httpRequest = $this->httpClient->createRequest('PUT', $url, null, $fullData) + ->setHeader('Authorization', ' Basic ' . base64_encode(":" . $this->getApikey())) + ->setHeader('Accept-Version', ' v10') + ->setHeader('QuickPay-Callback-Url', $this->getNotifyUrl()); + + try { + $httpResponse = $httpRequest->send(); + } catch (ClientErrorResponseException $e) { + $httpResponse = $e->getResponse(); + } + + return new LinkResponse($this, $httpResponse->getBody(true), $reference); + + } + + +} diff --git a/src/Message/LinkResponse.php b/src/Message/LinkResponse.php new file mode 100644 index 0000000..a604c07 --- /dev/null +++ b/src/Message/LinkResponse.php @@ -0,0 +1,69 @@ +reference = $reference; + } + + public function isSuccessful() + { + $body = $this->getResponseBody(); + $body = json_decode($body); + if (isset($body->url)) { + return true; + } + return false; + } + + public function getTransactionReference() + { + return $this->reference; + } + + /** + * @return bool + * @codeCoverageIgnore + */ + public function isRedirect() + { + return true; + } + + public function getRedirectUrl() + { + $data = json_decode($this->getResponseBody()); + return $data->url; + } + + /** + * @return string + * @codeCoverageIgnore + */ + public function getRedirectMethod() + { + return 'GET'; + } + + /** + * @return array + * @codeCoverageIgnore + */ + public function getRedirectData() + { + return []; + } + + +} diff --git a/src/Message/Notification.php b/src/Message/Notification.php index 922481a..4fa8147 100755 --- a/src/Message/Notification.php +++ b/src/Message/Notification.php @@ -105,4 +105,4 @@ public function getMessage() } return ''; } -} \ No newline at end of file +} diff --git a/src/Message/PurchaseRequest.php b/src/Message/PurchaseRequest.php index a9c5f78..9329cb1 100755 --- a/src/Message/PurchaseRequest.php +++ b/src/Message/PurchaseRequest.php @@ -2,6 +2,8 @@ namespace Omnipay\Quickpay\Message; +use Omnipay\Common\Exception\InvalidRequestException; + /** * quickpay Purchase Request @@ -9,108 +11,126 @@ */ class PurchaseRequest extends AbstractRequest { - /** - * @var string - */ - protected $endpoint = 'https://payment.quickpay.net'; - - /** - * @return array - */ - public function getQuickpayParams() - { - $params = array( - "version" => "v10", - "merchant_id" => $this->getMerchant(), - "agreement_id" => $this->getAgreement(), - "order_id" => $this->getTransactionId(), - "amount" => $this->getAmountInteger(), - "currency" => $this->getCurrency(), - "continueurl" => $this->getReturnUrl(), - "cancelurl" => $this->getCancelUrl(), - "callbackurl" => $this->getNotifyUrl(), - "type" => $this->getType(), - "language" => $this->getLanguage(), - "google_analytics_tracking_id" => $this->getGoogleAnalyticsTrackingID(), - "autocapture" => 1, - "payment_methods" => $this->getPaymentMethods() - ); - - // it seems description param is not always allowed, depending on the Type set - if($this->getDescription() != ''){ - $params['description'] = $this->getDescription(); - } - - return $params; - } - - /** - * @return array|mixed - */ - public function getData() - { - // checks if any of these are empty, so we can throw an error without calling the API - $this->validate('merchant', 'agreement', 'amount', 'transactionId'); - - return $this->createChecksum($this->getQuickpayParams()); - } - - /** - * @param $data - * @return mixed - */ - public function createChecksum($data) - { - $data["checksum"] = $this->sign($data, $this->getApikey()); - return $data; - } - - // taken from quickpays PHP example on how to calculate checksum for the payment form - /** - * @param $params - * @param $api_key - * @return string - */ - public function sign($params, $api_key) - { - $flattened_params = $this->flatten_params($params); - ksort($flattened_params); - $base = implode(" ", $flattened_params); - - return hash_hmac("sha256", $base, $api_key); - } - - /** - * @param $obj - * @param array $result - * @param array $path - * @return array - */ - public function flatten_params($obj, $result = array(), $path = array()) - { - if (is_array($obj)) { - foreach ($obj as $k => $v) { - $result = array_merge($result, $this->flatten_params($v, $result, array_merge($path, array($k)))); - } - } else { - $result[implode("", array_map(function($p) { return "[{$p}]"; }, $path))] = $obj; - } - - return $result; - } - - /** - * @param $data - * @return mixed|PurchaseResponse - */ - public function sendData($data) - { - return $this->response = new PurchaseResponse($this, $data); - } - - /** - * @return string|void - */ - public function getHttpMethod(){} + /** + * @var string + */ + protected $endpoint = 'https://payment.quickpay.net'; + + /** + * @return array + */ + public function getQuickpayParams() + { + $params = array( + "version" => "v10", + "merchant_id" => $this->getMerchant(), + "agreement_id" => $this->getAgreement(), + "order_id" => $this->getTransactionId(), + "amount" => $this->getAmountInteger(), + "currency" => $this->getCurrency(), + "continueurl" => $this->getReturnUrl(), + "cancelurl" => $this->getCancelUrl(), + "callbackurl" => $this->getNotifyUrl(), + "language" => $this->getLanguage(), + "google_analytics_tracking_id" => $this->getGoogleAnalyticsTrackingID(), + "autocapture" => 1, + "payment_methods" => $this->getPaymentMethods() + ); + + // it seems description param is not always allowed, depending on the Type set + if ($this->getDescription() != '') { + $params['description'] = $this->getDescription(); + } + + return $params; + } + + public function setTransactionId($value) + { + $value = str_pad($value, 4, '0', STR_PAD_LEFT); + if (strlen($value) > 24) { + throw new InvalidRequestException('transactionId has a max length of 24'); + } + return parent::setTransactionId($value); + } + + /** + * @return array|mixed + */ + public function getData() + { + // checks if any of these are empty, so we can throw an error without calling the API + $this->validate('merchant', 'agreement', 'amount', 'transactionId'); + + return $this->createChecksum($this->getQuickpayParams()); + } + + /** + * @param $data + * @return mixed + */ + public function createChecksum($data) + { + $data["checksum"] = $this->sign($data, $this->getApikey()); + return $data; + } + + // taken from quickpays PHP example on how to calculate checksum for the payment form + /** + * @param $params + * @param $api_key + * @return string + */ + public function sign($params, $api_key) + { + $flattened_params = $this->flatten_params($params); + ksort($flattened_params); + $base = implode(" ", $flattened_params); + + return hash_hmac("sha256", $base, $api_key); + } + + /** + * @param $obj + * @param array $result + * @param array $path + * @return array + */ + public function flatten_params($obj, $result = array(), $path = array()) + { + if (is_array($obj)) { + foreach ($obj as $k => $v) { + $result = array_merge($result, $this->flatten_params($v, $result, array_merge($path, array($k)))); + } + } else { + $result[implode( + "", + array_map( + function ($p) { + return "[{$p}]"; + }, + $path + ) + )] = $obj; + } + + return $result; + } + + /** + * @param $data + * @return mixed|PurchaseResponse + */ + public function sendData($data) + { + return $this->response = new PurchaseResponse($this, $data); + } + + /** + * @return string|void + */ + public function getHttpMethod() + { + } } diff --git a/tests/GatewayTest.php b/tests/GatewayTest.php new file mode 100644 index 0000000..197659d --- /dev/null +++ b/tests/GatewayTest.php @@ -0,0 +1,112 @@ +gateway = new Gateway($this->getHttpClient(), $this->getHttpRequest()); + } + + public function testAuthorize() + { + $request = $this->gateway->authorize(array('amount' => '10.00')); + $this->assertInstanceOf('Omnipay\Quickpay\Message\AuthorizeRequest', $request); + $this->assertSame('10.00', $request->getAmount()); + } + + public function testCapture() + { + $request = $this->gateway->capture(array('amount' => '10.00')); + $this->assertInstanceOf('Omnipay\Quickpay\Message\CaptureRequest', $request); + $this->assertSame('10.00', $request->getAmount()); + $this->assertTrue(count($request->getData()) > 0); + } + + public function testPurchase() + { + $request = $this->gateway->purchase(array('amount' => '10.00')); + $this->assertInstanceOf('Omnipay\Quickpay\Message\PurchaseRequest', $request); + $this->assertSame('10.00', $request->getAmount()); + } + + public function testRefund() + { + $request = $this->gateway->refund(array('amount' => '10.00')); + $this->assertInstanceOf('Omnipay\Quickpay\Message\RefundRequest', $request); + $this->assertSame('10.00', $request->getAmount()); + } + + public function testVoid() + { + $request = $this->gateway->void(); + $this->assertInstanceOf('Omnipay\Quickpay\Message\VoidRequest', $request); + } + + public function testLink() + { + $request = $this->gateway->link(['amount' => '10.00']); + $this->assertInstanceOf('Omnipay\Quickpay\Message\LinkRequest', $request); + } + + public function testRecurring() + { + $request = $this->gateway->recurring(['amount' => 10.00]); + $this->assertInstanceOf('Omnipay\Quickpay\Message\RecurringRequest', $request); + } + + public function testNotify() + { + $request = $this->gateway->notify(['amount' => 10.00]); + $this->assertInstanceOf('Omnipay\Quickpay\Message\NotifyRequest', $request); + } + + public function testCompletePurchase() + { + $request = $this->gateway->completePurchase(['amount' => 10.00]); + $this->assertInstanceOf('Omnipay\Quickpay\Message\CompleteRequest', $request); + } + + public function testCompleteVoid() + { + $request = $this->gateway->completeVoid(['amount' => 10.00]); + $this->assertInstanceOf('Omnipay\Quickpay\Message\CompleteRequest', $request); + } + + public function testCompleteAuthorize() + { + $request = $this->gateway->completeAuthorize(['amount' => 10.00]); + $this->assertInstanceOf('Omnipay\Quickpay\Message\CompleteRequest', $request); + } + + public function testCompleteCapture() + { + $request = $this->gateway->completeCapture(['amount' => 10.00]); + $this->assertInstanceOf('Omnipay\Quickpay\Message\CompleteRequest', $request); + } + + public function testCompleteRefund() + { + $request = $this->gateway->completeRefund(['amount' => 10.00]); + $this->assertInstanceOf('Omnipay\Quickpay\Message\CompleteRequest', $request); + } + + public function testCompleteRecurring() + { + $request = $this->gateway->completeRecurring(['amount' => 10.00]); + $this->assertInstanceOf('Omnipay\Quickpay\Message\CompleteRequest', $request); + } + + public function testAcceptNotification() + { + $notification = $this->gateway->acceptNotification(); + $this->assertInstanceOf('Omnipay\Quickpay\Message\Notification', $notification); + } + +} diff --git a/tests/Message/AuthorizeRequestTest.php b/tests/Message/AuthorizeRequestTest.php new file mode 100644 index 0000000..928f480 --- /dev/null +++ b/tests/Message/AuthorizeRequestTest.php @@ -0,0 +1,40 @@ +request = new AuthorizeRequest($this->getHttpClient(), $this->getHttpRequest()); + } + + public function testGetData() + { + $this->request->initialize( + ['apikey' => 1, 'transactionId' => '10', 'agreement' => 2, 'amount' => 10.00, 'currency' => 'DKK'] + ); + $data = $this->request->getData(); + $fields = [ + 'version' => 'v10', + 'order_id' => '0010', + 'agreement_id' => 2, + 'amount' => '1000', + 'currency' => 'DKK', + 'autocapture' => 0, + + ]; + foreach ($fields as $key => $value) { + $this->assertEquals($value, $data[$key], 'Key: ' . $key . ' not found in the data'); + } + $this->assertTrue(strlen($data['order_id']) === 4); + } + +} diff --git a/tests/Message/CompleteRequestTest.php b/tests/Message/CompleteRequestTest.php new file mode 100644 index 0000000..d003d0d --- /dev/null +++ b/tests/Message/CompleteRequestTest.php @@ -0,0 +1,78 @@ +mockRequest = $this->getHttpRequest(); + $this->request = new CompleteRequest($this->getHttpClient(), $this->mockRequest); + } + + public function testGetData() + { + $this->request->initialize( + ['privateKey' => 1] + ); + $data = $this->request->getData(); + $this->assertTrue(is_array($data)); + $this->assertTrue(count($data) === 0); + } + + public function testGetDataWithContentTypeJson() + { + $this->mockRequest->initialize( + ['test' => 1], + [], + [], + [], + [], + [ + 'HTTP_CONTENT_TYPE' => 'application/json', + 'HTTP_QUICKPAY_CHECKSUM_SHA256' => '83ce13bda6523334daa14f33d1fc2adc98ff8b57c4df5be5d2f58b1c2c78fa1e' + ], + '[]' + ); + + $data = $this->request->getData(); + + $this->assertEquals('[]', $data); + } + + public function testGetDataWithContentTypeJsonWithInvalidSha() + { + $this->mockRequest->initialize( + ['test' => 1], + [], + [], + [], + [], + [ + 'HTTP_CONTENT_TYPE' => 'application/json', + 'HTTP_QUICKPAY_CHECKSUM_SHA256' => '83ce13dffa6523334daa14f33d1fc2adc98ff8b57c4df5be5d2f58b1c2c78fa1e' + ], + '[]' + ); + + try { + $this->request->getData(); + $this->fail('Expected an exception'); + } catch (InvalidResponseException $e) { + $this->assertEquals('Invalid response from payment gateway', $e->getMessage()); + } + + } + +} diff --git a/tests/Message/LinkRequestTest.php b/tests/Message/LinkRequestTest.php new file mode 100644 index 0000000..63f70ce --- /dev/null +++ b/tests/Message/LinkRequestTest.php @@ -0,0 +1,112 @@ +request = new LinkRequest($this->getHttpClient(), $this->getHttpRequest()); + } + + public function testGetData() + { + $this->request->initialize( + ['apikey' => 1, 'transactionId' => '10', 'agreement' => 2, 'amount' => 10.00, 'currency' => 'DKK'] + ); + $data = $this->request->getData(); + $fields = [ + 'version' => 'v10', + 'order_id' => '0010', + 'agreement_id' => 2, + 'amount' => '1000', + 'currency' => 'DKK' + ]; + foreach ($fields as $key => $value) { + $this->assertEquals($value, $data[$key], 'Key: ' . $key . ' not found in the data'); + } + $this->assertTrue(strlen($data['order_id']) === 4); + } + + public function testTransactionId() + { + try { + $this->request->initialize(['transactionId' => str_repeat('0', 25)]); + $this->fail('Expecting an exception'); + } catch (InvalidRequestException $e) { + $this->assertEquals('transactionId has a max length of 24', $e->getMessage()); + } + } + + public function testSendingALinkRequest() + { + $this->setMockHttpResponse(['LinkRequestCreatePaymentSuccess.txt', 'LinkRequestCreatePaymentLinkSuccess.txt']); + $this->request->initialize( + ['apikey' => 1, 'transactionId' => '10', 'agreement' => 2, 'amount' => 10.00, 'currency' => 'DKK'] + ); + $response = $this->request->send(); + $this->assertTrue($response->isSuccessful()); + $this->assertEquals('http://test.link', $response->getRedirectUrl()); + $this->assertEquals('GET', $response->getRedirectMethod()); + $this->assertEquals('123123123', $response->getTransactionReference()); + } + + public function testSendingALinkRequestWithAnAlreadyExistingTransactionReference() + { + $this->setMockHttpResponse(['LinkRequestCreatePaymentLinkSuccess.txt']); + $this->request->initialize( + [ + 'apikey' => 1, + 'transactionId' => '10', + 'agreement' => 2, + 'amount' => 10.00, + 'currency' => 'DKK', + 'transactionReference' => 123123123 + ] + ); + $response = $this->request->send(); + $this->assertTrue($response->isSuccessful()); + $this->assertEquals('http://test.link', $response->getRedirectUrl()); + $this->assertEquals('GET', $response->getRedirectMethod()); + $this->assertEquals('123123123', $response->getTransactionReference()); + } + + public function testSendingALinkRequestWithAnError() + { + $this->setMockHttpResponse(['LinkRequestCreatePaymentLinkFailure.txt']); + $this->request->initialize( + [ + 'apikey' => 1, + 'transactionId' => '10', + 'agreement' => 2, + 'amount' => 10.00, + 'currency' => 'DKK', + ] + ); + $response = $this->request->send(); + $this->assertFalse($response->isSuccessful()); + } + public function testSendingALinkRequestWithAnErrorOnTransaction() + { + $this->setMockHttpResponse(['LinkRequestCreatePaymentLinkFailure.txt']); + $this->request->initialize( + [ + 'apikey' => 1, + 'transactionId' => '10', + 'agreement' => 2, + 'amount' => 10.00, + 'currency' => 'DKK', + 'transactionReference' => 123123123 + ] + ); + $response = $this->request->send(); + $this->assertFalse($response->isSuccessful()); + } +} diff --git a/tests/Message/NotificationTest.php b/tests/Message/NotificationTest.php new file mode 100644 index 0000000..479b36a --- /dev/null +++ b/tests/Message/NotificationTest.php @@ -0,0 +1,127 @@ +request = $this->getHttpRequest(); + $this->notification = new Notification($this->request, '123'); + } + + public function testGetPrivateKey() + { + $this->assertEquals('123', $this->notification->getPrivateKey()); + $this->assertEquals('1234', $this->notification->setPrivateKey('1234')->getPrivateKey()); + } + + public function testGetDataWithContentTypeJson() + { + $this->generateContent( + [ + 'id' => 1, + 'order_id' => '0010', + 'operations' => [['qp_status_msg' => 'test', 'pending' => false, 'qp_status_code' => 20000]] + ] + ); + + $data = $this->notification->getMessage(); + $this->assertEquals('test', $data); + $this->assertEquals(1, $this->notification->getTransactionReference()); + $this->assertEquals(NotificationInterface::STATUS_COMPLETED, $this->notification->getTransactionStatus()); + } + + public function testGetDataWithContentTypeJsonStatusPending() + { + $this->generateContent( + [ + 'id' => 1, + 'order_id' => '0010', + 'operations' => [['qp_status_msg' => 'test', 'pending' => true]] + ] + ); + + $data = $this->notification->getMessage(); + $this->assertEquals('test', $data); + $this->assertEquals(1, $this->notification->getTransactionReference()); + $this->assertEquals(NotificationInterface::STATUS_PENDING, $this->notification->getTransactionStatus()); + } + + public function testGetDataWithContentTypeJsonStatusFailed() + { + $this->generateContent( + [ + 'id' => 1, + 'order_id' => '0010', + 'operations' => [['qp_status_msg' => 'test', 'pending' => false, 'qp_status_code' => -1]] + ] + ); + + $data = $this->notification->getMessage(); + $this->assertEquals('test', $data); + $this->assertEquals(1, $this->notification->getTransactionReference()); + $this->assertEquals(NotificationInterface::STATUS_FAILED, $this->notification->getTransactionStatus()); + } + + public function testGetDataWithContentTypeJsonWithInvalidSha() + { + $this->request->initialize( + ['test' => 1], + [], + [], + [], + [], + [ + 'HTTP_CONTENT_TYPE' => 'application/json', + 'HTTP_QUICKPAY_CHECKSUM_SHA256' => 'dasdasdasdasdas' + ], + '' + ); + + + try { + $this->notification->getData(); + $this->fail('Expected an exception'); + } catch (InvalidResponseException $e) { + $this->assertEquals('Invalid response from payment gateway', $e->getMessage()); + } + + } + + public function testNotificationOnInvalidRequest() + { + $this->assertEquals('', $this->notification->getMessage()); + $this->assertEquals(null, $this->notification->getTransactionReference()); + } + + private function generateContent($data) + { + $content = json_encode($data); + $this->request->initialize( + ['test' => 1], + [], + [], + [], + [], + [ + 'HTTP_CONTENT_TYPE' => 'application/json', + 'HTTP_QUICKPAY_CHECKSUM_SHA256' => hash_hmac("sha256", $content, '123') + ], + $content + ); + } + +} diff --git a/tests/Mock/LinkRequestCreatePaymentLinkFailure.txt b/tests/Mock/LinkRequestCreatePaymentLinkFailure.txt new file mode 100644 index 0000000..4fa3710 --- /dev/null +++ b/tests/Mock/LinkRequestCreatePaymentLinkFailure.txt @@ -0,0 +1,10 @@ +HTTP/1.1 403 Forbidden +Server: nginx +Date: Sun, 24 Jan 2016 22:29:41 GMT +Content-Type: application/json +Content-Length: 2 +Connection: keep-alive +Access-Control-Allow-Credentials: true +Cache-Control: no-cache, no-store + +{} diff --git a/tests/Mock/LinkRequestCreatePaymentLinkSuccess.txt b/tests/Mock/LinkRequestCreatePaymentLinkSuccess.txt new file mode 100644 index 0000000..9b6e542 --- /dev/null +++ b/tests/Mock/LinkRequestCreatePaymentLinkSuccess.txt @@ -0,0 +1,12 @@ +HTTP/1.1 201 Created +Server: nginx +Date: Sun, 24 Jan 2016 22:29:41 GMT +Content-Type: application/json +Content-Length: 31 +Connection: keep-alive +Access-Control-Allow-Credentials: true +Cache-Control: no-cache, no-store + +{ + "url": "http://test.link" +} diff --git a/tests/Mock/LinkRequestCreatePaymentSuccess.txt b/tests/Mock/LinkRequestCreatePaymentSuccess.txt new file mode 100644 index 0000000..0037e48 --- /dev/null +++ b/tests/Mock/LinkRequestCreatePaymentSuccess.txt @@ -0,0 +1,13 @@ +HTTP/1.1 201 Created +Server: nginx +Date: Sun, 24 Jan 2016 22:29:41 GMT +Content-Type: application/json +Content-Length: 43 +Connection: keep-alive +Access-Control-Allow-Credentials: true +Cache-Control: no-cache, no-store + +{ + "id": 123123123, + "order_id": "0010" +} From 5dac40dbed79732d5c4fa5625abc94bfa81872db Mon Sep 17 00:00:00 2001 From: Thomas Faurbye Nielsen Date: Fri, 15 Jul 2016 13:33:29 +0200 Subject: [PATCH 05/21] Re-adding the type parameter --- src/Message/PurchaseRequest.php | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Message/PurchaseRequest.php b/src/Message/PurchaseRequest.php index 9329cb1..1222276 100755 --- a/src/Message/PurchaseRequest.php +++ b/src/Message/PurchaseRequest.php @@ -34,6 +34,7 @@ public function getQuickpayParams() "language" => $this->getLanguage(), "google_analytics_tracking_id" => $this->getGoogleAnalyticsTrackingID(), "autocapture" => 1, + "type" => $this->getType(), "payment_methods" => $this->getPaymentMethods() ); From a8e84e49747dcf5092ad4a491ce2425bdc73eab3 Mon Sep 17 00:00:00 2001 From: Sander Hagenaars Date: Wed, 16 Nov 2016 11:06:04 +0100 Subject: [PATCH 06/21] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 2ac50f3..a2690b1 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # omnipay-quickpay -A work in progress Omnipay driver for the Quickpay payment processor. +An Omnipay driver for the Quickpay payment processor. ### Supported Omnipay functionality * Authorize * Purchase From e7326d249241a45849fb39129e89f5342f6fc0bc Mon Sep 17 00:00:00 2001 From: Sander Hagenaars Date: Wed, 16 Nov 2016 11:09:24 +0100 Subject: [PATCH 07/21] removed test_mode check in response. This is now a feature in quickpay backend --- src/Message/Response.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Message/Response.php b/src/Message/Response.php index 8da497b..50e326b 100755 --- a/src/Message/Response.php +++ b/src/Message/Response.php @@ -14,7 +14,7 @@ public function isSuccessful() if($this->getResponseBody()){ $response_body = json_decode($this->getResponseBody()); $data = end($response_body->operations); - if ($response_body->accepted && $data->qp_status_code=="20000" && $response_body->test_mode != true) { + if ($response_body->accepted && $data->qp_status_code=="20000") { return true; } } @@ -68,4 +68,4 @@ public function getMessage(){ } return null; } -} \ No newline at end of file +} From a7fc5ca28189cf07124c9712e32361e65df4ea4d Mon Sep 17 00:00:00 2001 From: Thomas Faurbye Nielsen Date: Wed, 14 Dec 2016 13:21:01 +0100 Subject: [PATCH 08/21] Allow for using the synchronized variable. (#5) * Allow for using the synchronized variable. * Make sure that Guzzle always returns a string --- src/Message/AbstractRequest.php | 613 ++++++++++++++------------ tests/Message/CompleteRequestTest.php | 42 ++ 2 files changed, 369 insertions(+), 286 deletions(-) diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index b29414b..5556f11 100755 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -8,290 +8,331 @@ abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest { - /** - * @var string - */ - protected $endpoint = 'https://api.quickpay.net/'; - - /** - * @var string - */ - private $apimethod = 'capture'; - - /** - * @return array - */ - public function getData() - { - $data = array( - 'id' => $this->getTransactionReference(), - 'amount' => $this->getAmountInteger() - ); - return $data; - } - - /** - * @return string - */ - public function getHttpMethod() - { - return 'POST'; - } - - /** - * @param $data - * @return mixed - */ - public function sendData($data) - { - // TODO this seems to break api actions... what to do - // prevent throwing exceptions for 4xx errors - //$this->httpClient->getEventDispatcher()->addListener( - // 'request.error', - // function ($event) { - // if ($event['response']->isClientError()) { - // $event->stopPropagation(); - // } - // } - //); - - $url = $this->getEndPoint() . $this->getTypeOfRequest() . '/' . $this->getTransactionReference() . '/' . $this->getApiMethod(); - - $httpRequest = $this->httpClient->createRequest( - $this->getHttpMethod(), - $url, - null, - $data - )->setHeader('Authorization', ' Basic '. base64_encode(":" . $this->getApikey())) - ->setHeader('Accept-Version', ' v10') - ->setHeader('QuickPay-Callback-Url', $this->getNotifyUrl()); - - - $httpResponse = $httpRequest->send(); - - return $this->response = new Response($this, $httpResponse->getBody()); - } - - /** - * @return mixed - */ - public function send() - { - return $this->sendData($this->getData()); - } - - public function getTypeOfRequest(){ - $type = 'payments'; - if($this->getType() == 'subscription'){ - $type = 'subscriptions'; - } - return $type; - } - - /** - * @param $value - * @return mixed - */ - public function setApiMethod($value){ - return $this->apimethod = $value; - } - - /** - * @return string - */ - public function getApiMethod(){ - return $this->apimethod; - } - - /** - * @return string - */ - public function getEndPoint(){ - return $this->endpoint; - } - - /** - * @return int - */ - public function getMerchant() - { - return $this->getParameter('merchant'); - } - - /** - * @param $value - * @return mixed - */ - public function setMerchant($value) - { - return $this->setParameter('merchant', $value); - } - - /** - * @param $value - * @return mixed - */ - public function setPrivatekey($value) - { - return $this->setParameter('privatekey', $value); - } - - /** - * @return string - */ - public function getPrivatekey() - { - return $this->getParameter('privatekey'); - } - - /** - * @return int - */ - public function getAgreement() - { - return $this->getParameter('agreement'); - } - - /** - * @param $value - * @return mixed - */ - public function setAgreement($value) - { - return $this->setParameter('agreement', $value); - } - - /** - * @param $value - * @return mixed - */ - public function setApikey($value) - { - return $this->setParameter('apikey', $value); - } - - /** - * @return string - */ - public function getApikey() - { - return $this->getParameter('apikey'); - } - - /** - * @return string - */ - public function getLanguage() - { - return $this->getParameter('language'); - } - - /** - * @param $value - * @return mixed - */ - public function setLanguage($value) - { - return $this->setParameter('language', $value); - } - - /** - * @return array - */ - public function getPaymentMethods(){ - return $this->getParameter('payment_methods'); - } - - /** - * @param array $value - * @return mixed - */ - public function setPaymentMethods($value = array()){ - return $this->setParameter('payment_methods', $value); - } - - /** - * @return string - */ - public function getGoogleAnalyticsTrackingID() - { - return $this->getParameter('google_analytics_tracking_id'); - } - /** - * - * @param $value - * @return mixed - */ - public function setGoogleAnalyticsTrackingID($value) - { - return $this->setParameter('google_analytics_tracking_id', $value); - } - - /** - * @return string - */ - public function getGoogleAnalyticsClientID() - { - return $this->getParameter('google_analytics_client_id'); - } - - /** - * @param $value - * @return mixed - */ - public function setGoogleAnalyticsClientID($value) - { - return $this->setParameter('google_analytics_client_id', $value); - } - - /** - * @return string - */ - public function getType() - { - return $this->getParameter('type'); - } - - /** - * @param $value - * @return mixed - */ - public function setType($value) - { - return $this->setParameter('type', $value); - } - - /** - * @return string - */ - public function getDescription() - { - return $this->getParameter('description'); - } - - /** - * @param $value - * @return mixed - */ - public function setDescription($value) - { - return $this->setParameter('description', $value); - } - - /** - * @return string - */ - public function getOrderID() - { - return $this->getParameter('order_id'); - } - - /** - * @param $value - * @return mixed - */ - public function setOrderID($value) - { - return $this->setParameter('order_id', $value); - } + /** + * @var string + */ + protected $endpoint = 'https://api.quickpay.net/'; + + /** + * @var string + */ + private $apimethod = 'capture'; + + /** + * @return string + */ + public function getUrl() + { + $url = $this->getEndPoint() . $this->getTypeOfRequest() . '/' . $this->getTransactionReference( + ) . '/' . $this->getApiMethod(); + if ($this->getSynchronized()) { + $url .= '?synchronized'; + return $url; + } + return $url; + } + + /** + * @return array + */ + public function getData() + { + $data = array( + 'id' => $this->getTransactionReference(), + 'amount' => $this->getAmountInteger() + ); + return $data; + } + + /** + * @return string + */ + public function getHttpMethod() + { + return 'POST'; + } + + /** + * @param $data + * @return mixed + */ + public function sendData($data) + { + // TODO this seems to break api actions... what to do + // prevent throwing exceptions for 4xx errors + //$this->httpClient->getEventDispatcher()->addListener( + // 'request.error', + // function ($event) { + // if ($event['response']->isClientError()) { + // $event->stopPropagation(); + // } + // } + //); + + $url = $this->getUrl(); + if (is_array($data) && array_key_exists('synchronized', $data)) { + unset($data['synchronized']); + } + $httpRequest = $this->httpClient->createRequest( + $this->getHttpMethod(), + $url, + null, + $data + )->setHeader('Authorization', ' Basic ' . base64_encode(":" . $this->getApikey())) + ->setHeader('Accept-Version', ' v10') + ->setHeader('QuickPay-Callback-Url', $this->getNotifyUrl()); + + + $httpResponse = $httpRequest->send(); + + return $this->response = new Response($this, $httpResponse->getBody(true)); + } + + /** + * @return mixed + */ + public function send() + { + return $this->sendData($this->getData()); + } + + public function getTypeOfRequest() + { + $type = 'payments'; + if ($this->getType() == 'subscription') { + $type = 'subscriptions'; + } + return $type; + } + + /** + * @param $value + * @return mixed + */ + public function setApiMethod($value) + { + $this->apimethod = $value; + return $this; + } + + /** + * @return string + */ + public function getApiMethod() + { + return $this->apimethod; + } + + /** + * @return string + */ + public function getEndPoint() + { + return $this->endpoint; + } + + /** + * @return int + */ + public function getMerchant() + { + return $this->getParameter('merchant'); + } + + /** + * @param $value + * @return mixed + */ + public function setMerchant($value) + { + return $this->setParameter('merchant', $value); + } + + /** + * @param $value + * @return mixed + */ + public function setPrivatekey($value) + { + return $this->setParameter('privatekey', $value); + } + + /** + * @return string + */ + public function getPrivatekey() + { + return $this->getParameter('privatekey'); + } + + /** + * @return int + */ + public function getAgreement() + { + return $this->getParameter('agreement'); + } + + /** + * @param $value + * @return mixed + */ + public function setAgreement($value) + { + return $this->setParameter('agreement', $value); + } + + /** + * @param $value + * @return mixed + */ + public function setApikey($value) + { + return $this->setParameter('apikey', $value); + } + + /** + * @return string + */ + public function getApikey() + { + return $this->getParameter('apikey'); + } + + /** + * @param $value + * @return self + */ + public function setSynchronized($value) + { + return $this->setParameter('synchronized', $value); + } + + /** + * @return boolean + */ + public function getSynchronized() + { + return boolval($this->getParameter('synchronized')); + } + + /** + * @return string + */ + public function getLanguage() + { + return $this->getParameter('language'); + } + + /** + * @param $value + * @return mixed + */ + public function setLanguage($value) + { + return $this->setParameter('language', $value); + } + + /** + * @return array + */ + public function getPaymentMethods() + { + return $this->getParameter('payment_methods'); + } + + /** + * @param array $value + * @return mixed + */ + public function setPaymentMethods($value = array()) + { + return $this->setParameter('payment_methods', $value); + } + + /** + * @return string + */ + public function getGoogleAnalyticsTrackingID() + { + return $this->getParameter('google_analytics_tracking_id'); + } + + /** + * + * @param $value + * @return mixed + */ + public function setGoogleAnalyticsTrackingID($value) + { + return $this->setParameter('google_analytics_tracking_id', $value); + } + + /** + * @return string + */ + public function getGoogleAnalyticsClientID() + { + return $this->getParameter('google_analytics_client_id'); + } + + /** + * @param $value + * @return mixed + */ + public function setGoogleAnalyticsClientID($value) + { + return $this->setParameter('google_analytics_client_id', $value); + } + + /** + * @return string + */ + public function getType() + { + return $this->getParameter('type'); + } + + /** + * @param $value + * @return mixed + */ + public function setType($value) + { + return $this->setParameter('type', $value); + } + + /** + * @return string + */ + public function getDescription() + { + return $this->getParameter('description'); + } + + /** + * @param $value + * @return mixed + */ + public function setDescription($value) + { + return $this->setParameter('description', $value); + } + + /** + * @return string + */ + public function getOrderID() + { + return $this->getParameter('order_id'); + } + + /** + * @param $value + * @return mixed + */ + public function setOrderID($value) + { + return $this->setParameter('order_id', $value); + } } diff --git a/tests/Message/CompleteRequestTest.php b/tests/Message/CompleteRequestTest.php index d003d0d..b5df8f2 100644 --- a/tests/Message/CompleteRequestTest.php +++ b/tests/Message/CompleteRequestTest.php @@ -75,4 +75,46 @@ public function testGetDataWithContentTypeJsonWithInvalidSha() } + + public function testGetUrl() + { + $this->request->initialize( + ['apikey' => 1, 'transactionId' => '10', 'agreement' => 2, 'amount' => 10.00, 'currency' => 'DKK'] + ); + $url = $this->request->getUrl(); + $this->assertNotContains('?synchronized', $url); + + foreach (['', 0, false, null] as $untruthyValue) { + $this->request->initialize( + [ + 'apikey' => 1, + 'transactionId' => '10', + 'agreement' => 2, + 'amount' => 10.00, + 'currency' => 'DKK', + 'synchronized' => $untruthyValue + ] + ); + $url = $this->request->getUrl(); + $this->assertNotContains('?synchronized', $url); + } + + foreach (['1', 1, true, "synchronized"] as $truthyValue) { + $this->request->initialize( + [ + 'apikey' => 1, + 'transactionId' => '10', + 'agreement' => 2, + 'amount' => 10.00, + 'currency' => 'DKK', + 'synchronized' => $truthyValue + ] + ); + $url = $this->request->getUrl(); + $this->assertContains('?synchronized', $url); + } + + + } + } From 253e4276e0c67a8ed073a63daa2fd1021b305f94 Mon Sep 17 00:00:00 2001 From: Sander Hagenaars Date: Wed, 14 Dec 2016 13:28:14 +0100 Subject: [PATCH 09/21] =?UTF-8?q?added=20=E2=80=9Csynchronized=E2=80=9D=20?= =?UTF-8?q?to=20default=20parameters=20on=20gateway?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/Gateway.php | 767 +++++++++++++++++++++++++----------------------- 1 file changed, 393 insertions(+), 374 deletions(-) diff --git a/src/Gateway.php b/src/Gateway.php index 070e372..3b2579e 100755 --- a/src/Gateway.php +++ b/src/Gateway.php @@ -10,380 +10,399 @@ */ class Gateway extends AbstractGateway { - /** - * @return string - */ - public function getName() - { - return 'Quickpay'; - } - - /** - * @return array - */ - public function getDefaultParameters() - { - parent::getDefaultParameters(); - return array( - 'type' => '', - 'merchant' => '', - 'agreement' => '', - 'apikey' => '', - 'privatekey' => '', - 'language' => '', - 'google_analytics_tracking_id' => '', - 'google_analytics_client_id' => '', - 'description' => '', - 'order_id' => '', - 'payment_methods' => array() - ); - } - - /** - * @return array - */ - public function getPaymentMethods() - { - return $this->getParameter('payment_methods'); - } - - /** - * @param array $value - * @return mixed - */ - public function setPaymentMethods($value = array()) - { - return $this->setParameter('payment_methods', $value); - } - - /** - * @return int - */ - public function getMerchant() - { - return $this->getParameter('merchant'); - } - - /** - * @param $value - * @return mixed - */ - public function setMerchant($value) - { - return $this->setParameter('merchant', $value); - } - - /** - * @return int - */ - public function getAgreement() - { - return $this->getParameter('agreement'); - } - - /** - * @param $value - * @return mixed - */ - public function setAgreement($value) - { - return $this->setParameter('agreement', $value); - } - - /** - * @param $value - * @return mixed - */ - public function setApikey($value) - { - return $this->setParameter('apikey', $value); - } - - /** - * @return string - */ - public function getApikey() - { - return $this->getParameter('apikey'); - } - - /** - * @param $value - * @return mixed - */ - public function setPrivatekey($value) - { - return $this->setParameter('privatekey', $value); - } - - /** - * @return string - */ - public function getPrivatekey() - { - return $this->getParameter('privatekey'); - } - - /** - * @return string - */ - public function getLanguage() - { - return $this->getParameter('language'); - } - - /** - * @param $value - * @return mixed - */ - public function setLanguage($value) - { - return $this->setParameter('language', $value); - } - - /** - * @return string - */ - public function getGoogleAnalyticsTrackingID() - { - return $this->getParameter('google_analytics_tracking_id'); - } - - /** - * @param $value - * @return mixed - */ - public function setGoogleAnalyticsTrackingID($value) - { - return $this->setParameter('google_analytics_tracking_id', $value); - } - - /** - * @return string - */ - public function getGoogleAnalyticsClientID() - { - return $this->getParameter('google_analytics_client_id'); - } - - /** - * @param $value - * @return mixed - */ - public function setGoogleAnalyticsClientID($value) - { - return $this->setParameter('google_analytics_client_id', $value); - } - - /** - * @return string - */ - public function getType() - { - return $this->getParameter('type'); - } - - /** - * @param $value - * @return mixed - */ - public function setType($value) - { - return $this->setParameter('type', $value); - } - - /** - * @return string - */ - public function getDescription() - { - return $this->getParameter('description'); - } - - /** - * @param $value - * @return mixed - */ - public function setDescription($value) - { - return $this->setParameter('description', $value); - } - - /** - * @return string - */ - public function getOrderID() - { - return $this->getParameter('order_id'); - } - - /** - * @param $value - * @return mixed - */ - public function setOrderID($value) - { - return $this->setParameter('order_id', $value); - } - - /** - * Start an authorize request - * - * @param array $parameters array of options - * @return \Omnipay\Quickpay\Message\AuthorizeRequest - */ - public function authorize(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\AuthorizeRequest', $parameters); - } - - /** - * Start a purchase request - * - * @param array $parameters array of options - * @return \Omnipay\Quickpay\Message\PurchaseRequest - */ - public function purchase(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\PurchaseRequest', $parameters); - } - - /** - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CaptureRequest - */ - public function capture(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\CaptureRequest', $parameters); - } - - /** - * @param array $parameters - * @return \Omnipay\Quickpay\Message\VoidRequest - */ - public function void(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\VoidRequest', $parameters); - } - - /** - * @param array $parameters - * @return \Omnipay\Quickpay\Message\RefundRequest - */ - public function refund(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\RefundRequest', $parameters); - } - - /** - * @param array $parameters - * @return \Omnipay\Quickpay\Message\RefundRequest - */ - public function recurring(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\RecurringRequest', $parameters); - } - - /** - * Is used for callbacks coming in to the system - * notify will verify these callbacks and eventually return the body of the callback to the app - * @param array $parameters - * @return \Omnipay\Quickpay\Message\NotifyRequest - */ - public function notify(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\NotifyRequest', $parameters); - } - - /** - * Complete a purchase - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completePurchase(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * Complete an authorization - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeAuthorize(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * A complete request - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeRequest(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\CompleteRequest', $parameters); - } - - /** - * Complete capture - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeCapture(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * Complete cancel - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeVoid(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * Complete refund - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeRefund(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * Complete recurring - * - * @param array $parameters - * @return \Omnipay\Quickpay\Message\CompleteRequest - */ - public function completeRecurring(array $parameters = array()) - { - return $this->completeRequest($parameters); - } - - /** - * @return Notification - */ - public function acceptNotification() - { - return new Notification($this->httpRequest, $this->getPrivatekey()); - } - - public function link(array $parameters = array()) - { - return $this->createRequest('\Omnipay\Quickpay\Message\LinkRequest', $parameters); - } + /** + * @return string + */ + public function getName() + { + return 'Quickpay'; + } + + /** + * @return array + */ + public function getDefaultParameters() + { + parent::getDefaultParameters(); + + return array( + 'type' => '', + 'merchant' => '', + 'agreement' => '', + 'apikey' => '', + 'privatekey' => '', + 'language' => '', + 'google_analytics_tracking_id' => '', + 'google_analytics_client_id' => '', + 'description' => '', + 'order_id' => '', + 'synchronized' => false, + 'payment_methods' => array() + ); + } + + /** + * @return array + */ + public function getPaymentMethods() + { + return $this->getParameter('payment_methods'); + } + + /** + * @param array $value + * @return mixed + */ + public function setPaymentMethods($value = array()) + { + return $this->setParameter('payment_methods', $value); + } + + /** + * @return int + */ + public function getMerchant() + { + return $this->getParameter('merchant'); + } + + /** + * @param $value + * @return mixed + */ + public function setMerchant($value) + { + return $this->setParameter('merchant', $value); + } + + /** + * @return int + */ + public function getAgreement() + { + return $this->getParameter('agreement'); + } + + /** + * @param $value + * @return mixed + */ + public function setAgreement($value) + { + return $this->setParameter('agreement', $value); + } + + /** + * @param $value + * @return mixed + */ + public function setApikey($value) + { + return $this->setParameter('apikey', $value); + } + + /** + * @return string + */ + public function getApikey() + { + return $this->getParameter('apikey'); + } + + /** + * @param $value + * @return mixed + */ + public function setPrivatekey($value) + { + return $this->setParameter('privatekey', $value); + } + + /** + * @return string + */ + public function getPrivatekey() + { + return $this->getParameter('privatekey'); + } + + /** + * @return string + */ + public function getLanguage() + { + return $this->getParameter('language'); + } + + /** + * @param $value + * @return mixed + */ + public function setLanguage($value) + { + return $this->setParameter('language', $value); + } + + /** + * @return string + */ + public function getGoogleAnalyticsTrackingID() + { + return $this->getParameter('google_analytics_tracking_id'); + } + + /** + * @param $value + * @return mixed + */ + public function setGoogleAnalyticsTrackingID($value) + { + return $this->setParameter('google_analytics_tracking_id', $value); + } + + /** + * @return string + */ + public function getGoogleAnalyticsClientID() + { + return $this->getParameter('google_analytics_client_id'); + } + + /** + * @param $value + * @return mixed + */ + public function setGoogleAnalyticsClientID($value) + { + return $this->setParameter('google_analytics_client_id', $value); + } + + /** + * @return string + */ + public function getType() + { + return $this->getParameter('type'); + } + + /** + * @param $value + * @return mixed + */ + public function setType($value) + { + return $this->setParameter('type', $value); + } + + /** + * @return string + */ + public function getDescription() + { + return $this->getParameter('description'); + } + + /** + * @param $value + * @return mixed + */ + public function setDescription($value) + { + return $this->setParameter('description', $value); + } + + /** + * @return string + */ + public function getOrderID() + { + return $this->getParameter('order_id'); + } + + /** + * @param $value + * @return mixed + */ + public function setOrderID($value) + { + return $this->setParameter('order_id', $value); + } + + /** + * @param $value + * @return self + */ + public function setSynchronized($value) + { + return $this->setParameter('synchronized', $value); + } + + /** + * @return boolean + */ + public function getSynchronized() + { + return boolval($this->getParameter('synchronized')); + } + + /** + * Start an authorize request + * + * @param array $parameters array of options + * @return \Omnipay\Quickpay\Message\AuthorizeRequest + */ + public function authorize(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\AuthorizeRequest', $parameters); + } + + /** + * Start a purchase request + * + * @param array $parameters array of options + * @return \Omnipay\Quickpay\Message\PurchaseRequest + */ + public function purchase(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\PurchaseRequest', $parameters); + } + + /** + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CaptureRequest + */ + public function capture(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\CaptureRequest', $parameters); + } + + /** + * @param array $parameters + * @return \Omnipay\Quickpay\Message\VoidRequest + */ + public function void(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\VoidRequest', $parameters); + } + + /** + * @param array $parameters + * @return \Omnipay\Quickpay\Message\RefundRequest + */ + public function refund(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\RefundRequest', $parameters); + } + + /** + * @param array $parameters + * @return \Omnipay\Quickpay\Message\RefundRequest + */ + public function recurring(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\RecurringRequest', $parameters); + } + + /** + * Is used for callbacks coming in to the system + * notify will verify these callbacks and eventually return the body of the callback to the app + * @param array $parameters + * @return \Omnipay\Quickpay\Message\NotifyRequest + */ + public function notify(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\NotifyRequest', $parameters); + } + + /** + * Complete a purchase + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completePurchase(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * Complete an authorization + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeAuthorize(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * A complete request + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeRequest(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\CompleteRequest', $parameters); + } + + /** + * Complete capture + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeCapture(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * Complete cancel + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeVoid(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * Complete refund + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeRefund(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * Complete recurring + * + * @param array $parameters + * @return \Omnipay\Quickpay\Message\CompleteRequest + */ + public function completeRecurring(array $parameters = array()) + { + return $this->completeRequest($parameters); + } + + /** + * @return Notification + */ + public function acceptNotification() + { + return new Notification($this->httpRequest, $this->getPrivatekey()); + } + + public function link(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\LinkRequest', $parameters); + } } From 8e8cb714cc966ec595891365a3ea49d16f011617 Mon Sep 17 00:00:00 2001 From: Sander Hagenaars Date: Wed, 14 Dec 2016 13:29:50 +0100 Subject: [PATCH 10/21] Update README.md --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index a2690b1..56f573d 100644 --- a/README.md +++ b/README.md @@ -21,3 +21,4 @@ An Omnipay driver for the Quickpay payment processor. * description * order_id * payment_methods +* synchronized (bool) From 6e69753f99e4e05c96dcc42f5341218ebe474ee1 Mon Sep 17 00:00:00 2001 From: "Thomas B. Nielsen" Date: Tue, 18 Jul 2017 09:23:06 +0200 Subject: [PATCH 11/21] Update to readme --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 56f573d..aa29064 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,15 @@ # omnipay-quickpay An Omnipay driver for the Quickpay payment processor. + +[QuickPay](https://quickpay.net/) is a Payment Service Provider that accept all common payment methods - credit cards, bank transfers, invoices, and more. + +### Why Omnipay +The Omnipay php library is an easy to use, consistent payment processing library for PHP 5.3+ +>Because you can learn one API and use it in multiple projects using different payment gateways +>Because if you need to change payment gateways you won't need to rewrite your code + +Read more about Omnipay here: https://github.com/thephpleague/omnipay + ### Supported Omnipay functionality * Authorize * Purchase @@ -22,3 +32,6 @@ An Omnipay driver for the Quickpay payment processor. * order_id * payment_methods * synchronized (bool) + +### Development +This module was coded by [Nobrainer Web](http://www.nobrainer.dk), with support from [QuickPay](https://quickpay.net/) From cf08f29fb702514a912e7d004704e3e5bb3e1c72 Mon Sep 17 00:00:00 2001 From: Jais Djurhuus Kempel Date: Fri, 17 Aug 2018 08:20:36 +0200 Subject: [PATCH 12/21] WIP 3.0 updates (#8) * updated to 3.0 components * use omnipay-common master branch * use beta branch of common * code style --- composer.json | 4 +-- src/Gateway.php | 15 ++++++++--- src/Message/AbstractRequest.php | 18 +++++++------- src/Message/LinkRequest.php | 42 +++++++++++-------------------- src/Message/LinkResponse.php | 18 +++++++++----- src/Message/Notification.php | 44 ++++++++++++++++++++++----------- src/Message/Response.php | 11 +++++---- 7 files changed, 84 insertions(+), 68 deletions(-) diff --git a/composer.json b/composer.json index 41b18cb..d918129 100644 --- a/composer.json +++ b/composer.json @@ -23,9 +23,9 @@ }, "minimum-stability": "dev", "require": { - "omnipay/common": "~2.0" + "omnipay/common": "^3@beta" }, "require-dev": { - "omnipay/tests": "~2.0" + "omnipay/tests": "^3" } } diff --git a/src/Gateway.php b/src/Gateway.php index 3b2579e..7b4476c 100755 --- a/src/Gateway.php +++ b/src/Gateway.php @@ -7,6 +7,9 @@ /** * Quickpay Gateway + * @method \Omnipay\Common\Message\RequestInterface createCard(array $options = array()) + * @method \Omnipay\Common\Message\RequestInterface updateCard(array $options = array()) + * @method \Omnipay\Common\Message\RequestInterface deleteCard(array $options = array()) */ class Gateway extends AbstractGateway { @@ -23,8 +26,6 @@ public function getName() */ public function getDefaultParameters() { - parent::getDefaultParameters(); - return array( 'type' => '', 'merchant' => '', @@ -251,9 +252,9 @@ public function getSynchronized() * @param array $parameters array of options * @return \Omnipay\Quickpay\Message\AuthorizeRequest */ - public function authorize(array $parameters = array()) + public function authorize(array $options = array()) { - return $this->createRequest('\Omnipay\Quickpay\Message\AuthorizeRequest', $parameters); + return $this->createRequest('\Omnipay\Quickpay\Message\AuthorizeRequest', $options); } /** @@ -405,4 +406,10 @@ public function link(array $parameters = array()) } + function __call($name, $arguments) + { + // TODO: Implement @method \Omnipay\Common\Message\RequestInterface createCard(array $options = array()) + // TODO: Implement @method \Omnipay\Common\Message\RequestInterface updateCard(array $options = array()) + // TODO: Implement @method \Omnipay\Common\Message\RequestInterface deleteCard(array $options = array()) + } } diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index 5556f11..50806a6 100755 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -73,19 +73,19 @@ public function sendData($data) if (is_array($data) && array_key_exists('synchronized', $data)) { unset($data['synchronized']); } - $httpRequest = $this->httpClient->createRequest( + $httpResponse = $this->httpClient->request( $this->getHttpMethod(), $url, - null, + [ + 'Authorization' => 'Basic ' . base64_encode(":" . $this->getApikey()), + 'Accept-Version' => 'v10', + 'Content-Type' => 'application/json', + 'QuickPay-Callback-Url' => $this->getNotifyUrl() + ], $data - )->setHeader('Authorization', ' Basic ' . base64_encode(":" . $this->getApikey())) - ->setHeader('Accept-Version', ' v10') - ->setHeader('QuickPay-Callback-Url', $this->getNotifyUrl()); - - - $httpResponse = $httpRequest->send(); + ); - return $this->response = new Response($this, $httpResponse->getBody(true)); + return $this->response = new Response($this, $httpResponse->getBody()->getContents()); } /** diff --git a/src/Message/LinkRequest.php b/src/Message/LinkRequest.php index 5dd9c6b..869783e 100644 --- a/src/Message/LinkRequest.php +++ b/src/Message/LinkRequest.php @@ -3,8 +3,6 @@ namespace Omnipay\Quickpay\Message; - -use Guzzle\Http\Exception\ClientErrorResponseException; use Omnipay\Common\Exception\InvalidRequestException; class LinkRequest extends AbstractRequest @@ -63,16 +61,14 @@ public function send() 'currency' => $fullData['currency'], ]; - $httpRequest = $this->httpClient->createRequest('POST', $url, null, $data) - ->setHeader('Authorization', ' Basic ' . base64_encode(":" . $this->getApikey())) - ->setHeader('Accept-Version', ' v10') - ->setHeader('QuickPay-Callback-Url', $this->getNotifyUrl()); - try { - $httpResponse = $httpRequest->send(); - } catch (ClientErrorResponseException $e) { - $httpResponse = $e->getResponse(); - } - $body = $httpResponse->getBody(true); + $httpResponse = $this->httpClient->request('POST', $url, [ + 'Authorization' => 'Basic ' . base64_encode(":" . $this->getApikey()), + 'Accept-Version' => 'v10', + 'Content-Type' => 'application/json', + 'QuickPay-Callback-Url' => $this->getNotifyUrl() + ], json_encode($data)); + + $body = $httpResponse->getBody()->getContents(); $response = json_decode($body, true); if (array_key_exists('id', $response)) { $reference = $response['id']; @@ -85,21 +81,13 @@ public function send() $url = $this->getEndPoint() . '/' . $this->getTypeOfRequest() . '/' . $reference . '/link'; + $httpResponse = $this->httpClient->request('PUT', $url, [ + 'Authorization' => 'Basic ' . base64_encode(":" . $this->getApikey()), + 'Accept-Version' => 'v10', + 'Content-Type' => 'application/json', + 'QuickPay-Callback-Url' => $this->getNotifyUrl() + ], json_encode($fullData)); - $httpRequest = $this->httpClient->createRequest('PUT', $url, null, $fullData) - ->setHeader('Authorization', ' Basic ' . base64_encode(":" . $this->getApikey())) - ->setHeader('Accept-Version', ' v10') - ->setHeader('QuickPay-Callback-Url', $this->getNotifyUrl()); - - try { - $httpResponse = $httpRequest->send(); - } catch (ClientErrorResponseException $e) { - $httpResponse = $e->getResponse(); - } - - return new LinkResponse($this, $httpResponse->getBody(true), $reference); - + return new LinkResponse($this, $httpResponse->getBody()->getContents(), $reference); } - - } diff --git a/src/Message/LinkResponse.php b/src/Message/LinkResponse.php index a604c07..593e5b4 100644 --- a/src/Message/LinkResponse.php +++ b/src/Message/LinkResponse.php @@ -19,15 +19,23 @@ public function __construct(RequestInterface $request, $data, $reference = null) public function isSuccessful() { - $body = $this->getResponseBody(); - $body = json_decode($body); - if (isset($body->url)) { + $data = json_decode($this->getResponseBody()); + if (isset($data->url)) { return true; } return false; } - public function getTransactionReference() + public function getError() + { + $data = json_decode($this->getResponseBody()); + if (isset($data->error)) { + return $data->error; + } + return null; + } + + public function getTransactionReference() { return $this->reference; } @@ -64,6 +72,4 @@ public function getRedirectData() { return []; } - - } diff --git a/src/Message/Notification.php b/src/Message/Notification.php index 4fa8147..910f3c8 100755 --- a/src/Message/Notification.php +++ b/src/Message/Notification.php @@ -40,18 +40,18 @@ public function __construct(Request $request, $privateKey = null) public function getData() { - if($this->data){ + if ($this->data){ return $this->data; } if ($this->httpRequest->headers->get('Content-Type') == "application/json") { $data = json_decode($this->httpRequest->getContent()); - $header_checksum = $this->httpRequest->headers->get('Quickpay-Checksum-Sha256'); + $headerChecksum = $this->httpRequest->headers->get('Quickpay-Checksum-Sha256'); // validate with accounts private key. - $our_checksum = hash_hmac("sha256", $this->httpRequest->getContent(), $this->getPrivateKey()); - if ($our_checksum != $header_checksum) { - throw new InvalidResponseException; + $checksum = hash_hmac("sha256", $this->httpRequest->getContent(), $this->getPrivateKey()); + if ($checksum != $headerChecksum) { + throw new InvalidResponseException("Checksum mismatch checksum:$checksum != header:$headerChecksum"); } $this->data = $data; @@ -80,13 +80,14 @@ public function getTransactionReference() */ public function getTransactionStatus() { - if($data = $this->getData()){ - $op = end($data->operations); - if($op->pending == false && $op->qp_status_code == "20000"){ - return NotificationInterface::STATUS_COMPLETED; - } else if($op->pending){ - return NotificationInterface::STATUS_PENDING; - } + if ($data = $this->getData()){ + if ($op = $this->getLatestOperation()) { + if ($op->pending == false && $op->qp_status_code == "20000") { + return NotificationInterface::STATUS_COMPLETED; + } else if ($op->pending) { + return NotificationInterface::STATUS_PENDING; + } + } } return NotificationInterface::STATUS_FAILED; @@ -99,10 +100,23 @@ public function getTransactionStatus() */ public function getMessage() { - if($data = $this->getData()){ - $op = end($data->operations); - return $op->qp_status_msg; + if ($data = $this->getData()){ + if ($op = $this->getLatestOperation()) { + return $op->qp_status_msg; + } } return ''; } + + /** + * Get latest operation + * + * @return bool|mixed + */ + public function getLatestOperation() { + if ($data = $this->getData()) { + return end($data->operations); + } + return false; + } } diff --git a/src/Message/Response.php b/src/Message/Response.php index 50e326b..1ea0b59 100755 --- a/src/Message/Response.php +++ b/src/Message/Response.php @@ -11,7 +11,7 @@ class Response extends AbstractResponse */ public function isSuccessful() { - if($this->getResponseBody()){ + if ($this->getResponseBody()){ $response_body = json_decode($this->getResponseBody()); $data = end($response_body->operations); if ($response_body->accepted && $data->qp_status_code=="20000") { @@ -27,7 +27,7 @@ public function isSuccessful() * @return bool|mixed */ public function getResponseBody(){ - if(is_string($this->data)){ + if (is_string($this->data)){ // JSON is valid return $this->data; } @@ -39,7 +39,8 @@ public function getResponseBody(){ */ public function getTransactionReference() { - if($this->getResponseBody()){ + $response_body = null; + if ($this->getResponseBody()){ $response_body = json_decode($this->getResponseBody()); } return isset($response_body->id) ? $response_body->id : ''; @@ -49,7 +50,7 @@ public function getTransactionReference() * @return null|string */ public function getCode(){ - if($this->getResponseBody()){ + if ($this->getResponseBody()){ $response_body = json_decode($this->getResponseBody()); $data = end($response_body->operations); return isset($data->qp_status_code) ? $data->qp_status_code : ''; @@ -61,7 +62,7 @@ public function getCode(){ * @return null|string */ public function getMessage(){ - if($this->getResponseBody()){ + if ($this->getResponseBody()){ $response_body = json_decode($this->getResponseBody()); $data = end($response_body->operations); return isset($data->qp_status_msg) ? $data->type . ': ' . $data->qp_status_msg : ''; From 7e82e7766931fed675f610dc989fb0a0bf4f11b6 Mon Sep 17 00:00:00 2001 From: Sander Hagenaars Date: Thu, 14 Nov 2019 15:24:27 +0100 Subject: [PATCH 13/21] $body in request is now string, instead of array, as per the omnipay 3 requirements --- src/Message/AbstractRequest.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index 50806a6..8e7b332 100755 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -82,7 +82,7 @@ public function sendData($data) 'Content-Type' => 'application/json', 'QuickPay-Callback-Url' => $this->getNotifyUrl() ], - $data + json_encode($data) ); return $this->response = new Response($this, $httpResponse->getBody()->getContents()); From 2ca9889909f30e3e340053fbbd83c508b0dd837f Mon Sep 17 00:00:00 2001 From: Sander Hagenaars Date: Thu, 14 Nov 2019 15:35:48 +0100 Subject: [PATCH 14/21] update to stable package --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d918129..d7a6c06 100644 --- a/composer.json +++ b/composer.json @@ -23,7 +23,7 @@ }, "minimum-stability": "dev", "require": { - "omnipay/common": "^3@beta" + "league/omnipay": "^3.0" }, "require-dev": { "omnipay/tests": "^3" From 321206252777144302cf8049acfbccf5cd2dcd97 Mon Sep 17 00:00:00 2001 From: Sander Hagenaars Date: Thu, 14 Nov 2019 15:58:15 +0100 Subject: [PATCH 15/21] updated readme --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index aa29064..8f1da31 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,8 @@ An Omnipay driver for the Quickpay payment processor. [QuickPay](https://quickpay.net/) is a Payment Service Provider that accept all common payment methods - credit cards, bank transfers, invoices, and more. +This package supports omnipay 3.x. For omnipay 2.x, see branch 1.0. + ### Why Omnipay The Omnipay php library is an easy to use, consistent payment processing library for PHP 5.3+ >Because you can learn one API and use it in multiple projects using different payment gateways From d60ce7f4f66c217ba0b937613787216f45beffcf Mon Sep 17 00:00:00 2001 From: Alex Chartier Date: Wed, 18 Mar 2020 11:19:03 -0400 Subject: [PATCH 16/21] Various changes to support Refunds and Status --- src/Gateway.php | 25 +++++++++- src/Message/AbstractRequest.php | 36 +++++++++++++- src/Message/CaptureResponse.php | 19 +++++++ src/Message/CompleteRequest.php | 16 +++++- src/Message/LinkRequest.php | 2 +- src/Message/RefundRequest.php | 28 +++++++++-- src/Message/RefundResponse.php | 87 +++++++++++++++++++++++++++++++++ src/Message/StatusRequest.php | 37 ++++++++++++++ src/Message/StatusResponse.php | 72 +++++++++++++++++++++++++++ 9 files changed, 312 insertions(+), 10 deletions(-) create mode 100644 src/Message/CaptureResponse.php create mode 100644 src/Message/RefundResponse.php create mode 100644 src/Message/StatusRequest.php create mode 100644 src/Message/StatusResponse.php diff --git a/src/Gateway.php b/src/Gateway.php index 7b4476c..f20f972 100755 --- a/src/Gateway.php +++ b/src/Gateway.php @@ -38,7 +38,8 @@ public function getDefaultParameters() 'description' => '', 'order_id' => '', 'synchronized' => false, - 'payment_methods' => array() + 'payment_methods' => array(), + 'auto_capture' => false, ); } @@ -246,6 +247,24 @@ public function getSynchronized() return boolval($this->getParameter('synchronized')); } + + /** + * @param $value + * @return self + */ + public function setAutoCapture($value) + { + return $this->setParameter('auto_capture', $value); + } + + /** + * @return boolean + */ + public function getAutoCapture() + { + return boolval($this->getParameter('auto_capture')); + } + /** * Start an authorize request * @@ -405,6 +424,10 @@ public function link(array $parameters = array()) return $this->createRequest('\Omnipay\Quickpay\Message\LinkRequest', $parameters); } + public function status(array $parameters = array()) + { + return $this->createRequest('\Omnipay\Quickpay\Message\StatusRequest', $parameters); + } function __call($name, $arguments) { diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index 8e7b332..32424d7 100755 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -18,13 +18,19 @@ abstract class AbstractRequest extends \Omnipay\Common\Message\AbstractRequest */ private $apimethod = 'capture'; + /** + * @var string + */ + private $httpMethod = 'POST'; + /** * @return string */ public function getUrl() { $url = $this->getEndPoint() . $this->getTypeOfRequest() . '/' . $this->getTransactionReference( - ) . '/' . $this->getApiMethod(); + ); + if ($this->getApiMethod() != '') $url .= '/' . $this->getApiMethod(); if ($this->getSynchronized()) { $url .= '?synchronized'; return $url; @@ -49,7 +55,15 @@ public function getData() */ public function getHttpMethod() { - return 'POST'; + return $this->httpMethod; + } + + /** + * @return string + */ + public function setHttpMethod($method) + { + $this->httpMethod = $method; } /** @@ -335,4 +349,22 @@ public function setOrderID($value) { return $this->setParameter('order_id', $value); } + + /** + * @param $value + * @return self + */ + public function setAutoCapture($value) + { + return $this->setParameter('auto_capture', $value); + } + + /** + * @return boolean + */ + public function getAutoCapture() + { + return boolval($this->getParameter('auto_capture')); + } + } diff --git a/src/Message/CaptureResponse.php b/src/Message/CaptureResponse.php new file mode 100644 index 0000000..eeabf0b --- /dev/null +++ b/src/Message/CaptureResponse.php @@ -0,0 +1,19 @@ +getResponseBody()){ + $response_body = json_decode($this->getResponseBody()); + $data = end($response_body->operations); + if ($data->qp_status_code=="20000") { + return true; + } + } + return false; + } +} \ No newline at end of file diff --git a/src/Message/CompleteRequest.php b/src/Message/CompleteRequest.php index 39da000..4c8dd65 100755 --- a/src/Message/CompleteRequest.php +++ b/src/Message/CompleteRequest.php @@ -10,6 +10,13 @@ */ class CompleteRequest extends AbstractRequest { + public function __construct($httpClient, $httpRequest) + { + parent::__construct($httpClient, $httpRequest); + $this->setApiMethod(''); + $this->setHttpMethod('GET'); + } + public function getData() { $data = $this->httpRequest->query->all(); @@ -34,7 +41,14 @@ public function getData() */ public function sendData($data) { - return $this->response = new Response($this, $data); + $httpResponse = $this->httpClient->request('get', $this->getEndPoint() . '/payments/' . $this->getTransactionReference(), + [ + 'Authorization' => 'Basic ' . base64_encode(":" . $this->getApikey()), + 'Accept-Version' => 'v10', + 'Content-Type' => 'application/json', + ] + ); + return $this->response = new Response($this, $httpResponse->getBody()->getContents()); } /** diff --git a/src/Message/LinkRequest.php b/src/Message/LinkRequest.php index 869783e..01ea698 100644 --- a/src/Message/LinkRequest.php +++ b/src/Message/LinkRequest.php @@ -33,7 +33,7 @@ public function getQuickpayParams() 'language' => $this->getLanguage(), 'google_analytics_tracking_id' => $this->getGoogleAnalyticsTrackingID(), 'google_analytics_client_id' => $this->getGoogleAnalyticsClientID(), - 'auto_capture' => false, + 'auto_capture' => $this->getAutoCapture(), 'payment_methods' => $this->getPaymentMethods() ); diff --git a/src/Message/RefundRequest.php b/src/Message/RefundRequest.php index ee6455b..d511956 100755 --- a/src/Message/RefundRequest.php +++ b/src/Message/RefundRequest.php @@ -8,9 +8,27 @@ */ class RefundRequest extends AbstractRequest { - public function __construct($httpClient, $httpRequest) - { - parent::__construct($httpClient, $httpRequest); - $this->setApiMethod('refund'); - } + + public function send() + { + $reference = $this->getTransactionReference(); + + $url = $this->getEndPoint() . $this->getTypeOfRequest() . '/' .$reference . '/refund'; + + $requestParams = [ + 'Authorization' => 'Basic ' . base64_encode(":" . $this->getApikey()), + 'Accept-Version' => 'v10', + 'Content-Type' => 'application/json', + 'QuickPay-Callback-Url' => $this->getNotifyUrl(), + 'id' => $reference, + 'amount' => $this->getAmountInteger() + ]; + + $httpResponse = $this->httpClient->request('POST', $url, $requestParams, json_encode(['id' => $reference, 'amount' => $this->getAmountInteger()])); + + $body = $httpResponse->getBody()->getContents(); + + return new RefundResponse($this, $body, $reference); + } + } diff --git a/src/Message/RefundResponse.php b/src/Message/RefundResponse.php new file mode 100644 index 0000000..c9123fc --- /dev/null +++ b/src/Message/RefundResponse.php @@ -0,0 +1,87 @@ +reference = $reference; + } + + public function isSuccessful() + { + $data = json_decode($this->getResponseBody()); + + /* If it is an object and it has the ID in it then the reference was found*/ + if (is_object($data) && isset($data->id)) { + return true; + } + + return false; + } + + public function getTransactionReference() + { + return $this->reference; + } + + /** + * @return null|string + */ + public function getCode(){ + $data = json_decode($this->getResponseBody()); + if ($this->isSuccessful()){ + if (is_array($data)) { + /* We have returned all of the transactions, we'll get the code from the most recent */ + $data = end($data); + } + $data = end($data->operations); + return isset($data->qp_status_code) ? $data->qp_status_code : ''; + } + return '404'; + } + + /** + * @return null|string + */ + public function getMessage(){ + $data = json_decode($this->getResponseBody()); + + if ($this->isSuccessful()){ + if (is_array($data)) { + /* We have returned all of the transactions, we'll get the message from the most recent */ + $data = end($data); + } + $data = end($data->operations); + return isset($data->qp_status_msg) ? $data->type . ': ' . $data->qp_status_msg : ''; + } + + return $data->message; + } + + /** + * @return null|string + */ + public function getErrors(){ + $data = json_decode($this->getResponseBody()); + + if ($this->isSuccessful()){ + if (is_array($data)) { + /* We have returned all of the transactions, we'll get the message from the most recent */ + $data = end($data); + } + $data = end($data->operations); + return isset($data->qp_status_msg) ? $data->type . ': ' . $data->qp_status_msg : ''; + } + + return $data->errors; + } +} diff --git a/src/Message/StatusRequest.php b/src/Message/StatusRequest.php new file mode 100644 index 0000000..a3f9e60 --- /dev/null +++ b/src/Message/StatusRequest.php @@ -0,0 +1,37 @@ +setHttpMethod('GET'); + } + + public function send() + { + $reference = $this->getTransactionReference(); + $reference = ''; + + $url = $this->getEndPoint() . '/' . $this->getTypeOfRequest(); + if ($reference) { + $url .= '/' . $reference; + } + $httpResponse = $this->httpClient->request('GET', $url, [ + 'Authorization' => 'Basic ' . base64_encode(":" . $this->getApikey()), + 'Accept-Version' => 'v10', + 'Content-Type' => 'application/json', + 'QuickPay-Callback-Url' => $this->getNotifyUrl() + ], null); + + $body = $httpResponse->getBody()->getContents(); + + return new StatusResponse($this, $body, $reference); + } +} diff --git a/src/Message/StatusResponse.php b/src/Message/StatusResponse.php new file mode 100644 index 0000000..c235c96 --- /dev/null +++ b/src/Message/StatusResponse.php @@ -0,0 +1,72 @@ +reference = $reference; + } + + public function isSuccessful() + { + $data = json_decode($this->getResponseBody()); + + /* If the response is an array then we retrieved all items */ + if (is_array($data)) { + return true; + } + /* If it is an object and it has the ID in it then the reference was found*/ + if (is_object($data) && isset($data->id)) { + return true; + } + return false; + } + + public function getTransactionReference() + { + return $this->reference; + } + + /** + * @return null|string + */ + public function getCode(){ + $data = json_decode($this->getResponseBody()); + if ($this->isSuccessful()){ + if (is_array($data)) { + /* We have returned all of the transactions, we'll get the code from the most recent */ + $data = end($data); + } + $data = end($data->operations); + return isset($data->qp_status_code) ? $data->qp_status_code : ''; + } + return '404'; + } + + /** + * @return null|string + */ + public function getMessage(){ + $data = json_decode($this->getResponseBody()); + + if ($this->isSuccessful()){ + if (is_array($data)) { + /* We have returned all of the transactions, we'll get the message from the most recent */ + $data = end($data); + } + $data = end($data->operations); + return isset($data->qp_status_msg) ? $data->type . ': ' . $data->qp_status_msg : ''; + } + + return $data->message; + } +} From 74896f176bda8466d4183a269c5b0ddd86a250fe Mon Sep 17 00:00:00 2001 From: Alex Chartier Date: Mon, 21 Sep 2020 08:39:59 -0400 Subject: [PATCH 17/21] Add support for passing variables in the link request --- src/Gateway.php | 18 ++++++++++++++++++ src/Message/AbstractRequest.php | 17 +++++++++++++++++ src/Message/LinkRequest.php | 9 ++++++--- 3 files changed, 41 insertions(+), 3 deletions(-) diff --git a/src/Gateway.php b/src/Gateway.php index f20f972..440baca 100755 --- a/src/Gateway.php +++ b/src/Gateway.php @@ -40,6 +40,7 @@ public function getDefaultParameters() 'synchronized' => false, 'payment_methods' => array(), 'auto_capture' => false, + 'variables' => array(), ); } @@ -429,6 +430,23 @@ public function status(array $parameters = array()) return $this->createRequest('\Omnipay\Quickpay\Message\StatusRequest', $parameters); } + /** + * @return array + */ + public function getVariables() + { + return $this->getParameter('variables'); + } + + /** + * @param array $value + * @return mixed + */ + public function setVariables($value = array()) + { + return $this->setParameter('variables', $value); + } + function __call($name, $arguments) { // TODO: Implement @method \Omnipay\Common\Message\RequestInterface createCard(array $options = array()) diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index 32424d7..661ce56 100755 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -367,4 +367,21 @@ public function getAutoCapture() return boolval($this->getParameter('auto_capture')); } + + /** + * @return array + */ + public function getVariables() + { + return $this->getParameter('variables'); + } + + /** + * @param array $value + * @return mixed + */ + public function setVariables($value = array()) + { + return $this->setParameter('variables', $value); + } } diff --git a/src/Message/LinkRequest.php b/src/Message/LinkRequest.php index 01ea698..da9e713 100644 --- a/src/Message/LinkRequest.php +++ b/src/Message/LinkRequest.php @@ -34,10 +34,9 @@ public function getQuickpayParams() 'google_analytics_tracking_id' => $this->getGoogleAnalyticsTrackingID(), 'google_analytics_client_id' => $this->getGoogleAnalyticsClientID(), 'auto_capture' => $this->getAutoCapture(), - 'payment_methods' => $this->getPaymentMethods() + 'payment_methods' => $this->getPaymentMethods(), ); - return $params; } @@ -56,12 +55,16 @@ public function send() if (!$reference) { $url = $this->getEndPoint() . '/' . $this->getTypeOfRequest() . '/'; + $variables = $this->getVariables(); $data = [ 'order_id' => $fullData['order_id'], 'currency' => $fullData['currency'], ]; + if (count($variables) > 0) { + $data['variables'] = $variables; + } - $httpResponse = $this->httpClient->request('POST', $url, [ + $httpResponse = $this->httpClient->request('POST', $url, [ 'Authorization' => 'Basic ' . base64_encode(":" . $this->getApikey()), 'Accept-Version' => 'v10', 'Content-Type' => 'application/json', From e0321669a6488b3b9ce1ebb26278c7d8fb944b84 Mon Sep 17 00:00:00 2001 From: rasmniel Date: Tue, 22 Sep 2020 10:18:32 +0200 Subject: [PATCH 18/21] Update dependencies --- composer.json | 6 +- composer.lock | 3467 ++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 2967 insertions(+), 506 deletions(-) diff --git a/composer.json b/composer.json index d7a6c06..e82d024 100644 --- a/composer.json +++ b/composer.json @@ -25,7 +25,7 @@ "require": { "league/omnipay": "^3.0" }, - "require-dev": { - "omnipay/tests": "^3" - } + "require-dev": { + "omnipay/tests": "^3.1@dev" + } } diff --git a/composer.lock b/composer.lock index 26db357..22b7067 100644 --- a/composer.lock +++ b/composer.lock @@ -1,78 +1,105 @@ { "_readme": [ "This file locks the dependencies of your project to a known state", - "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file", + "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "hash": "e7d505d8648456964b3528bbc2776fbf", - "content-hash": "b522cc874142165d1584bedc6e799fe4", + "content-hash": "3d9c6b10ceb9e8b8e911afa595742074", "packages": [ { - "name": "guzzle/guzzle", - "version": "dev-master", + "name": "clue/stream-filter", + "version": "v1.4.1", "source": { "type": "git", - "url": "https://github.com/guzzle/guzzle3.git", - "reference": "b3f5050cb6270c7a728a0b74ac2de50a262b3e02" + "url": "https://github.com/clue/php-stream-filter.git", + "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/guzzle/guzzle3/zipball/b3f5050cb6270c7a728a0b74ac2de50a262b3e02", - "reference": "b3f5050cb6270c7a728a0b74ac2de50a262b3e02", + "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", + "reference": "5a58cc30a8bd6a4eb8f856adf61dd3e013f53f71", "shasum": "" }, "require": { - "ext-curl": "*", - "php": ">=5.3.3", - "symfony/event-dispatcher": "~2.1" + "php": ">=5.3" }, - "replace": { - "guzzle/batch": "self.version", - "guzzle/cache": "self.version", - "guzzle/common": "self.version", - "guzzle/http": "self.version", - "guzzle/inflection": "self.version", - "guzzle/iterator": "self.version", - "guzzle/log": "self.version", - "guzzle/parser": "self.version", - "guzzle/plugin": "self.version", - "guzzle/plugin-async": "self.version", - "guzzle/plugin-backoff": "self.version", - "guzzle/plugin-cache": "self.version", - "guzzle/plugin-cookie": "self.version", - "guzzle/plugin-curlauth": "self.version", - "guzzle/plugin-error-response": "self.version", - "guzzle/plugin-history": "self.version", - "guzzle/plugin-log": "self.version", - "guzzle/plugin-md5": "self.version", - "guzzle/plugin-mock": "self.version", - "guzzle/plugin-oauth": "self.version", - "guzzle/service": "self.version", - "guzzle/stream": "self.version" + "require-dev": { + "phpunit/phpunit": "^5.0 || ^4.8" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\StreamFilter\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Christian Lück", + "email": "christian@lueck.tv" + } + ], + "description": "A simple and modern approach to stream filtering in PHP", + "homepage": "https://github.com/clue/php-stream-filter", + "keywords": [ + "bucket brigade", + "callback", + "filter", + "php_user_filter", + "stream", + "stream_filter_append", + "stream_filter_register" + ], + "time": "2019-04-09T12:31:48+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.5.x-dev", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "e8ed4dbf49b260ff129ff0e0400718c3269971bf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/e8ed4dbf49b260ff129ff0e0400718c3269971bf", + "reference": "e8ed4dbf49b260ff129ff0e0400718c3269971bf", + "shasum": "" + }, + "require": { + "ext-json": "*", + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.6.1", + "php": ">=5.5", + "symfony/polyfill-intl-idn": "^1.17.0" }, "require-dev": { - "doctrine/cache": "~1.3", - "monolog/monolog": "~1.0", - "phpunit/phpunit": "3.7.*", - "psr/log": "~1.0", - "symfony/class-loader": "~2.1", - "zendframework/zend-cache": "2.*,<2.3", - "zendframework/zend-log": "2.*,<2.3" + "ext-curl": "*", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.4 || ^7.0", + "psr/log": "^1.1" }, "suggest": { - "guzzlehttp/guzzle": "Guzzle 5 has moved to a new package name. The package you have installed, Guzzle 3, is deprecated." + "psr/log": "Required for using the Log middleware" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.9-dev" + "dev-master": "6.5-dev" } }, "autoload": { - "psr-0": { - "Guzzle": "src/", - "Guzzle\\Tests": "tests/" - } + "psr-4": { + "GuzzleHttp\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -83,13 +110,9 @@ "name": "Michael Dowling", "email": "mtdowling@gmail.com", "homepage": "https://github.com/mtdowling" - }, - { - "name": "Guzzle Community", - "homepage": "https://github.com/guzzle/guzzle/contributors" } ], - "description": "PHP HTTP client. This library is deprecated in favor of https://packagist.org/packages/guzzlehttp/guzzle", + "description": "Guzzle is a PHP HTTP client library", "homepage": "http://guzzlephp.org/", "keywords": [ "client", @@ -100,79 +123,40 @@ "rest", "web service" ], - "abandoned": "guzzlehttp/guzzle", - "time": "2015-04-29 17:06:53" + "time": "2020-07-02T06:52:04+00:00" }, { - "name": "omnipay/common", + "name": "guzzlehttp/promises", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/thephpleague/omnipay-common.git", - "reference": "731386e54688405a475d6dd43cd6397728cd709e" + "url": "https://github.com/guzzle/promises.git", + "reference": "8d7c8fb942cb9856b7b5c98e68e9c34d56e806a9" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-common/zipball/731386e54688405a475d6dd43cd6397728cd709e", - "reference": "731386e54688405a475d6dd43cd6397728cd709e", + "url": "https://api.github.com/repos/guzzle/promises/zipball/8d7c8fb942cb9856b7b5c98e68e9c34d56e806a9", + "reference": "8d7c8fb942cb9856b7b5c98e68e9c34d56e806a9", "shasum": "" }, "require": { - "guzzle/guzzle": "~3.9", - "php": ">=5.3.2", - "symfony/http-foundation": "~2.1|~3.0" + "php": ">=5.5" }, "require-dev": { - "omnipay/tests": "~2.0", - "squizlabs/php_codesniffer": "~1.5" + "symfony/phpunit-bridge": "^4.4 || ^5.1" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.5.x-dev" - }, - "gateways": [ - "AuthorizeNet_AIM", - "AuthorizeNet_SIM", - "Buckaroo_CreditCard", - "Buckaroo_Ideal", - "Buckaroo_PayPal", - "CardSave", - "Coinbase", - "Dummy", - "Eway_Rapid", - "FirstData_Connect", - "GoCardless", - "Manual", - "Migs_ThreeParty", - "Migs_TwoParty", - "Mollie", - "MultiSafepay", - "Netaxept", - "NetBanx", - "PayFast", - "Payflow_Pro", - "PaymentExpress_PxPay", - "PaymentExpress_PxPost", - "PayPal_Express", - "PayPal_Pro", - "Pin", - "SagePay_Direct", - "SagePay_Server", - "SecurePay_DirectPost", - "Stripe", - "TargetPay_Directebanking", - "TargetPay_Ideal", - "TargetPay_Mrcash", - "WorldPay" - ] + "dev-master": "1.4-dev" + } }, "autoload": { - "psr-0": { - "Omnipay\\Common\\": "src/" + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" }, - "classmap": [ - "src/Omnipay/Omnipay.php" + "files": [ + "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -181,66 +165,58 @@ ], "authors": [ { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" - }, - { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-common/contributors" + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" } ], - "description": "Common components for Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-common", + "description": "Guzzle promises library", "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "purchase" + "promise" ], - "time": "2016-07-07 09:52:09" + "time": "2020-09-21T06:06:31+00:00" }, { - "name": "symfony/event-dispatcher", - "version": "2.8.x-dev", + "name": "guzzlehttp/psr7", + "version": "1.x-dev", "source": { "type": "git", - "url": "https://github.com/symfony/event-dispatcher.git", - "reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9" + "url": "https://github.com/guzzle/psr7.git", + "reference": "ba0f9e2b36630745137a79df1674da01cd0df461" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/b180b70439dca70049b6b9b7e21d75e6e5d7aca9", - "reference": "b180b70439dca70049b6b9b7e21d75e6e5d7aca9", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/ba0f9e2b36630745137a79df1674da01cd0df461", + "reference": "ba0f9e2b36630745137a79df1674da01cd0df461", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.4.0", + "psr/http-message": "~1.0", + "ralouphie/getallheaders": "^2.0.5 || ^3.0.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" }, "require-dev": { - "psr/log": "~1.0", - "symfony/config": "~2.0,>=2.0.5|~3.0.0", - "symfony/dependency-injection": "~2.6|~3.0.0", - "symfony/expression-language": "~2.6|~3.0.0", - "symfony/stopwatch": "~2.3|~3.0.0" + "ext-zlib": "*", + "phpunit/phpunit": "~4.8.36 || ^5.7.27 || ^6.5.8" }, "suggest": { - "symfony/dependency-injection": "", - "symfony/http-kernel": "" + "laminas/laminas-httphandlerrunner": "Emit PSR-7 responses" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "1.7-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\EventDispatcher\\": "" + "GuzzleHttp\\Psr7\\": "src/" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "src/functions_include.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -249,52 +225,133 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" } ], - "description": "Symfony EventDispatcher Component", - "homepage": "https://symfony.com", - "time": "2016-06-29 05:29:29" + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "psr-7", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2020-09-19T15:30:49+00:00" }, { - "name": "symfony/http-foundation", + "name": "league/omnipay", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/symfony/http-foundation.git", - "reference": "1c9b7deebc55aed2d36c05399b22129522ec4ca2" + "url": "https://github.com/thephpleague/omnipay.git", + "reference": "048c42c8a6a7a84b3b26a82c906b526babc85d41" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/omnipay/zipball/048c42c8a6a7a84b3b26a82c906b526babc85d41", + "reference": "048c42c8a6a7a84b3b26a82c906b526babc85d41", + "shasum": "" + }, + "require": { + "omnipay/common": "^3", + "php": "^5.6|^7", + "php-http/guzzle6-adapter": "^1.1|^2" + }, + "require-dev": { + "omnipay/tests": "^3" + }, + "type": "metapackage", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Adrian Macneil", + "email": "adrian@adrianmacneil.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + } + ], + "description": "Omnipay payment processing library", + "homepage": "https://omnipay.thephpleague.com/", + "keywords": [ + "checkout", + "creditcard", + "omnipay", + "payment" + ], + "time": "2020-09-21T15:27:06+00:00" + }, + { + "name": "moneyphp/money", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/moneyphp/money.git", + "reference": "512333ef834bd77f76e865a30eb5963d480e2ed7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/http-foundation/zipball/1c9b7deebc55aed2d36c05399b22129522ec4ca2", - "reference": "1c9b7deebc55aed2d36c05399b22129522ec4ca2", + "url": "https://api.github.com/repos/moneyphp/money/zipball/512333ef834bd77f76e865a30eb5963d480e2ed7", + "reference": "512333ef834bd77f76e865a30eb5963d480e2ed7", "shasum": "" }, "require": { - "php": ">=5.5.9", - "symfony/polyfill-mbstring": "~1.1" + "ext-json": "*", + "php": ">=5.6" }, "require-dev": { - "symfony/expression-language": "~2.8|~3.0" + "cache/taggable-cache": "^0.4.0", + "doctrine/instantiator": "^1.0.5", + "ext-bcmath": "*", + "ext-gmp": "*", + "ext-intl": "*", + "florianv/exchanger": "^1.0", + "florianv/swap": "^3.0", + "friends-of-phpspec/phpspec-code-coverage": "^3.1.1 || ^4.3", + "moneyphp/iso-currencies": "^3.2.1", + "php-http/message": "^1.4", + "php-http/mock-client": "^1.0.0", + "phpspec/phpspec": "^3.4.3", + "phpunit/phpunit": "^5.7.27 || ^6.5.14 || ^7.5.18 || ^8.5", + "psr/cache": "^1.0", + "symfony/phpunit-bridge": "^4" + }, + "suggest": { + "ext-bcmath": "Calculate without integer limits", + "ext-gmp": "Calculate without integer limits", + "ext-intl": "Format Money objects with intl", + "florianv/exchanger": "Exchange rates library for PHP", + "florianv/swap": "Exchange rates library for PHP", + "psr/cache-implementation": "Used for Currency caching" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.2-dev" + "dev-master": "3.x-dev" } }, "autoload": { "psr-4": { - "Symfony\\Component\\HttpFoundation\\": "" - }, - "exclude-from-classmap": [ - "/Tests/" - ] + "Money\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -302,50 +359,71 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Mathias Verraes", + "email": "mathias@verraes.net", + "homepage": "http://verraes.net" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Frederik Bosch", + "email": "f.bosch@genkgo.nl" } ], - "description": "Symfony HttpFoundation Component", - "homepage": "https://symfony.com", - "time": "2016-07-10 09:37:41" + "description": "PHP implementation of Fowler's Money pattern", + "homepage": "http://moneyphp.org", + "keywords": [ + "Value Object", + "money", + "vo" + ], + "time": "2020-06-22T11:38:08+00:00" }, { - "name": "symfony/polyfill-mbstring", + "name": "omnipay/common", "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8a6bdec191138e01c92ae026e5aacb7b3e66267d" + "url": "https://github.com/thephpleague/omnipay-common.git", + "reference": "0d1f4486c1c873537ac030d37c7ce2986c4de1d2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8a6bdec191138e01c92ae026e5aacb7b3e66267d", - "reference": "8a6bdec191138e01c92ae026e5aacb7b3e66267d", + "url": "https://api.github.com/repos/thephpleague/omnipay-common/zipball/0d1f4486c1c873537ac030d37c7ce2986c4de1d2", + "reference": "0d1f4486c1c873537ac030d37c7ce2986c4de1d2", "shasum": "" }, "require": { - "php": ">=5.3.3" + "moneyphp/money": "^3.1", + "php": "^5.6|^7", + "php-http/client-implementation": "^1", + "php-http/discovery": "^1.2.1", + "php-http/message": "^1.5", + "symfony/http-foundation": "^2.1|^3|^4|^5" + }, + "require-dev": { + "omnipay/tests": "^3", + "php-http/mock-client": "^1", + "phpro/grumphp": "^0.14", + "squizlabs/php_codesniffer": "^3.5" }, "suggest": { - "ext-mbstring": "For best performance" + "league/omnipay": "The default Omnipay package provides a default HTTP Adapter." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Omnipay\\Common\\": "src/Common" }, - "files": [ - "bootstrap.php" + "classmap": [ + "src/Omnipay.php" ] }, "notification-url": "https://packagist.org/downloads/", @@ -354,282 +432,2604 @@ ], "authors": [ { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" + "name": "Adrian Macneil", + "email": "adrian@adrianmacneil.com" }, { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + }, + { + "name": "Jason Judge", + "email": "jason.judge@consil.co.uk" + }, + { + "name": "Del" + }, + { + "name": "Omnipay Contributors", + "homepage": "https://github.com/thephpleague/omnipay-common/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", - "homepage": "https://symfony.com", + "description": "Common components for Omnipay payment processing library", + "homepage": "https://github.com/thephpleague/omnipay-common", "keywords": [ - "compatibility", - "mbstring", + "gateway", + "merchant", + "omnipay", + "pay", + "payment", + "purchase" + ], + "time": "2020-08-20T18:22:12+00:00" + }, + { + "name": "paragonie/random_compat", + "version": "v9.99.99.x-dev", + "source": { + "type": "git", + "url": "https://github.com/paragonie/random_compat.git", + "reference": "0947f25b883d4172df340a0d95f1b7cdabc5368a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/paragonie/random_compat/zipball/0947f25b883d4172df340a0d95f1b7cdabc5368a", + "reference": "0947f25b883d4172df340a0d95f1b7cdabc5368a", + "shasum": "" + }, + "require": { + "php": "^7" + }, + "require-dev": { + "phpunit/phpunit": "4.*|5.*", + "vimeo/psalm": "^1" + }, + "type": "library", + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Paragon Initiative Enterprises", + "email": "security@paragonie.com", + "homepage": "https://paragonie.com" + } + ], + "description": "PHP 5.x polyfill for random_bytes() and random_int() from PHP 7", + "keywords": [ + "csprng", "polyfill", - "portable", - "shim" + "pseudorandom", + "random" ], - "time": "2016-06-29 14:58:48" - } - ], - "packages-dev": [ + "time": "2018-08-07T13:07:48+00:00" + }, { - "name": "hamcrest/hamcrest-php", - "version": "1.2.x-dev", + "name": "php-http/discovery", + "version": "1.11.0", "source": { "type": "git", - "url": "https://github.com/hamcrest/hamcrest-php.git", - "reference": "b72949ccf2f640e7de66ff7dd92d83f577ce782e" + "url": "https://github.com/php-http/discovery.git", + "reference": "87b580cd54244512ba931fe1e3b0b506e5a00dd6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/b72949ccf2f640e7de66ff7dd92d83f577ce782e", - "reference": "b72949ccf2f640e7de66ff7dd92d83f577ce782e", + "url": "https://api.github.com/repos/php-http/discovery/zipball/87b580cd54244512ba931fe1e3b0b506e5a00dd6", + "reference": "87b580cd54244512ba931fe1e3b0b506e5a00dd6", "shasum": "" }, "require": { - "php": "^5.3|^7.0" + "php": "^7.1 || ^8.0" }, - "replace": { - "cordoval/hamcrest-php": "*", - "davedevelopment/hamcrest-php": "*", - "kodova/hamcrest-php": "*" + "conflict": { + "nyholm/psr7": "<1.0" }, "require-dev": { - "phpunit/php-file-iterator": "1.3.3", - "phpunit/phpunit": "~4.0", - "satooshi/php-coveralls": "^1.0" + "graham-campbell/phpspec-skip-example-extension": "^5.0", + "php-http/httplug": "^1.0 || ^2.0", + "php-http/message-factory": "^1.0", + "phpspec/phpspec": "^5.1 || ^6.1", + "puli/composer-plugin": "1.0.0-beta10" + }, + "suggest": { + "php-http/message": "Allow to use Guzzle, Diactoros or Slim Framework factories", + "puli/composer-plugin": "Sets up Puli which is recommended for Discovery to work. Check http://docs.php-http.org/en/latest/discovery.html for more details." }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.9-dev" } }, "autoload": { - "classmap": [ - "hamcrest" - ], - "files": [ - "hamcrest/Hamcrest.php" - ] + "psr-4": { + "Http\\Discovery\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD" + "MIT" ], - "description": "This is the PHP port of Hamcrest Matchers", + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Finds installed HTTPlug implementations and PSR-7 message factories", + "homepage": "http://php-http.org", "keywords": [ - "test" + "adapter", + "client", + "discovery", + "factory", + "http", + "message", + "psr7" ], - "time": "2016-01-19 12:08:55" + "time": "2020-09-22T06:59:55+00:00" }, { - "name": "mockery/mockery", - "version": "0.9.x-dev", + "name": "php-http/guzzle6-adapter", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/padraic/mockery.git", - "reference": "0f3617e31907c2f5a061cb2e652596449ddd54f7" + "url": "https://github.com/php-http/guzzle6-adapter.git", + "reference": "bd7b4056e083b62ab98442a4459fd3f163027ec0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/padraic/mockery/zipball/0f3617e31907c2f5a061cb2e652596449ddd54f7", - "reference": "0f3617e31907c2f5a061cb2e652596449ddd54f7", + "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/bd7b4056e083b62ab98442a4459fd3f163027ec0", + "reference": "bd7b4056e083b62ab98442a4459fd3f163027ec0", "shasum": "" }, "require": { - "hamcrest/hamcrest-php": "~1.1", - "lib-pcre": ">=7.0", - "php": ">=5.3.2" + "guzzlehttp/guzzle": "^6.0", + "php": "^7.1", + "php-http/httplug": "^2.0", + "psr/http-client": "^1.0" + }, + "provide": { + "php-http/async-client-implementation": "1.0", + "php-http/client-implementation": "1.0", + "psr/http-client-implementation": "1.0" }, "require-dev": { - "phpunit/phpunit": "~4.0" + "ext-curl": "*", + "php-http/client-integration-tests": "^2.0", + "phpunit/phpunit": "^7.4" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "0.9.x-dev" + "dev-master": "2.x-dev" } }, "autoload": { - "psr-0": { - "Mockery": "library/" + "psr-4": { + "Http\\Adapter\\Guzzle6\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Pádraic Brady", - "email": "padraic.brady@gmail.com", - "homepage": "http://blog.astrumfutura.com" + "name": "David de Boer", + "email": "david@ddeboer.nl" }, { - "name": "Dave Marshall", - "email": "dave.marshall@atstsolutions.co.uk", - "homepage": "http://davedevelopment.co.uk" + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" } ], - "description": "Mockery is a simple yet flexible PHP mock object framework for use in unit testing with PHPUnit, PHPSpec or any other testing framework. Its core goal is to offer a test double framework with a succinct API capable of clearly defining all possible object operations and interactions using a human readable Domain Specific Language (DSL). Designed as a drop in alternative to PHPUnit's phpunit-mock-objects library, Mockery is easy to integrate with PHPUnit and can operate alongside phpunit-mock-objects without the World ending.", - "homepage": "http://github.com/padraic/mockery", + "description": "Guzzle 6 HTTP Adapter", + "homepage": "http://httplug.io", "keywords": [ - "BDD", - "TDD", - "library", - "mock", - "mock objects", - "mockery", - "stub", - "test", - "test double", - "testing" + "Guzzle", + "http" ], - "time": "2016-07-14 08:27:13" + "time": "2019-12-20T11:46:55+00:00" }, { - "name": "omnipay/tests", + "name": "php-http/httplug", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-http/httplug.git", + "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/httplug/zipball/191a0a1b41ed026b717421931f8d3bd2514ffbf9", + "reference": "191a0a1b41ed026b717421931f8d3bd2514ffbf9", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "php-http/promise": "^1.1", + "psr/http-client": "^1.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "friends-of-phpspec/phpspec-code-coverage": "^4.1", + "phpspec/phpspec": "^5.1 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Eric GELOEN", + "email": "geloen.eric@gmail.com" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com", + "homepage": "https://sagikazarmark.hu" + } + ], + "description": "HTTPlug, the HTTP client abstraction for PHP", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "http" + ], + "time": "2020-07-13T15:43:23+00:00" + }, + { + "name": "php-http/message", + "version": "1.9.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/message.git", + "reference": "2c7256e3c1aba0bfca70f099810f1c7712e00945" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message/zipball/2c7256e3c1aba0bfca70f099810f1c7712e00945", + "reference": "2c7256e3c1aba0bfca70f099810f1c7712e00945", + "shasum": "" + }, + "require": { + "clue/stream-filter": "^1.4.1", + "php": "^7.1", + "php-http/message-factory": "^1.0.2", + "psr/http-message": "^1.0" + }, + "provide": { + "php-http/message-factory-implementation": "1.0" + }, + "require-dev": { + "akeneo/phpspec-skip-example-extension": "^1.0", + "coduo/phpspec-data-provider-extension": "^1.0", + "ergebnis/composer-normalize": "^2.1", + "ext-zlib": "*", + "guzzlehttp/psr7": "^1.0", + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4", + "slim/slim": "^3.0", + "zendframework/zend-diactoros": "^1.0" + }, + "suggest": { + "ext-zlib": "Used with compressor/decompressor streams", + "guzzlehttp/psr7": "Used with Guzzle PSR-7 Factories", + "slim/slim": "Used with Slim Framework PSR-7 implementation", + "zendframework/zend-diactoros": "Used with Diactoros Factories" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.8-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Message\\": "src/" + }, + "files": [ + "src/filters.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "HTTP Message related tools", + "homepage": "http://php-http.org", + "keywords": [ + "http", + "message", + "psr-7" + ], + "time": "2020-08-17T06:33:14+00:00" + }, + { + "name": "php-http/message-factory", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-http/message-factory.git", + "reference": "597f30e6dfd32a85fd7dbe58cb47554b5bad910e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message-factory/zipball/597f30e6dfd32a85fd7dbe58cb47554b5bad910e", + "reference": "597f30e6dfd32a85fd7dbe58cb47554b5bad910e", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Factory interfaces for PSR-7 HTTP Message", + "homepage": "http://php-http.org", + "keywords": [ + "factory", + "http", + "message", + "stream", + "uri" + ], + "time": "2018-12-06T18:41:41+00:00" + }, + { + "name": "php-http/promise", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-http/promise.git", + "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/promise/zipball/4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", + "reference": "4c4c1f9b7289a2ec57cde7f1e9762a5789506f88", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "friends-of-phpspec/phpspec-code-coverage": "^4.3.2", + "phpspec/phpspec": "^5.1.2 || ^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Promise\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Joel Wurtz", + "email": "joel.wurtz@gmail.com" + }, + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Promise used for asynchronous HTTP requests", + "homepage": "http://httplug.io", + "keywords": [ + "promise" + ], + "time": "2020-07-07T09:29:14+00:00" + }, + { + "name": "psr/http-client", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-client.git", + "reference": "22b2ef5687f43679481615605d7a15c557ce85b1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-client/zipball/22b2ef5687f43679481615605d7a15c557ce85b1", + "reference": "22b2ef5687f43679481615605d7a15c557ce85b1", + "shasum": "" + }, + "require": { + "php": "^7.0 || ^8.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Client\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP clients", + "homepage": "https://github.com/php-fig/http-client", + "keywords": [ + "http", + "http-client", + "psr", + "psr-18" + ], + "time": "2020-09-19T09:12:31+00:00" + }, + { + "name": "psr/http-message", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", + "reference": "efd67d1dc14a7ef4fc4e518e7dee91c271d524e4", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for HTTP messages", + "homepage": "https://github.com/php-fig/http-message", + "keywords": [ + "http", + "http-message", + "psr", + "psr-7", + "request", + "response" + ], + "time": "2019-08-29T13:16:46+00:00" + }, + { + "name": "ralouphie/getallheaders", + "version": "3.0.3", + "source": { + "type": "git", + "url": "https://github.com/ralouphie/getallheaders.git", + "reference": "120b605dfeb996808c31b6477290a714d356e822" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/ralouphie/getallheaders/zipball/120b605dfeb996808c31b6477290a714d356e822", + "reference": "120b605dfeb996808c31b6477290a714d356e822", + "shasum": "" + }, + "require": { + "php": ">=5.6" + }, + "require-dev": { + "php-coveralls/php-coveralls": "^2.1", + "phpunit/phpunit": "^5 || ^6.5" + }, + "type": "library", + "autoload": { + "files": [ + "src/getallheaders.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ralph Khattar", + "email": "ralph.khattar@gmail.com" + } + ], + "description": "A polyfill for getallheaders.", + "time": "2019-03-08T08:55:37+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/5fa56b4074d1ae755beb55617ddafe6f5d78f665", + "reference": "5fa56b4074d1ae755beb55617ddafe6f5d78f665", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.2-dev" + }, + "thanks": { + "name": "symfony/contracts", + "url": "https://github.com/symfony/contracts" + } + }, + "autoload": { + "files": [ + "function.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "A generic function and convention to trigger deprecation notices", + "homepage": "https://symfony.com", + "time": "2020-09-07T11:33:47+00:00" + }, + { + "name": "symfony/http-foundation", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/http-foundation.git", + "reference": "dc3be52001c670f768d873f78c47bd333bb02c8d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/http-foundation/zipball/dc3be52001c670f768d873f78c47bd333bb02c8d", + "reference": "dc3be52001c670f768d873f78c47bd333bb02c8d", + "shasum": "" + }, + "require": { + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-mbstring": "~1.1", + "symfony/polyfill-php80": "^1.15" + }, + "require-dev": { + "predis/predis": "~1.0", + "symfony/cache": "^4.4|^5.0", + "symfony/expression-language": "^4.4|^5.0", + "symfony/mime": "^4.4|^5.0" + }, + "suggest": { + "symfony/mime": "To use the file extension guesser" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.2-dev" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Component\\HttpFoundation\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony HttpFoundation Component", + "homepage": "https://symfony.com", + "time": "2020-09-13T05:01:37+00:00" + }, + { + "name": "symfony/polyfill-intl-idn", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-idn.git", + "reference": "045643b91eaa34c4c37150ac477765c13552af33" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-idn/zipball/045643b91eaa34c4c37150ac477765c13552af33", + "reference": "045643b91eaa34c4c37150ac477765c13552af33", + "shasum": "" + }, + "require": { + "php": ">=5.3.3", + "symfony/polyfill-intl-normalizer": "^1.10", + "symfony/polyfill-php70": "^1.10", + "symfony/polyfill-php72": "^1.10" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Idn\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Laurent Bassin", + "email": "laurent@bassin.info" + }, + { + "name": "Trevor Rowbotham", + "email": "trevor.rowbotham@pm.me" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's idn_to_ascii and idn_to_utf8 functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "idn", + "intl", + "polyfill", + "portable", + "shim" + ], + "time": "2020-08-04T21:02:56+00:00" + }, + { + "name": "symfony/polyfill-intl-normalizer", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "reference": "37078a8dd4a2a1e9ab0231af7c6cb671b2ed5a7e", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-intl": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for intl's Normalizer class and related functions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "intl", + "normalizer", + "polyfill", + "portable", + "shim" + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "48928d471ede0548b399f54b0286fe0d0ed79267" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/48928d471ede0548b399f54b0286fe0d0ed79267", + "reference": "48928d471ede0548b399f54b0286fe0d0ed79267", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Mbstring\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill for the Mbstring extension", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "mbstring", + "polyfill", + "portable", + "shim" + ], + "time": "2020-09-14T11:01:58+00:00" + }, + { + "name": "symfony/polyfill-php70", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php70.git", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php70/zipball/0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "reference": "0dd93f2c578bdc9c72697eaa5f1dd25644e618d3", + "shasum": "" + }, + "require": { + "paragonie/random_compat": "~1.0|~2.0|~9.99", + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php70\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php72", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php72.git", + "reference": "639447d008615574653fb3bc60d1986d7172eaae" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", + "reference": "639447d008615574653fb3bc60d1986d7172eaae", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php72\\": "" + }, + "files": [ + "bootstrap.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "symfony/polyfill-php80", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-php80.git", + "reference": "c3616e7b303d0bd8c261de7921c72bf818b52b91" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/c3616e7b303d0bd8c261de7921c72bf818b52b91", + "reference": "c3616e7b303d0bd8c261de7921c72bf818b52b91", + "shasum": "" + }, + "require": { + "php": ">=7.0.8" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" + } + }, + "autoload": { + "psr-4": { + "Symfony\\Polyfill\\Php80\\": "" + }, + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ion Bazan", + "email": "ion.bazan@gmail.com" + }, + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "homepage": "https://symfony.com", + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-09-14T10:02:33+00:00" + } + ], + "packages-dev": [ + { + "name": "doctrine/instantiator", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/doctrine/instantiator.git", + "reference": "3e7a22aed197e9333cc929e7f6b4300bdae91fcc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/3e7a22aed197e9333cc929e7f6b4300bdae91fcc", + "reference": "3e7a22aed197e9333cc929e7f6b4300bdae91fcc", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "require-dev": { + "doctrine/coding-standard": "^6.0", + "ext-pdo": "*", + "ext-phar": "*", + "phpbench/phpbench": "^0.13", + "phpstan/phpstan-phpunit": "^0.11", + "phpstan/phpstan-shim": "^0.11", + "phpunit/phpunit": "^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "psr-4": { + "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Marco Pivetta", + "email": "ocramius@gmail.com", + "homepage": "http://ocramius.github.com/" + } + ], + "description": "A small, lightweight utility to instantiate objects in PHP without invoking their constructors", + "homepage": "https://www.doctrine-project.org/projects/instantiator.html", + "keywords": [ + "constructor", + "instantiate" + ], + "time": "2020-06-15T18:51:04+00:00" + }, + { + "name": "hamcrest/hamcrest-php", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/hamcrest/hamcrest-php.git", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/hamcrest/hamcrest-php/zipball/8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "reference": "8c3d0a3f6af734494ad8f6fbbee0ba92422859f3", + "shasum": "" + }, + "require": { + "php": "^5.3|^7.0|^8.0" + }, + "replace": { + "cordoval/hamcrest-php": "*", + "davedevelopment/hamcrest-php": "*", + "kodova/hamcrest-php": "*" + }, + "require-dev": { + "phpunit/php-file-iterator": "^1.4 || ^2.0", + "phpunit/phpunit": "^4.8.36 || ^5.7 || ^6.5 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1-dev" + } + }, + "autoload": { + "classmap": [ + "hamcrest" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "description": "This is the PHP port of Hamcrest Matchers", + "keywords": [ + "test" + ], + "time": "2020-07-09T08:09:16+00:00" + }, + { + "name": "mockery/mockery", + "version": "1.3.x-dev", + "source": { + "type": "git", + "url": "https://github.com/mockery/mockery.git", + "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/mockery/mockery/zipball/60fa2f67f6e4d3634bb4a45ff3171fa52215800d", + "reference": "60fa2f67f6e4d3634bb4a45ff3171fa52215800d", + "shasum": "" + }, + "require": { + "hamcrest/hamcrest-php": "^2.0.1", + "lib-pcre": ">=7.0", + "php": ">=5.6.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7.10|^6.5|^7.5|^8.5|^9.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.3.x-dev" + } + }, + "autoload": { + "psr-0": { + "Mockery": "library/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Pádraic Brady", + "email": "padraic.brady@gmail.com", + "homepage": "http://blog.astrumfutura.com" + }, + { + "name": "Dave Marshall", + "email": "dave.marshall@atstsolutions.co.uk", + "homepage": "http://davedevelopment.co.uk" + } + ], + "description": "Mockery is a simple yet flexible PHP mock object framework", + "homepage": "https://github.com/mockery/mockery", + "keywords": [ + "BDD", + "TDD", + "library", + "mock", + "mock objects", + "mockery", + "stub", + "test", + "test double", + "testing" + ], + "time": "2020-08-11T18:10:21+00:00" + }, + { + "name": "myclabs/deep-copy", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "a3409d10079990eeb489c3fead0ac070b5b38895" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/a3409d10079990eeb489c3fead0ac070b5b38895", + "reference": "a3409d10079990eeb489c3fead0ac070b5b38895", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0" + }, + "replace": { + "myclabs/deep-copy": "self.version" + }, + "require-dev": { + "doctrine/collections": "^1.0", + "doctrine/common": "^2.6", + "phpunit/phpunit": "^7.1" + }, + "type": "library", + "autoload": { + "psr-4": { + "DeepCopy\\": "src/DeepCopy/" + }, + "files": [ + "src/DeepCopy/deep_copy.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "description": "Create deep copies (clones) of your objects", + "keywords": [ + "clone", + "copy", + "duplicate", + "object", + "object graph" + ], + "time": "2020-08-28T16:31:07+00:00" + }, + { + "name": "omnipay/tests", "version": "dev-master", "source": { "type": "git", "url": "https://github.com/thephpleague/omnipay-tests.git", - "reference": "137fdeaa8ef449c88ced15a50e02821732e7a125" + "reference": "67410547cfeb49a678400da4e2dc1b27eb7225c2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/omnipay-tests/zipball/67410547cfeb49a678400da4e2dc1b27eb7225c2", + "reference": "67410547cfeb49a678400da4e2dc1b27eb7225c2", + "shasum": "" + }, + "require": { + "guzzlehttp/psr7": "^1", + "mockery/mockery": "^1", + "php-http/mock-client": "^1.1", + "phpunit/phpunit": "^5.7|^6" + }, + "require-dev": { + "omnipay/common": "^3", + "symfony/http-foundation": "^3|^4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Omnipay\\Tests\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Adrian Macneil", + "email": "adrian@adrianmacneil.com" + }, + { + "name": "Barry vd. Heuvel", + "email": "barryvdh@gmail.com" + }, + { + "name": "Omnipay Contributors", + "homepage": "https://github.com/thephpleague/omnipay-tests/contributors" + } + ], + "description": "Testing components for Omnipay payment processing library", + "homepage": "https://github.com/thephpleague/omnipay-tests", + "keywords": [ + "omnipay" + ], + "time": "2020-09-09T11:17:31+00:00" + }, + { + "name": "phar-io/manifest", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/manifest.git", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/2df402786ab5368a0169091f61a7c1e0eb6852d0", + "reference": "2df402786ab5368a0169091f61a7c1e0eb6852d0", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-phar": "*", + "phar-io/version": "^1.0.1", + "php": "^5.6 || ^7.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "time": "2017-03-05T18:14:27+00:00" + }, + { + "name": "phar-io/version", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/phar-io/version.git", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phar-io/version/zipball/a70c0ced4be299a63d32fa96d9281d03e94041df", + "reference": "a70c0ced4be299a63d32fa96d9281d03e94041df", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + }, + { + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" + } + ], + "description": "Library for handling version information and constraints", + "time": "2017-03-05T17:38:23+00:00" + }, + { + "name": "php-http/client-common", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-http/client-common.git", + "reference": "e37e46c610c87519753135fb893111798c69076a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/client-common/zipball/e37e46c610c87519753135fb893111798c69076a", + "reference": "e37e46c610c87519753135fb893111798c69076a", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "php-http/httplug": "^2.0", + "php-http/message": "^1.6", + "php-http/message-factory": "^1.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "symfony/options-resolver": "^2.6 || ^3.4.20 || ~4.0.15 || ~4.1.9 || ^4.2.1 || ^5.0", + "symfony/polyfill-php80": "^1.17" + }, + "require-dev": { + "doctrine/instantiator": "^1.1", + "guzzlehttp/psr7": "^1.4", + "nyholm/psr7": "^1.2", + "phpspec/phpspec": "^5.1 || ^6.0", + "phpspec/prophecy": "^1.10.2", + "phpunit/phpunit": "^7.5.15 || ^8.5 || ^9.3" + }, + "suggest": { + "ext-json": "To detect JSON responses with the ContentTypePlugin", + "ext-libxml": "To detect XML responses with the ContentTypePlugin", + "php-http/cache-plugin": "PSR-6 Cache plugin", + "php-http/logger-plugin": "PSR-3 Logger plugin", + "php-http/stopwatch-plugin": "Symfony Stopwatch plugin" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.3.x-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Client\\Common\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + } + ], + "description": "Common HTTP Client implementations and tools for HTTPlug", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "common", + "http", + "httplug" + ], + "time": "2020-07-21T10:04:13+00:00" + }, + { + "name": "php-http/mock-client", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-http/mock-client.git", + "reference": "1f89dc2dcfcf7c2aa69a2045fd05d67c52f8b612" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/mock-client/zipball/1f89dc2dcfcf7c2aa69a2045fd05d67c52f8b612", + "reference": "1f89dc2dcfcf7c2aa69a2045fd05d67c52f8b612", + "shasum": "" + }, + "require": { + "php": "^7.1 || ^8.0", + "php-http/client-common": "^1.9 || ^2.0", + "php-http/discovery": "^1.0", + "php-http/httplug": "^1.0 || ^2.0", + "php-http/message-factory": "^1.0", + "psr/http-client": "^1.0", + "psr/http-factory": "^1.0", + "psr/http-message": "^1.0", + "symfony/polyfill-php80": "^1.17" + }, + "provide": { + "php-http/async-client-implementation": "1.0", + "php-http/client-implementation": "1.0" + }, + "require-dev": { + "phpspec/phpspec": "^5.1 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Mock\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "David de Boer", + "email": "david@ddeboer.nl" + } + ], + "description": "Mock HTTP client", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "http", + "mock", + "psr7" + ], + "time": "2020-07-14T08:01:01+00:00" + }, + { + "name": "phpdocumentor/reflection-common", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionCommon.git", + "reference": "cf8df60735d98fd18070b7cab0019ba0831e219c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/cf8df60735d98fd18070b7cab0019ba0831e219c", + "reference": "cf8df60735d98fd18070b7cab0019ba0831e219c", + "shasum": "" + }, + "require": { + "php": ">=7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jaap van Otterdijk", + "email": "opensource@ijaap.nl" + } + ], + "description": "Common reflection classes used by phpdocumentor to reflect the code structure", + "homepage": "http://www.phpdoc.org", + "keywords": [ + "FQSEN", + "phpDocumentor", + "phpdoc", + "reflection", + "static analysis" + ], + "time": "2020-06-19T17:42:03+00:00" + }, + { + "name": "phpdocumentor/reflection-docblock", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/069a785b2141f5bcf49f3e353548dc1cce6df556", + "reference": "069a785b2141f5bcf49f3e353548dc1cce6df556", + "shasum": "" + }, + "require": { + "ext-filter": "*", + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.2", + "phpdocumentor/type-resolver": "^1.3", + "webmozart/assert": "^1.9.1" + }, + "require-dev": { + "mockery/mockery": "~1.3.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + }, + { + "name": "Jaap van Otterdijk", + "email": "account@ijaap.nl" + } + ], + "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "time": "2020-09-03T19:13:55+00:00" + }, + { + "name": "phpdocumentor/type-resolver", + "version": "1.x-dev", + "source": { + "type": "git", + "url": "https://github.com/phpDocumentor/TypeResolver.git", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "reference": "6a467b8989322d92aa1c8bf2bebcc6e5c2ba55c0", + "shasum": "" + }, + "require": { + "php": "^7.2 || ^8.0", + "phpdocumentor/reflection-common": "^2.0" + }, + "require-dev": { + "ext-tokenizer": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-1.x": "1.x-dev" + } + }, + "autoload": { + "psr-4": { + "phpDocumentor\\Reflection\\": "src" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Mike van Riel", + "email": "me@mikevanriel.com" + } + ], + "description": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "time": "2020-09-17T18:55:26+00:00" + }, + { + "name": "phpspec/prophecy", + "version": "v1.10.3", + "source": { + "type": "git", + "url": "https://github.com/phpspec/prophecy.git", + "reference": "451c3cd1418cf640de218914901e51b064abb093" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", + "reference": "451c3cd1418cf640de218914901e51b064abb093", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.2", + "php": "^5.3|^7.0", + "phpdocumentor/reflection-docblock": "^2.0|^3.0.2|^4.0|^5.0", + "sebastian/comparator": "^1.2.3|^2.0|^3.0|^4.0", + "sebastian/recursion-context": "^1.0|^2.0|^3.0|^4.0" + }, + "require-dev": { + "phpspec/phpspec": "^2.5 || ^3.2", + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.5 || ^7.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.10.x-dev" + } + }, + "autoload": { + "psr-4": { + "Prophecy\\": "src/Prophecy" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Konstantin Kudryashov", + "email": "ever.zet@gmail.com", + "homepage": "http://everzet.com" + }, + { + "name": "Marcello Duarte", + "email": "marcello.duarte@gmail.com" + } + ], + "description": "Highly opinionated mocking framework for PHP 5.3+", + "homepage": "https://github.com/phpspec/prophecy", + "keywords": [ + "Double", + "Dummy", + "fake", + "mock", + "spy", + "stub" + ], + "time": "2020-03-05T15:02:03+00:00" + }, + { + "name": "phpunit/php-code-coverage", + "version": "5.3.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-code-coverage.git", + "reference": "83f09c29758c52e71bdb81ad2cc9124b85b5a4ef" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/83f09c29758c52e71bdb81ad2cc9124b85b5a4ef", + "reference": "83f09c29758c52e71bdb81ad2cc9124b85b5a4ef", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-xmlwriter": "*", + "php": "^7.0", + "phpunit/php-file-iterator": "^1.4.2", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-token-stream": "^2.0.1", + "sebastian/code-unit-reverse-lookup": "^1.0.1", + "sebastian/environment": "^3.0", + "sebastian/version": "^2.0.1", + "theseer/tokenizer": "^1.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" + }, + "suggest": { + "ext-xdebug": "^2.5.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.3.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", + "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "keywords": [ + "coverage", + "testing", + "xunit" + ], + "time": "2018-04-07T12:06:18+00:00" + }, + { + "name": "phpunit/php-file-iterator", + "version": "1.4.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-file-iterator.git", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/730b01bc3e867237eaac355e06a36b85dd93a8b4", + "reference": "730b01bc3e867237eaac355e06a36b85dd93a8b4", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "FilterIterator implementation that filters files based on a list of suffixes.", + "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", + "keywords": [ + "filesystem", + "iterator" + ], + "time": "2017-11-27T13:52:08+00:00" + }, + { + "name": "phpunit/php-text-template", + "version": "1.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "keywords": [ + "template" + ], + "time": "2015-06-21T13:50:34+00:00" + }, + { + "name": "phpunit/php-timer", + "version": "1.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "9513098641797ce5f459dbc1de5a54c29b0ec1fb" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/9513098641797ce5f459dbc1de5a54c29b0ec1fb", + "reference": "9513098641797ce5f459dbc1de5a54c29b0ec1fb", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.35 || ^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sb@sebastian-bergmann.de", + "role": "lead" + } + ], + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", + "keywords": [ + "timer" + ], + "time": "2018-01-06T05:27:16+00:00" + }, + { + "name": "phpunit/php-token-stream", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/php-token-stream.git", + "reference": "791198a2c6254db10131eecfe8c06670700904db" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/791198a2c6254db10131eecfe8c06670700904db", + "reference": "791198a2c6254db10131eecfe8c06670700904db", + "shasum": "" + }, + "require": { + "ext-tokenizer": "*", + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Wrapper around PHP's tokenizer extension.", + "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "keywords": [ + "tokenizer" + ], + "abandoned": true, + "time": "2017-11-27T05:48:46+00:00" + }, + { + "name": "phpunit/phpunit", + "version": "6.5.14", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit.git", + "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/bac23fe7ff13dbdb461481f706f0e9fe746334b7", + "reference": "bac23fe7ff13dbdb461481f706f0e9fe746334b7", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-json": "*", + "ext-libxml": "*", + "ext-mbstring": "*", + "ext-xml": "*", + "myclabs/deep-copy": "^1.6.1", + "phar-io/manifest": "^1.0.1", + "phar-io/version": "^1.0", + "php": "^7.0", + "phpspec/prophecy": "^1.7", + "phpunit/php-code-coverage": "^5.3", + "phpunit/php-file-iterator": "^1.4.3", + "phpunit/php-text-template": "^1.2.1", + "phpunit/php-timer": "^1.0.9", + "phpunit/phpunit-mock-objects": "^5.0.9", + "sebastian/comparator": "^2.1", + "sebastian/diff": "^2.0", + "sebastian/environment": "^3.1", + "sebastian/exporter": "^3.1", + "sebastian/global-state": "^2.0", + "sebastian/object-enumerator": "^3.0.3", + "sebastian/resource-operations": "^1.0", + "sebastian/version": "^2.0.1" + }, + "conflict": { + "phpdocumentor/reflection-docblock": "3.0.2", + "phpunit/dbunit": "<3.0" + }, + "require-dev": { + "ext-pdo": "*" + }, + "suggest": { + "ext-xdebug": "*", + "phpunit/php-invoker": "^1.1" + }, + "bin": [ + "phpunit" + ], + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.5.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "The PHP Unit Testing framework.", + "homepage": "https://phpunit.de/", + "keywords": [ + "phpunit", + "testing", + "xunit" + ], + "time": "2019-02-01T05:22:47+00:00" + }, + { + "name": "phpunit/phpunit-mock-objects", + "version": "5.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", + "reference": "13862f9c620ffbc8895792abe2a9e473326fb905" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/13862f9c620ffbc8895792abe2a9e473326fb905", + "reference": "13862f9c620ffbc8895792abe2a9e473326fb905", + "shasum": "" + }, + "require": { + "doctrine/instantiator": "^1.0.5", + "php": "^7.0", + "phpunit/php-text-template": "^1.2.1", + "sebastian/exporter": "^3.1" + }, + "conflict": { + "phpunit/phpunit": "<6.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.5.11" + }, + "suggest": { + "ext-soap": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Mock Object library for PHPUnit", + "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "keywords": [ + "mock", + "xunit" + ], + "abandoned": true, + "time": "2018-09-09T05:48:43+00:00" + }, + { + "name": "psr/http-factory", + "version": "dev-master", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-factory.git", + "reference": "36fa03d50ff82abcae81860bdaf4ed9a1510c7cd" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-factory/zipball/36fa03d50ff82abcae81860bdaf4ed9a1510c7cd", + "reference": "36fa03d50ff82abcae81860bdaf4ed9a1510c7cd", + "shasum": "" + }, + "require": { + "php": ">=7.0.0", + "psr/http-message": "^1.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Http\\Message\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "https://www.php-fig.org/" + } + ], + "description": "Common interfaces for PSR-7 HTTP message factories", + "keywords": [ + "factory", + "http", + "message", + "psr", + "psr-17", + "psr-7", + "request", + "response" + ], + "time": "2020-09-17T16:52:55+00:00" + }, + { + "name": "sebastian/code-unit-reverse-lookup", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "reference": "4419fcdb5eabb9caa61a27c7a1db532a6b55dd18", + "shasum": "" + }, + "require": { + "php": "^5.6 || ^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^5.7 || ^6.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Looks up which function or method a line of code belongs to", + "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", + "time": "2017-03-04T06:30:41+00:00" + }, + { + "name": "sebastian/comparator", + "version": "2.1.3", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/comparator.git", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/34369daee48eafb2651bea869b4b15d75ccc35f9", + "reference": "34369daee48eafb2651bea869b4b15d75ccc35f9", + "shasum": "" + }, + "require": { + "php": "^7.0", + "sebastian/diff": "^2.0 || ^3.0", + "sebastian/exporter": "^3.1" + }, + "require-dev": { + "phpunit/phpunit": "^6.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@2bepublished.at" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides the functionality to compare PHP values for equality", + "homepage": "https://github.com/sebastianbergmann/comparator", + "keywords": [ + "comparator", + "compare", + "equality" + ], + "time": "2018-02-01T13:46:46+00:00" + }, + { + "name": "sebastian/diff", + "version": "2.0.x-dev", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/diff.git", + "reference": "abcc70409ddfb310a8cb41ef0c2e857425438cf4" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/abcc70409ddfb310a8cb41ef0c2e857425438cf4", + "reference": "abcc70409ddfb310a8cb41ef0c2e857425438cf4", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.2" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Kore Nordmann", + "email": "mail@kore-nordmann.de" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Diff implementation", + "homepage": "https://github.com/sebastianbergmann/diff", + "keywords": [ + "diff" + ], + "time": "2017-12-14T11:32:19+00:00" + }, + { + "name": "sebastian/environment", + "version": "3.1.0", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/environment.git", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "reference": "cd0871b3975fb7fc44d11314fd1ee20925fce4f5", + "shasum": "" + }, + "require": { + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1.x-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Provides functionality to handle HHVM/PHP environments", + "homepage": "http://www.github.com/sebastianbergmann/environment", + "keywords": [ + "Xdebug", + "environment", + "hhvm" + ], + "time": "2017-07-01T08:51:00+00:00" + }, + { + "name": "sebastian/exporter", + "version": "3.1.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/exporter.git", + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/omnipay-tests/zipball/137fdeaa8ef449c88ced15a50e02821732e7a125", - "reference": "137fdeaa8ef449c88ced15a50e02821732e7a125", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/68609e1261d215ea5b21b7987539cbfbe156ec3e", + "reference": "68609e1261d215ea5b21b7987539cbfbe156ec3e", "shasum": "" }, "require": { - "guzzle/plugin-mock": "~3.1", - "mockery/mockery": "~0.8", - "phpunit/phpunit": "~3.7.0", - "squizlabs/php_codesniffer": "~1.5" + "php": "^7.0", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "ext-mbstring": "*", + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.1.x-dev" } }, "autoload": { - "psr-0": { - "Omnipay\\Tests\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Adrian Macneil", - "email": "adrian@adrianmacneil.com" + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" }, { - "name": "Omnipay Contributors", - "homepage": "https://github.com/thephpleague/omnipay-tests/contributors" + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, + { + "name": "Volker Dusch", + "email": "github@wallbash.com" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" + }, + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" } ], - "description": "Testing components for Omnipay payment processing library", - "homepage": "https://github.com/thephpleague/omnipay-tests", + "description": "Provides the functionality to export PHP variables for visualization", + "homepage": "http://www.github.com/sebastianbergmann/exporter", "keywords": [ - "gateway", - "merchant", - "omnipay", - "pay", - "payment", - "purchase" + "export", + "exporter" ], - "time": "2016-07-07 09:35:23" + "time": "2019-09-14T09:02:43+00:00" }, { - "name": "phpunit/php-code-coverage", - "version": "1.2.x-dev", + "name": "sebastian/global-state", + "version": "2.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b" + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b", - "reference": "fe2466802556d3fe4e4d1d58ffd3ccfd0a19be0b", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-file-iterator": ">=1.3.0@stable", - "phpunit/php-text-template": ">=1.2.0@stable", - "phpunit/php-token-stream": ">=1.1.3,<1.3.0" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "3.7.*@dev" + "phpunit/phpunit": "^6.0" }, "suggest": { - "ext-dom": "*", - "ext-xdebug": ">=2.0.5" + "ext-uopz": "*" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Library that provides collection, processing, and rendering functionality for PHP code coverage information.", - "homepage": "https://github.com/sebastianbergmann/php-code-coverage", + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", "keywords": [ - "coverage", - "testing", - "xunit" + "global state" ], - "time": "2014-09-02 10:13:14" + "time": "2017-04-27T15:39:26+00:00" }, { - "name": "phpunit/php-file-iterator", - "version": "dev-master", + "name": "sebastian/object-enumerator", + "version": "3.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0" + "url": "https://github.com/sebastianbergmann/object-enumerator.git", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/6150bf2c35d3fc379e50c7602b75caceaa39dbf0", - "reference": "6150bf2c35d3fc379e50c7602b75caceaa39dbf0", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/7cfd9e65d11ffb5af41198476395774d4c8a84c5", + "reference": "7cfd9e65d11ffb5af41198476395774d4c8a84c5", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0", + "sebastian/object-reflector": "^1.1.1", + "sebastian/recursion-context": "^3.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.4.x-dev" + "dev-master": "3.0.x-dev" } }, "autoload": { @@ -644,36 +3044,39 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "FilterIterator implementation that filters files based on a list of suffixes.", - "homepage": "https://github.com/sebastianbergmann/php-file-iterator/", - "keywords": [ - "filesystem", - "iterator" - ], - "time": "2015-06-21 13:08:43" + "description": "Traverses array structures and object graphs to enumerate all referenced objects", + "homepage": "https://github.com/sebastianbergmann/object-enumerator/", + "time": "2017-08-03T12:35:26+00:00" }, { - "name": "phpunit/php-text-template", - "version": "1.2.1", + "name": "sebastian/object-reflector", + "version": "1.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/object-reflector.git", + "reference": "773f97c67f28de00d397be301821b06708fca0be" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/773f97c67f28de00d397be301821b06708fca0be", + "reference": "773f97c67f28de00d397be301821b06708fca0be", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" + }, + "require-dev": { + "phpunit/phpunit": "^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -686,38 +3089,39 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", - "keywords": [ - "template" - ], - "time": "2015-06-21 13:50:34" + "description": "Allows reflection of object attributes, including inherited and non-public ones", + "homepage": "https://github.com/sebastianbergmann/object-reflector/", + "time": "2017-03-29T09:07:27+00:00" }, { - "name": "phpunit/php-timer", - "version": "1.0.8", + "name": "sebastian/recursion-context", + "version": "3.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260" + "url": "https://github.com/sebastianbergmann/recursion-context.git", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/38e9124049cf1a164f1e4537caf19c99bf1eb260", - "reference": "38e9124049cf1a164f1e4537caf19c99bf1eb260", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", + "reference": "5b0cd723502bac3b006cbf3dbf7a1e3fcefe4fa8", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": "^7.0" }, "require-dev": { - "phpunit/phpunit": "~4|~5" + "phpunit/phpunit": "^6.0" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.0.x-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -728,123 +3132,94 @@ "BSD-3-Clause" ], "authors": [ + { + "name": "Jeff Welch", + "email": "whatthejeff@gmail.com" + }, { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" + }, + { + "name": "Adam Harvey", + "email": "aharvey@php.net" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", - "keywords": [ - "timer" - ], - "time": "2016-05-12 18:03:57" + "description": "Provides functionality to recursively process PHP variables", + "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "time": "2017-03-03T06:23:57+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "1.2.2", + "name": "sebastian/resource-operations", + "version": "1.0.0", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32" + "url": "https://github.com/sebastianbergmann/resource-operations.git", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/ad4e1e23ae01b483c16f600ff1bebec184588e32", - "reference": "ad4e1e23ae01b483c16f600ff1bebec184588e32", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", + "reference": "ce990bb21759f94aeafd30209e8cfcdfa8bc3f52", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=5.3.3" + "php": ">=5.6.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2-dev" + "dev-master": "1.0.x-dev" } }, "autoload": { "classmap": [ - "PHP/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ "BSD-3-Clause" ], "authors": [ { "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "email": "sebastian@phpunit.de" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", - "keywords": [ - "tokenizer" - ], - "time": "2014-03-03 05:10:30" + "description": "Provides a list of PHP built-in functions that operate on resources", + "homepage": "https://www.github.com/sebastianbergmann/resource-operations", + "time": "2015-07-28T20:34:47+00:00" }, { - "name": "phpunit/phpunit", - "version": "3.7.x-dev", + "name": "sebastian/version", + "version": "2.0.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6" + "url": "https://github.com/sebastianbergmann/version.git", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/38709dc22d519a3d1be46849868aa2ddf822bcf6", - "reference": "38709dc22d519a3d1be46849868aa2ddf822bcf6", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", + "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", "shasum": "" }, "require": { - "ext-ctype": "*", - "ext-dom": "*", - "ext-json": "*", - "ext-pcre": "*", - "ext-reflection": "*", - "ext-spl": "*", - "php": ">=5.3.3", - "phpunit/php-code-coverage": "~1.2", - "phpunit/php-file-iterator": "~1.3", - "phpunit/php-text-template": "~1.1", - "phpunit/php-timer": "~1.0", - "phpunit/phpunit-mock-objects": "~1.2", - "symfony/yaml": "~2.0" - }, - "require-dev": { - "pear-pear.php.net/pear": "1.9.4" + "php": ">=5.6" }, - "suggest": { - "phpunit/php-invoker": "~1.1" - }, - "bin": [ - "composer/bin/phpunit" - ], "type": "library", "extra": { "branch-alias": { - "dev-master": "3.7.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { "classmap": [ - "PHPUnit/" + "src/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "", - "../../symfony/yaml/" - ], "license": [ "BSD-3-Clause" ], @@ -855,176 +3230,165 @@ "role": "lead" } ], - "description": "The PHP Unit Testing framework.", - "homepage": "http://www.phpunit.de/", - "keywords": [ - "phpunit", - "testing", - "xunit" - ], - "time": "2014-10-17 09:04:17" + "description": "Library that helps with managing the version number of Git-hosted PHP projects", + "homepage": "https://github.com/sebastianbergmann/version", + "time": "2016-10-03T07:35:21+00:00" }, { - "name": "phpunit/phpunit-mock-objects", - "version": "1.2.x-dev", + "name": "symfony/options-resolver", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git", - "reference": "c39c4511c3b007539eb170c32cbc2af49a07351a" + "url": "https://github.com/symfony/options-resolver.git", + "reference": "c2565c69e23fb6a077ba4dd5b06fee88171b6853" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c39c4511c3b007539eb170c32cbc2af49a07351a", - "reference": "c39c4511c3b007539eb170c32cbc2af49a07351a", + "url": "https://api.github.com/repos/symfony/options-resolver/zipball/c2565c69e23fb6a077ba4dd5b06fee88171b6853", + "reference": "c2565c69e23fb6a077ba4dd5b06fee88171b6853", "shasum": "" }, "require": { - "php": ">=5.3.3", - "phpunit/php-text-template": ">=1.1.1@stable" - }, - "require-dev": { - "phpunit/phpunit": "3.7.*@dev" - }, - "suggest": { - "ext-soap": "*" + "php": ">=7.2.5", + "symfony/deprecation-contracts": "^2.1", + "symfony/polyfill-php73": "~1.0", + "symfony/polyfill-php80": "^1.15" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.2.x-dev" + "dev-master": "5.2-dev" } }, "autoload": { - "classmap": [ - "PHPUnit/" + "psr-4": { + "Symfony\\Component\\OptionsResolver\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", - "include-path": [ - "" - ], "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Sebastian Bergmann", - "email": "sb@sebastian-bergmann.de", - "role": "lead" + "name": "Fabien Potencier", + "email": "fabien@symfony.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "Mock Object library for PHPUnit", - "homepage": "https://github.com/sebastianbergmann/phpunit-mock-objects/", + "description": "Symfony OptionsResolver Component", + "homepage": "https://symfony.com", "keywords": [ - "mock", - "xunit" + "config", + "configuration", + "options" ], - "time": "2014-02-16 12:43:56" + "time": "2020-09-02T16:27:44+00:00" }, { - "name": "squizlabs/php_codesniffer", - "version": "1.5.x-dev", + "name": "symfony/polyfill-ctype", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/squizlabs/PHP_CodeSniffer.git", - "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5" + "url": "https://github.com/symfony/polyfill-ctype.git", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/squizlabs/PHP_CodeSniffer/zipball/6f3e42d311b882b25b4d409d23a289f4d3b803d5", - "reference": "6f3e42d311b882b25b4d409d23a289f4d3b803d5", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/1c302646f6efc070cd46856e600e5e0684d6b454", + "reference": "1c302646f6efc070cd46856e600e5e0684d6b454", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=5.1.2" + "php": ">=5.3.3" }, "suggest": { - "phpunit/php-timer": "dev-master" + "ext-ctype": "For best performance" }, - "bin": [ - "scripts/phpcs" - ], "type": "library", "extra": { "branch-alias": { - "dev-phpcs-fixer": "2.0.x-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { - "classmap": [ - "CodeSniffer.php", - "CodeSniffer/CLI.php", - "CodeSniffer/Exception.php", - "CodeSniffer/File.php", - "CodeSniffer/Report.php", - "CodeSniffer/Reporting.php", - "CodeSniffer/Sniff.php", - "CodeSniffer/Tokens.php", - "CodeSniffer/Reports/", - "CodeSniffer/CommentParser/", - "CodeSniffer/Tokenizers/", - "CodeSniffer/DocGenerators/", - "CodeSniffer/Standards/AbstractPatternSniff.php", - "CodeSniffer/Standards/AbstractScopeSniff.php", - "CodeSniffer/Standards/AbstractVariableSniff.php", - "CodeSniffer/Standards/IncorrectPatternException.php", - "CodeSniffer/Standards/Generic/Sniffs/", - "CodeSniffer/Standards/MySource/Sniffs/", - "CodeSniffer/Standards/PEAR/Sniffs/", - "CodeSniffer/Standards/PSR1/Sniffs/", - "CodeSniffer/Standards/PSR2/Sniffs/", - "CodeSniffer/Standards/Squiz/Sniffs/", - "CodeSniffer/Standards/Zend/Sniffs/" + "psr-4": { + "Symfony\\Polyfill\\Ctype\\": "" + }, + "files": [ + "bootstrap.php" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Greg Sherwood", - "role": "lead" + "name": "Gert de Pagter", + "email": "BackEndTea@gmail.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "PHP_CodeSniffer tokenises PHP, JavaScript and CSS files and detects violations of a defined set of coding standards.", - "homepage": "http://www.squizlabs.com/php-codesniffer", + "description": "Symfony polyfill for ctype functions", + "homepage": "https://symfony.com", "keywords": [ - "phpcs", - "standards" + "compatibility", + "ctype", + "polyfill", + "portable" ], - "time": "2014-12-04 22:32:15" + "time": "2020-07-14T12:35:20+00:00" }, { - "name": "symfony/yaml", - "version": "2.8.x-dev", + "name": "symfony/polyfill-php73", + "version": "dev-master", "source": { "type": "git", - "url": "https://github.com/symfony/yaml.git", - "reference": "b57a8d1b316b6aaf6dc77852fed4ddb8adac77a7" + "url": "https://github.com/symfony/polyfill-php73.git", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/b57a8d1b316b6aaf6dc77852fed4ddb8adac77a7", - "reference": "b57a8d1b316b6aaf6dc77852fed4ddb8adac77a7", + "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/fffa1a52a023e782cdcc221d781fe1ec8f87fcca", + "reference": "fffa1a52a023e782cdcc221d781fe1ec8f87fcca", "shasum": "" }, "require": { - "php": ">=5.3.9" + "php": ">=5.3.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.8-dev" + "dev-master": "1.18-dev" + }, + "thanks": { + "name": "symfony/polyfill", + "url": "https://github.com/symfony/polyfill" } }, "autoload": { "psr-4": { - "Symfony\\Component\\Yaml\\": "" + "Symfony\\Polyfill\\Php73\\": "" }, - "exclude-from-classmap": [ - "/Tests/" + "files": [ + "bootstrap.php" + ], + "classmap": [ + "Resources/stubs" ] }, "notification-url": "https://packagist.org/downloads/", @@ -1033,22 +3397,119 @@ ], "authors": [ { - "name": "Fabien Potencier", - "email": "fabien@symfony.com" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" }, { "name": "Symfony Community", "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony Yaml Component", + "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", "homepage": "https://symfony.com", - "time": "2016-07-01 06:55:04" + "keywords": [ + "compatibility", + "polyfill", + "portable", + "shim" + ], + "time": "2020-07-14T12:35:20+00:00" + }, + { + "name": "theseer/tokenizer", + "version": "1.2.0", + "source": { + "type": "git", + "url": "https://github.com/theseer/tokenizer.git", + "reference": "75a63c33a8577608444246075ea0af0d052e452a" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/75a63c33a8577608444246075ea0af0d052e452a", + "reference": "75a63c33a8577608444246075ea0af0d052e452a", + "shasum": "" + }, + "require": { + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" + }, + "type": "library", + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" + } + ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "time": "2020-07-12T23:59:07+00:00" + }, + { + "name": "webmozart/assert", + "version": "1.9.1", + "source": { + "type": "git", + "url": "https://github.com/webmozart/assert.git", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/webmozart/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", + "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "shasum": "" + }, + "require": { + "php": "^5.3.3 || ^7.0 || ^8.0", + "symfony/polyfill-ctype": "^1.8" + }, + "conflict": { + "phpstan/phpstan": "<0.12.20", + "vimeo/psalm": "<3.9.1" + }, + "require-dev": { + "phpunit/phpunit": "^4.8.36 || ^7.5.13" + }, + "type": "library", + "autoload": { + "psr-4": { + "Webmozart\\Assert\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Bernhard Schussek", + "email": "bschussek@gmail.com" + } + ], + "description": "Assertions to validate method input/output with nice error messages.", + "keywords": [ + "assert", + "check", + "validate" + ], + "time": "2020-07-08T17:02:28+00:00" } ], "aliases": [], "minimum-stability": "dev", - "stability-flags": [], + "stability-flags": { + "omnipay/tests": 20 + }, "prefer-stable": false, "prefer-lowest": false, "platform": [], From aacf2542843fc47f8f1707c37a08f14db5c0a60a Mon Sep 17 00:00:00 2001 From: rasmniel Date: Tue, 22 Sep 2020 10:24:56 +0200 Subject: [PATCH 19/21] Remove some trailing commas for better backwards compat --- src/Message/CompleteRequest.php | 2 +- src/Message/LinkRequest.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Message/CompleteRequest.php b/src/Message/CompleteRequest.php index 4c8dd65..20099d0 100755 --- a/src/Message/CompleteRequest.php +++ b/src/Message/CompleteRequest.php @@ -45,7 +45,7 @@ public function sendData($data) [ 'Authorization' => 'Basic ' . base64_encode(":" . $this->getApikey()), 'Accept-Version' => 'v10', - 'Content-Type' => 'application/json', + 'Content-Type' => 'application/json' ] ); return $this->response = new Response($this, $httpResponse->getBody()->getContents()); diff --git a/src/Message/LinkRequest.php b/src/Message/LinkRequest.php index da9e713..0972e21 100644 --- a/src/Message/LinkRequest.php +++ b/src/Message/LinkRequest.php @@ -34,7 +34,7 @@ public function getQuickpayParams() 'google_analytics_tracking_id' => $this->getGoogleAnalyticsTrackingID(), 'google_analytics_client_id' => $this->getGoogleAnalyticsClientID(), 'auto_capture' => $this->getAutoCapture(), - 'payment_methods' => $this->getPaymentMethods(), + 'payment_methods' => $this->getPaymentMethods() ); return $params; From 835130b6a092b8655093c595bc69ad87f1d6a678 Mon Sep 17 00:00:00 2001 From: Alex Chartier Date: Tue, 22 Sep 2020 07:09:51 -0400 Subject: [PATCH 20/21] Correct class name --- src/Message/CaptureResponse.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Message/CaptureResponse.php b/src/Message/CaptureResponse.php index eeabf0b..500d5ef 100644 --- a/src/Message/CaptureResponse.php +++ b/src/Message/CaptureResponse.php @@ -2,7 +2,7 @@ namespace Omnipay\Quickpay\Message; -class NotifyResponse extends Response +class CaptureResponse extends Response { // return the response body for the app to use public function isSuccessful() From 5c2ec4542f80e2bfdf21bc15450cbf20c5fc3b7c Mon Sep 17 00:00:00 2001 From: "Thomas B. Nielsen" Date: Thu, 7 Mar 2024 17:47:34 +0100 Subject: [PATCH 21/21] Update README.md with info on autocapture --- README.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.md b/README.md index 8f1da31..1336005 100644 --- a/README.md +++ b/README.md @@ -35,5 +35,15 @@ Read more about Omnipay here: https://github.com/thephpleague/omnipay * payment_methods * synchronized (bool) +### Please note +If you need to do instant capture or auto_capture / [autocapture]([https://quickpay.net/](https://quickpay.net/dk/helpdesk/capture/#autocapture)) you should set the flag use_authorize: false. This will do a instant capture. +``` +SilverStripe\Omnipay\GatewayInfo: + Quickpay: + use_authorize: true +``` +Read more here: https://quickpay.net/dk/helpdesk/capture/#autocapture + + ### Development This module was coded by [Nobrainer Web](http://www.nobrainer.dk), with support from [QuickPay](https://quickpay.net/)