From a4837b9961d7f8e37a10106c18eee67114ead4e0 Mon Sep 17 00:00:00 2001 From: Alexandre Bacco Date: Tue, 18 Jul 2017 21:19:35 +0300 Subject: [PATCH] Import files --- .gitignore | 5 +- Action/CaptureAction.php | 97 +++ Action/ConvertPaymentAction.php | 50 ++ Action/NotifyAction.php | 69 +++ Action/StatusAction.php | 47 ++ Api.php | 279 +++++++++ Payum2c2pGatewayFactory.php | 42 ++ composer.json | 25 + composer.lock | 1014 +++++++++++++++++++++++++++++++ 9 files changed, 1624 insertions(+), 4 deletions(-) create mode 100644 Action/CaptureAction.php create mode 100644 Action/ConvertPaymentAction.php create mode 100644 Action/NotifyAction.php create mode 100644 Action/StatusAction.php create mode 100644 Api.php create mode 100644 Payum2c2pGatewayFactory.php create mode 100644 composer.json create mode 100644 composer.lock diff --git a/.gitignore b/.gitignore index c422267..0e09ddc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,3 @@ composer.phar /vendor/ - -# Commit your application's lock file http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file -# You may choose to ignore a library lock file http://getcomposer.org/doc/02-libraries.md#lock-file -# composer.lock +/bin/ diff --git a/Action/CaptureAction.php b/Action/CaptureAction.php new file mode 100644 index 0000000..6b55eac --- /dev/null +++ b/Action/CaptureAction.php @@ -0,0 +1,97 @@ +apiClass = Api::class; + } + + /** + * @param Capture $request + */ + public function execute($request) + { + RequestNotSupportedException::assertSupports($this, $request); + + $model = ArrayObject::ensureArrayObject($request->getModel()); + + // Ensure payment currency is configured, Exception is thrown otherwise + $this->api->getCurrencyConfigByCode($request->getFirstModel()->getCurrencyCode()); + + $httpRequest = new GetHttpRequest(); + $this->gateway->execute($httpRequest); + + // We are back from 2c2p + if (isset($httpRequest->request['payment_status'])) { + // Only if we trust user request, we can handle the request + if ($this->api->trustUserRequest()) { + try { + $notify = new Notify($model); + $this->gateway->execute($notify); + } catch (Base $e) { + // NotifyAction throws a request we don't want to use here, we just skip + } + } + + return; + } + + // User will come back to this URL + if (empty($model['result_url_1']) && $request->getToken()) { + $model['result_url_1'] = $request->getToken()->getTargetUrl(); + } + + // Server-to-server notification will be sent to this URL + if (empty($model['result_url_2']) && $request->getToken() && $this->tokenFactory) { + $notifyToken = $this->tokenFactory->createNotifyToken( + $request->getToken()->getGatewayName(), + $request->getToken()->getDetails() + ); + + $model['result_url_2'] = $notifyToken->getTargetUrl(); + } + + // We POST redirect to 2c2p + throw new HttpPostRedirect( + $this->api->getOffsiteUrl(), + $this->api->prepareOffsitePayment($model->toUnsafeArray()) + ); + } + + /** + * {@inheritDoc} + */ + public function supports($request) + { + return + $request instanceof Capture && + $request->getModel() instanceof \ArrayAccess + ; + } +} diff --git a/Action/ConvertPaymentAction.php b/Action/ConvertPaymentAction.php new file mode 100644 index 0000000..0ab0029 --- /dev/null +++ b/Action/ConvertPaymentAction.php @@ -0,0 +1,50 @@ +getSource(); + + $iso4217 = new ISO4217(); + /** @var Currency $currency */ + $currency = $iso4217->findByCode($payment->getCurrencyCode()); + + $details = ArrayObject::ensureArrayObject($payment->getDetails()); + $details['payment_description'] = $payment->getDescription(); + $details['currency'] = $currency->getNumeric(); + $details['amount'] = sprintf('%012d', $payment->getTotalAmount()); + $details['customer_email'] = $payment->getClientEmail(); + $details['order_id'] = $payment->getNumber(); + + $request->setResult((array) $details); + } + + /** + * {@inheritDoc} + */ + public function supports($request) + { + return + $request instanceof Convert && + $request->getSource() instanceof PaymentInterface && + $request->getTo() == 'array' + ; + } +} diff --git a/Action/NotifyAction.php b/Action/NotifyAction.php new file mode 100644 index 0000000..3af3b58 --- /dev/null +++ b/Action/NotifyAction.php @@ -0,0 +1,69 @@ +apiClass = Api::class; + } + + /** + * @param Notify $request + */ + public function execute($request) + { + RequestNotSupportedException::assertSupports($this, $request); + + $model = ArrayObject::ensureArrayObject($request->getModel()); + + $httpRequest = new GetHttpRequest(); + $this->gateway->execute($httpRequest); + + if ('POST' !== $httpRequest->method) { + throw new HttpResponse('Notification is invalid. Code 1', 400); + } + + if (!$this->api->checkResponseHash($httpRequest->request)) { + throw new HttpResponse('Notification is invalid. Code 2', 400); + } + + if ($model['amount'] != $httpRequest->request['amount']) { + throw new HttpResponse('Notification is invalid. Code 3', 400); + } + + $model->replace($httpRequest->request); + + throw new HttpResponse('OK', 200); + } + + /** + * {@inheritDoc} + */ + public function supports($request) + { + return + $request instanceof Notify && + $request->getModel() instanceof \ArrayAccess + ; + } +} diff --git a/Action/StatusAction.php b/Action/StatusAction.php new file mode 100644 index 0000000..647205a --- /dev/null +++ b/Action/StatusAction.php @@ -0,0 +1,47 @@ +getModel()); + + if (!isset($model['payment_status'])) { + $request->markNew(); + } elseif (Api::STATUS_SUCCESS === $model['payment_status']) { + $request->markCaptured(); + } elseif (Api::STATUS_PENDING === $model['payment_status']) { + $request->markPending(); + } elseif (Api::STATUS_CANCEL === $model['payment_status']) { + $request->markCanceled(); + } elseif (Api::STATUS_REJECTED === $model['payment_status']) { + $request->markFailed(); + } else { + $request->markUnknown(); + } + } + + /** + * {@inheritDoc} + */ + public function supports($request) + { + return + $request instanceof GetStatusInterface && + $request->getModel() instanceof \ArrayAccess + ; + } +} diff --git a/Api.php b/Api.php new file mode 100644 index 0000000..80697ac --- /dev/null +++ b/Api.php @@ -0,0 +1,279 @@ +defaults($this->options); + $options->validatedKeysSet(array( + 'currencies', + 'trust_user_request', + )); + + if (!is_array($options['currencies'])) { + throw new LogicException('The currencies option must be an array.'); + } + + $iso = new ISO4217(); + foreach ($options['currencies'] as $currency => $currencyOptions) { + try { + $iso->findByCode($currency); + } catch (\RuntimeException $e) { + throw new LogicException(sprintf('Currency "%s" is not found in ISO 4217.', $currency), $e->getCode(), $e); + } + + if (empty($currencyOptions['merchant_id']) || empty($currencyOptions['merchant_auth_key'])) { + throw new LogicException(sprintf('Currency %s must have its options merchant_id and merchant_auth_key defined. Got %s.', $currency, implode(', ', array_keys($currencyOptions)))); + } + } + + if (false == is_bool($options['sandbox'])) { + throw new LogicException('The boolean sandbox option must be set.'); + } + + $this->options = $options; + $this->client = $client; + $this->messageFactory = $messageFactory; + } + + /** + * @param string $currencyCode + * @return array + */ + public function getCurrencyConfigByCode($currencyCode) + { + $currencyCode = strtolower($currencyCode); + if (!isset($this->options['currencies'][$currencyCode])) { + throw new LogicException(sprintf('Currency "%s" is not configured in 2C2P gateway.', $currencyCode)); + } + + return $this->options['currencies'][$currencyCode]; + } + + /** + * @return bool + */ + public function trustUserRequest() + { + return (bool) $this->options['trust_user_request']; + } + + /** + * @return string + */ + public function getOffsiteUrl() + { + return $this->options['sandbox'] ? + 'https://demo2.2c2p.com/2C2PFrontEnd/RedirectV3/payment' : + 'https://t.2c2p.com/RedirectV3/Payment' + ; + } + + /** + * @param array $params + * @return array + */ + public function prepareOffsitePayment(array $params) + { + $supportedParams = array( + 'version' => '', + 'merchant_id' => '', + 'payment_description' => '', + 'order_id' => '', + 'invoice_no' => '', + 'user_defined_1' => '', + 'user_defined_2' => '', + 'user_defined_3' => '', + 'user_defined_4' => '', + 'user_defined_5' => '', + 'amount' => '', + 'currency' => '', + 'promotion' => '', + 'customer_email' => '', + 'pay_category_id' => '', + 'result_url_1' => '', + 'result_url_2' => '', + 'payment_option' => '', + 'ipp_interest_type' => '', + 'payment_expiry' => '', + 'default_lang' => '', + 'enable_store_card' => '', + 'stored_card_unique_id' => '', + 'request_3ds' => '', + 'recurring' => '', + 'order_prefix' => '', + 'recurring_amount' => '', + 'allow_accumulate' => '', + 'max_accumulate_amount' => '', + 'recurring_interval' => '', + 'recurring_count' => '', + 'charge_next_date' => '', + 'charge_on_date' => '', + 'statement_descriptor' => '', + 'hash_value' => '', + ); + + $params = array_merge($supportedParams, $params); + + $this->addGlobalParams($params); + + return $params; + } + + /** + * @param array $params + * @return bool + */ + public function checkResponseHash(array $params) + { + $toHash = + $params['version']. + $params['request_timestamp']. + $params['merchant_id']. + $params['order_id']. + $params['invoice_no']. + $params['currency']. + $params['amount']. + $params['transaction_ref']. + $params['approval_code']. + $params['eci']. + $params['transaction_datetime']. + $params['payment_channel']. + $params['payment_status']. + $params['channel_response_code']. + $params['channel_response_desc']. + $params['masked_pan']. + $params['stored_card_unique_id']. + $params['backend_invoice']. + $params['paid_channel']. + $params['paid_agent']. + $params['recurring_unique_id']. + $params['user_defined_1']. + $params['user_defined_2']. + $params['user_defined_3']. + $params['user_defined_4']. + $params['user_defined_5']. + $params['browser_info']. + $params['ippPeriod']. + $params['ippInterestType']. + $params['ippInterestRate']. + $params['ippMerchantAbsorbRate'] + ; + + return $params['hash_value'] === $this->calculateHash($toHash, $params['currency']); + } + + /** + * @param array $params + */ + protected function addGlobalParams(array &$params) + { + $params['version'] = self::VERSION; + $params['merchant_id'] = $this->getMerchantIdForCurrency($params['currency']); + $params['hash_value'] = $this->calculateRequestHash($params); + } + + /** + * @param string $currencyNumeric + * @return string + */ + protected function getMerchantIdForCurrency($currencyNumeric) + { + return $this->getCurrencyConfigByNumeric($currencyNumeric)['merchant_id']; + } + + /** + * @param string $currencyNumeric + * @return string + */ + protected function getMerchantAuthKeyForCurrency($currencyNumeric) + { + return $this->getCurrencyConfigByNumeric($currencyNumeric)['merchant_auth_key']; + } + + /** + * @param string $currencyNumeric + * @return array + */ + protected function getCurrencyConfigByNumeric($currencyNumeric) + { + $iso = new ISO4217(); + + /** @var Currency $currency */ + $currency = $iso->findByNumeric($currencyNumeric); + + return $this->getCurrencyConfigByCode($currency->getAlpha3()); + } + + /** + * @param array $params + * @return string + */ + protected function calculateRequestHash(array $params) + { + $toHash = + $params['version']. + $params['merchant_id']. + $params['payment_description']. + $params['order_id']. + $params['invoice_no']. + $params['currency']. + $params['amount']. + $params['customer_email']. + $params['pay_category_id']. + $params['promotion']. + $params['user_defined_1']. + $params['user_defined_2']. + $params['user_defined_3']. + $params['user_defined_4']. + $params['user_defined_5']. + $params['result_url_1']. + $params['result_url_2'] + ; + + return $this->calculateHash($toHash, $params['currency']); + } + + /** + * @param string $toHash + * @param string $currencyNumeric + * @return string + */ + private function calculateHash($toHash, $currencyNumeric) + { + return strtoupper(hash_hmac('sha1', $toHash, $this->getMerchantAuthKeyForCurrency($currencyNumeric), false)); + } +} diff --git a/Payum2c2pGatewayFactory.php b/Payum2c2pGatewayFactory.php new file mode 100644 index 0000000..bd301b1 --- /dev/null +++ b/Payum2c2pGatewayFactory.php @@ -0,0 +1,42 @@ +defaults([ + 'payum.factory_name' => '2c2p', + 'payum.factory_title' => '2C2P', + 'payum.action.capture' => new CaptureAction(), + 'payum.action.notify' => new NotifyAction(), + 'payum.action.status' => new StatusAction(), + 'payum.action.convert_payment' => new ConvertPaymentAction(), + ]); + + if (false == $config['payum.api']) { + $config['payum.default_options'] = array( + 'sandbox' => true, + ); + $config->defaults($config['payum.default_options']); + $config['payum.required_options'] = []; + + $config['payum.api'] = function (ArrayObject $config) { + $config->validateNotEmpty($config['payum.required_options']); + + return new Api((array) $config, $config['payum.http_client'], $config['httplug.message_factory']); + }; + } + } +} diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..36e97e0 --- /dev/null +++ b/composer.json @@ -0,0 +1,25 @@ +{ + "name": "villafinder/payum-2c2p", + "type": "library", + "description": "Payum extension for 2C2P gateway", + "keywords": ["payment", "payum", "2C2P"], + "license": "MIT", + "authors": [ + { + "name": "Alexandre Bacco", + "email": "alexandre.bacco@gmail.com" + } + ], + "require": { + "payum/core": "^1.3" + }, + "require-dev": { + "php-http/guzzle6-adapter": "^1.0" + }, + "config": { + "bin-dir": "bin" + }, + "autoload": { + "psr-4": { "Villafinder\\Payum2c2p\\": "" } + } +} diff --git a/composer.lock b/composer.lock new file mode 100644 index 0000000..2cc505b --- /dev/null +++ b/composer.lock @@ -0,0 +1,1014 @@ +{ + "_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" + ], + "content-hash": "1d5268e0e2902e280908789059108bbb", + "packages": [ + { + "name": "clue/stream-filter", + "version": "v1.3.0", + "source": { + "type": "git", + "url": "https://github.com/clue/php-stream-filter.git", + "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/clue/php-stream-filter/zipball/e3bf9415da163d9ad6701dccb407ed501ae69785", + "reference": "e3bf9415da163d9ad6701dccb407ed501ae69785", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "type": "library", + "autoload": { + "psr-4": { + "Clue\\StreamFilter\\": "src/" + }, + "files": [ + "src/functions.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": "2015-11-08T23:41:30+00:00" + }, + { + "name": "guzzlehttp/guzzle", + "version": "6.3.0", + "source": { + "type": "git", + "url": "https://github.com/guzzle/guzzle.git", + "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/guzzle/zipball/f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "reference": "f4db5a78a5ea468d4831de7f0bf9d9415e348699", + "shasum": "" + }, + "require": { + "guzzlehttp/promises": "^1.0", + "guzzlehttp/psr7": "^1.4", + "php": ">=5.5" + }, + "require-dev": { + "ext-curl": "*", + "phpunit/phpunit": "^4.0 || ^5.0", + "psr/log": "^1.0" + }, + "suggest": { + "psr/log": "Required for using the Log middleware" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "6.2-dev" + } + }, + "autoload": { + "files": [ + "src/functions_include.php" + ], + "psr-4": { + "GuzzleHttp\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle is a PHP HTTP client library", + "homepage": "http://guzzlephp.org/", + "keywords": [ + "client", + "curl", + "framework", + "http", + "http client", + "rest", + "web service" + ], + "time": "2017-06-22T18:50:49+00:00" + }, + { + "name": "guzzlehttp/promises", + "version": "v1.3.1", + "source": { + "type": "git", + "url": "https://github.com/guzzle/promises.git", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/promises/zipball/a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "reference": "a59da6cf61d80060647ff4d3eb2c03a2bc694646", + "shasum": "" + }, + "require": { + "php": ">=5.5.0" + }, + "require-dev": { + "phpunit/phpunit": "^4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Promise\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + } + ], + "description": "Guzzle promises library", + "keywords": [ + "promise" + ], + "time": "2016-12-20T10:07:11+00:00" + }, + { + "name": "guzzlehttp/psr7", + "version": "1.4.2", + "source": { + "type": "git", + "url": "https://github.com/guzzle/psr7.git", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/guzzle/psr7/zipball/f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "reference": "f5b8a8512e2b58b0071a7280e39f14f72e05d87c", + "shasum": "" + }, + "require": { + "php": ">=5.4.0", + "psr/http-message": "~1.0" + }, + "provide": { + "psr/http-message-implementation": "1.0" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-4": { + "GuzzleHttp\\Psr7\\": "src/" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Michael Dowling", + "email": "mtdowling@gmail.com", + "homepage": "https://github.com/mtdowling" + }, + { + "name": "Tobias Schultze", + "homepage": "https://github.com/Tobion" + } + ], + "description": "PSR-7 message implementation that also provides common utility methods", + "keywords": [ + "http", + "message", + "request", + "response", + "stream", + "uri", + "url" + ], + "time": "2017-03-20T17:10:46+00:00" + }, + { + "name": "jeremykendall/php-domain-parser", + "version": "3.0.0", + "source": { + "type": "git", + "url": "https://github.com/jeremykendall/php-domain-parser.git", + "reference": "896e7e70f02bd4fd77190052799bc61e4d779672" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/jeremykendall/php-domain-parser/zipball/896e7e70f02bd4fd77190052799bc61e4d779672", + "reference": "896e7e70f02bd4fd77190052799bc61e4d779672", + "shasum": "" + }, + "require": { + "ext-curl": "*", + "ext-intl": "*", + "ext-mbstring": "*", + "php": ">=5.3.0" + }, + "require-dev": { + "jeremykendall/debug-die": "0.0.1.*", + "mikey179/vfsstream": "~1.4", + "phpunit/phpunit": "~4.4" + }, + "bin": [ + "bin/parse", + "bin/update-psl" + ], + "type": "library", + "autoload": { + "psr-0": { + "Pdp\\": "src/" + }, + "files": [ + "src/pdp-parse-url.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Jeremy Kendall", + "homepage": "http://about.me/jeremykendall", + "role": "Developer" + }, + { + "name": "Contributors", + "homepage": "https://github.com/jeremykendall/php-domain-parser/graphs/contributors" + } + ], + "description": "Public Suffix List based URL parsing implemented in PHP.", + "homepage": "https://github.com/jeremykendall/php-domain-parser", + "keywords": [ + "Public Suffix List", + "domain parsing", + "url parsing" + ], + "time": "2015-03-30T12:49:45+00:00" + }, + { + "name": "league/uri", + "version": "4.2.2", + "source": { + "type": "git", + "url": "https://github.com/thephpleague/uri.git", + "reference": "a2e73bad7e60c3bc61b649680fb8b46876e342e3" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/a2e73bad7e60c3bc61b649680fb8b46876e342e3", + "reference": "a2e73bad7e60c3bc61b649680fb8b46876e342e3", + "shasum": "" + }, + "require": { + "ext-fileinfo": "*", + "ext-intl": "*", + "ext-mbstring": "*", + "jeremykendall/php-domain-parser": "^3.0", + "php": ">=5.5.9", + "psr/http-message": "^1.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^1.9", + "phpunit/phpunit": "^4.0", + "zendframework/zend-diactoros": "^1.3" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "4.2.x-dev" + } + }, + "autoload": { + "psr-4": { + "League\\Uri\\": "src" + }, + "files": [ + "src/functions_include.php" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Ignace Nyamagana Butera", + "email": "nyamsprod@gmail.com", + "homepage": "https://nyamsprod.com" + } + ], + "description": "URI manipulation library", + "homepage": "http://uri.thephpleague.com", + "keywords": [ + "data-uri", + "ftp", + "http", + "https", + "parse_url", + "psr-7", + "rfc3986", + "uri", + "url", + "ws" + ], + "time": "2016-12-12T11:36:42+00:00" + }, + { + "name": "payum/core", + "version": "1.4.1", + "target-dir": "Payum/Core", + "source": { + "type": "git", + "url": "https://github.com/Payum/Core.git", + "reference": "4f3ddd922186b5d6230f3c67f7922d9dbf519f66" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Payum/Core/zipball/4f3ddd922186b5d6230f3c67f7922d9dbf519f66", + "reference": "4f3ddd922186b5d6230f3c67f7922d9dbf519f66", + "shasum": "" + }, + "require": { + "league/uri": "~4.0", + "payum/iso4217": "~1.0", + "php": "^5.5.0|^7.0", + "php-http/client-implementation": "^1.0", + "php-http/message": "^1.0", + "twig/twig": "~1.0|~2.0" + }, + "require-dev": { + "defuse/php-encryption": "^2", + "doctrine/orm": "2.*", + "ext-curl": "*", + "ext-pdo_sqlite": "*", + "omnipay/dummy": "~2.0", + "payum/omnipay-bridge": "^1", + "php-http/guzzle6-adapter": "^1.0", + "phpunit/phpunit": "~4.0", + "propel/propel1": "~1.7", + "psr/log": "~1.0", + "symfony/dependency-injection": "~2.8|~3.0", + "symfony/form": "~2.8|~3.0", + "symfony/http-foundation": "~2.8|~3.0", + "symfony/http-kernel": "~2.8|~3.0", + "symfony/phpunit-bridge": "~2.8|~3.0", + "symfony/routing": "~2.8|~3.0", + "symfony/validator": "~2.8|~3.0", + "zendframework/zend-db": "~2" + }, + "suggest": { + "defuse/php-encryption": "^2 If you want to encrypt gateways credentials in database", + "doctrine/mongodb-odm": "~1.1 If you want to store models to mongo doctrin2 ODM", + "doctrine/orm": "~2.3 If you want to store models to database using doctrin2 ORM", + "monolog/monolog": "~1.0 If you want to use PSR-3 logger", + "payum/authorize-net-aim": "self.version If you want to use Authorize.Net AIM payment gateway", + "payum/be2bill": "self.version If you want to use be2bill payment gateway", + "payum/omnipay-bridge": "self.version If you want to use omnipay's gateways", + "payum/payex": "self.version If you want to use payex payment gateway", + "payum/paypal-express-checkout-nvp": "self.version If you want to use paypal express checkout, digital goods or recurring payments", + "payum/paypal-ipn": "self.version If you want to use paypal instant payment notifications(Paypal IPN)", + "payum/paypal-pro-checkout-nvp": "self.version If you want to use paypal pro checkout", + "payum/paypal-rest": "self.version If you want to use paypal rest gateway", + "propel/propel": "If you want to store models to Propel2 ORM", + "propel/propel1": "~1.7 If you want to store models to Propel1 ORM", + "symfony/dependency-injection": "~2.8|~3.0 If you want to use container aware stuff", + "symfony/form": "~2.8|~3.0 If you want to use forms", + "symfony/http-foundation": "~2.8|~3.0 If you want to use HttpRequestVerifier or HttpResponse reply from symfony's bridge", + "symfony/http-kernel": "~2.8|~3.0 If you want to use HttpRequestVerifier from symfony's bridge", + "symfony/routing": "~2.8|~3.0 If you want to use TokenFactory from symfony's bridge", + "zendframework/zend-db": "~2.0 If you want to store models to Zend Db ORM" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-dev" + } + }, + "autoload": { + "psr-0": { + "Payum\\Core\\": "" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Community contributions", + "homepage": "https://github.com/Payum/Payum/contributors" + }, + { + "name": "Kotlyar Maksim", + "email": "kotlyar.maksim@gmail.com" + }, + { + "name": "Payum project", + "homepage": "http://payum.org/" + } + ], + "description": "Payum offers everything you need to work with payments. From simplest use cases to very advanced ones.", + "homepage": "http://payum.org", + "keywords": [ + "authorize", + "capture", + "notify", + "payment", + "payout", + "recurring payment", + "refund", + "subscription", + "withdrawal" + ], + "time": "2017-06-09T06:51:55+00:00" + }, + { + "name": "payum/iso4217", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/Payum/iso4217.git", + "reference": "6a45480e2818350dea58b7a076d0115aa7ff5789" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/Payum/iso4217/zipball/6a45480e2818350dea58b7a076d0115aa7ff5789", + "reference": "6a45480e2818350dea58b7a076d0115aa7ff5789", + "shasum": "" + }, + "require": { + "php": ">=5.3" + }, + "require-dev": { + "phpunit/phpunit": "~4.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.0.x-dev" + } + }, + "autoload": { + "psr-4": { + "Payum\\ISO4217\\": "." + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Rob Bast", + "email": "rob.bast@gmail.com" + }, + { + "name": "Community contributions", + "homepage": "https://github.com/Payum/Payum/contributors" + }, + { + "name": "Kotlyar Maksim", + "email": "kotlyar.maksim@gmail.com" + }, + { + "name": "Payum project", + "homepage": "http://payum.org/" + } + ], + "description": "ISO 4217 PHP Library", + "homepage": "http://payum.org", + "keywords": [ + "4217", + "ISO 4217", + "currencies", + "iso", + "library" + ], + "time": "2016-08-04T08:15:12+00:00" + }, + { + "name": "php-http/guzzle6-adapter", + "version": "v1.1.1", + "source": { + "type": "git", + "url": "https://github.com/php-http/guzzle6-adapter.git", + "reference": "a56941f9dc6110409cfcddc91546ee97039277ab" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/guzzle6-adapter/zipball/a56941f9dc6110409cfcddc91546ee97039277ab", + "reference": "a56941f9dc6110409cfcddc91546ee97039277ab", + "shasum": "" + }, + "require": { + "guzzlehttp/guzzle": "^6.0", + "php": ">=5.5.0", + "php-http/httplug": "^1.0" + }, + "provide": { + "php-http/async-client-implementation": "1.0", + "php-http/client-implementation": "1.0" + }, + "require-dev": { + "ext-curl": "*", + "php-http/adapter-integration-tests": "^0.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.2-dev" + } + }, + "autoload": { + "psr-4": { + "Http\\Adapter\\Guzzle6\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "David de Boer", + "email": "david@ddeboer.nl" + } + ], + "description": "Guzzle 6 HTTP Adapter", + "homepage": "http://httplug.io", + "keywords": [ + "Guzzle", + "http" + ], + "time": "2016-05-10T06:13:32+00:00" + }, + { + "name": "php-http/httplug", + "version": "v1.1.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/httplug.git", + "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/httplug/zipball/1c6381726c18579c4ca2ef1ec1498fdae8bdf018", + "reference": "1c6381726c18579c4ca2ef1ec1498fdae8bdf018", + "shasum": "" + }, + "require": { + "php": ">=5.4", + "php-http/promise": "^1.0", + "psr/http-message": "^1.0" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1-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" + } + ], + "description": "HTTPlug, the HTTP client abstraction for PHP", + "homepage": "http://httplug.io", + "keywords": [ + "client", + "http" + ], + "time": "2016-08-31T08:30:17+00:00" + }, + { + "name": "php-http/message", + "version": "1.6.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/message.git", + "reference": "2edd63bae5f52f79363c5f18904b05ce3a4b7253" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message/zipball/2edd63bae5f52f79363c5f18904b05ce3a4b7253", + "reference": "2edd63bae5f52f79363c5f18904b05ce3a4b7253", + "shasum": "" + }, + "require": { + "clue/stream-filter": "^1.3", + "php": ">=5.4", + "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", + "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.6-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": "2017-07-05T06:40:53+00:00" + }, + { + "name": "php-http/message-factory", + "version": "v1.0.2", + "source": { + "type": "git", + "url": "https://github.com/php-http/message-factory.git", + "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/message-factory/zipball/a478cb11f66a6ac48d8954216cfed9aa06a501a1", + "reference": "a478cb11f66a6ac48d8954216cfed9aa06a501a1", + "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": "2015-12-19T14:08:53+00:00" + }, + { + "name": "php-http/promise", + "version": "v1.0.0", + "source": { + "type": "git", + "url": "https://github.com/php-http/promise.git", + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-http/promise/zipball/dc494cdc9d7160b9a09bd5573272195242ce7980", + "reference": "dc494cdc9d7160b9a09bd5573272195242ce7980", + "shasum": "" + }, + "require-dev": { + "henrikbjorn/phpspec-code-coverage": "^1.0", + "phpspec/phpspec": "^2.4" + }, + "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": "Márk Sági-Kazár", + "email": "mark.sagikazar@gmail.com" + }, + { + "name": "Joel Wurtz", + "email": "joel.wurtz@gmail.com" + } + ], + "description": "Promise used for asynchronous HTTP requests", + "homepage": "http://httplug.io", + "keywords": [ + "promise" + ], + "time": "2016-01-26T13:27:02+00:00" + }, + { + "name": "psr/http-message", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/php-fig/http-message.git", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/http-message/zipball/f6561bf28d520154e4b0ec72be95418abe6d9363", + "reference": "f6561bf28d520154e4b0ec72be95418abe6d9363", + "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": "2016-08-06T14:39:51+00:00" + }, + { + "name": "symfony/polyfill-mbstring", + "version": "v1.4.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "f29dca382a6485c3cbe6379f0c61230167681937" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/f29dca382a6485c3cbe6379f0c61230167681937", + "reference": "f29dca382a6485c3cbe6379f0c61230167681937", + "shasum": "" + }, + "require": { + "php": ">=5.3.3" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.4-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": "2017-06-09T14:24:12+00:00" + }, + { + "name": "twig/twig", + "version": "v2.4.3", + "source": { + "type": "git", + "url": "https://github.com/twigphp/Twig.git", + "reference": "eab7c3288ae6603d7d6f92b531626af2b162d1f2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/eab7c3288ae6603d7d6f92b531626af2b162d1f2", + "reference": "eab7c3288ae6603d7d6f92b531626af2b162d1f2", + "shasum": "" + }, + "require": { + "php": "^7.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "psr/container": "^1.0", + "symfony/debug": "~2.7", + "symfony/phpunit-bridge": "~3.3@dev" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "2.4-dev" + } + }, + "autoload": { + "psr-0": { + "Twig_": "lib/" + }, + "psr-4": { + "Twig\\": "src/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Fabien Potencier", + "email": "fabien@symfony.com", + "homepage": "http://fabien.potencier.org", + "role": "Lead Developer" + }, + { + "name": "Armin Ronacher", + "email": "armin.ronacher@active-4.com", + "role": "Project Founder" + }, + { + "name": "Twig Team", + "homepage": "http://twig.sensiolabs.org/contributors", + "role": "Contributors" + } + ], + "description": "Twig, the flexible, fast, and secure template language for PHP", + "homepage": "http://twig.sensiolabs.org", + "keywords": [ + "templating" + ], + "time": "2017-06-07T18:47:58+00:00" + } + ], + "packages-dev": [], + "aliases": [], + "minimum-stability": "stable", + "stability-flags": [], + "prefer-stable": false, + "prefer-lowest": false, + "platform": [], + "platform-dev": [] +}