diff --git a/CHANGELOG.md b/CHANGELOG.md index 5b0995e7..80c2694e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,11 +6,21 @@ ## Latest Version #### Enhancements: -- Profac: Additional transaction support added | Account Management | Spilt Fund | Network Transaction -- PAX Devices: Improved some tests +- Add support for PHP8.2 +- Drop support for PHP lower than 8.0 +- [UPA MiC]: Add MiC connector for UPA via GP-API +- [GP-ECOM]: Add refund for transaction with open banking #### Bug Fixes: -- GP-ECOM: Fix type confusion vulnerability on sha1hash for hppResponse +- [GP-ECOM]: Send the correct "message_version" in the initiate step on 3DS2 + +## v8.0.2 (06/27/2023) +#### Enhancements: +- [Profac]: Additional transaction support added | Account Management | Spilt Fund | Network Transaction +- [PAX Devices]: Improved some tests + +#### Bug Fixes: +- [GP-ECOM]: Fix type confusion vulnerability on sha1hash for hppResponse ## v8.0.1 (05/30/2023) #### Bug Fixes: diff --git a/README.md b/README.md index c5a57c0c..8ece9a3e 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ This SDK makes it easy to integrate your PHP application with our Card Not Prese ## Requirements -- PHP 7.1.0+ +- PHP 8.0.0+ - OpenSSL 1.0.1+ - PHP Curl extension - PHP DOM extension diff --git a/composer.json b/composer.json index 585dadb9..e52a916f 100644 --- a/composer.json +++ b/composer.json @@ -11,7 +11,7 @@ } ], "require": { - "php": ">= 7.1", + "php": ">= 8.0", "ext-curl": "*", "ext-dom": "*", "ext-openssl": "*", diff --git a/composer.lock b/composer.lock index b6a2c395..5e712204 100644 --- a/composer.lock +++ b/composer.lock @@ -4,87 +4,52 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "18261e435cb6a4b37c3e88b4dc712346", + "content-hash": "c4135218406fb08e25c5f2a89509c3a5", "packages": [], "packages-dev": [ - { - "name": "brianium/habitat", - "version": "v1.0.0", - "source": { - "type": "git", - "url": "https://github.com/brianium/habitat.git", - "reference": "d0979e3bb379cbc78ecb42b3ac171bc2b7e06d96" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/brianium/habitat/zipball/d0979e3bb379cbc78ecb42b3ac171bc2b7e06d96", - "reference": "d0979e3bb379cbc78ecb42b3ac171bc2b7e06d96", - "shasum": "" - }, - "require-dev": { - "monolog/monolog": ">=1.5.0", - "phpunit/phpunit": ">=3.7.21" - }, - "type": "library", - "autoload": { - "psr-0": { - "Habitat": [ - "src/" - ] - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Brian", - "email": "scaturrob@gmail.com", - "homepage": "http://brianscaturro.com", - "role": "Lead" - } - ], - "description": "A dependable php environment", - "support": { - "issues": "https://github.com/brianium/habitat/issues", - "source": "https://github.com/brianium/habitat/tree/v1.0.0" - }, - "time": "2013-06-08T04:42:29+00:00" - }, { "name": "brianium/paratest", - "version": "4.0.0", + "version": "v6.10.0", "source": { "type": "git", "url": "https://github.com/paratestphp/paratest.git", - "reference": "2a06a82742fa303b59179fb8d6037dfb9897b9b2" + "reference": "c2243b20bcd99c3f651018d1447144372f39b4fa" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/paratestphp/paratest/zipball/2a06a82742fa303b59179fb8d6037dfb9897b9b2", - "reference": "2a06a82742fa303b59179fb8d6037dfb9897b9b2", + "url": "https://api.github.com/repos/paratestphp/paratest/zipball/c2243b20bcd99c3f651018d1447144372f39b4fa", + "reference": "c2243b20bcd99c3f651018d1447144372f39b4fa", "shasum": "" }, "require": { - "brianium/habitat": "1.0.0", - "composer/semver": "~1.2", + "ext-dom": "*", "ext-pcre": "*", "ext-reflection": "*", "ext-simplexml": "*", - "php": "^7.1", - "phpunit/php-code-coverage": "^6.1.4|^7.0.2|^8.0", - "phpunit/php-timer": "^2.0|^3.0", - "phpunit/phpunit": "^7.5.8|^8.0|^9.0", - "symfony/console": "^3.4||^4.0||^5.0", - "symfony/process": "^3.4||^4.0||^5.0" + "fidry/cpu-core-counter": "^0.4.1 || ^0.5.1", + "jean85/pretty-package-versions": "^2.0.5", + "php": "^7.3 || ^8.0", + "phpunit/php-code-coverage": "^9.2.25", + "phpunit/php-file-iterator": "^3.0.6", + "phpunit/php-timer": "^5.0.3", + "phpunit/phpunit": "^9.6.4", + "sebastian/environment": "^5.1.5", + "symfony/console": "^5.4.21 || ^6.2.7", + "symfony/process": "^5.4.21 || ^6.2.7" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^2.16", - "squizlabs/php_codesniffer": "^3.5" + "doctrine/coding-standard": "^10.0.0", + "ext-pcov": "*", + "ext-posix": "*", + "infection/infection": "^0.26.19", + "squizlabs/php_codesniffer": "^3.7.2", + "symfony/filesystem": "^5.4.21 || ^6.2.7", + "vimeo/psalm": "^5.7.7" }, "bin": [ - "bin/paratest" + "bin/paratest", + "bin/paratest.bat", + "bin/paratest_for_phpstorm" ], "type": "library", "autoload": { @@ -102,8 +67,12 @@ { "name": "Brian Scaturro", "email": "scaturrob@gmail.com", - "homepage": "http://brianscaturro.com", - "role": "Lead" + "role": "Developer" + }, + { + "name": "Filippo Tessarotto", + "email": "zoeslam@gmail.com", + "role": "Developer" } ], "description": "Parallel testing for PHP", @@ -116,116 +85,46 @@ ], "support": { "issues": "https://github.com/paratestphp/paratest/issues", - "source": "https://github.com/paratestphp/paratest/tree/master" - }, - "time": "2020-02-07T22:07:07+00:00" - }, - { - "name": "composer/semver", - "version": "1.7.2", - "source": { - "type": "git", - "url": "https://github.com/composer/semver.git", - "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/composer/semver/zipball/647490bbcaf7fc4891c58f47b825eb99d19c377a", - "reference": "647490bbcaf7fc4891c58f47b825eb99d19c377a", - "shasum": "" - }, - "require": { - "php": "^5.3.2 || ^7.0 || ^8.0" - }, - "require-dev": { - "phpunit/phpunit": "^4.5 || ^5.0.5" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Composer\\Semver\\": "src" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nils Adermann", - "email": "naderman@naderman.de", - "homepage": "http://www.naderman.de" - }, - { - "name": "Jordi Boggiano", - "email": "j.boggiano@seld.be", - "homepage": "http://seld.be" - }, - { - "name": "Rob Bast", - "email": "rob.bast@gmail.com", - "homepage": "http://robbast.nl" - } - ], - "description": "Semver library that offers utilities, version constraint parsing and validation.", - "keywords": [ - "semantic", - "semver", - "validation", - "versioning" - ], - "support": { - "irc": "irc://irc.freenode.org/composer", - "issues": "https://github.com/composer/semver/issues", - "source": "https://github.com/composer/semver/tree/1.7.2" + "source": "https://github.com/paratestphp/paratest/tree/v6.10.0" }, "funding": [ { - "url": "https://packagist.com", - "type": "custom" - }, - { - "url": "https://github.com/composer", + "url": "https://github.com/sponsors/Slamdunk", "type": "github" }, { - "url": "https://tidelift.com/funding/github/packagist/composer/composer", - "type": "tidelift" + "url": "https://paypal.me/filippotessarotto", + "type": "paypal" } ], - "time": "2020-12-03T15:47:16+00:00" + "time": "2023-05-25T13:47:58+00:00" }, { "name": "doctrine/instantiator", - "version": "1.4.1", + "version": "2.0.0", "source": { "type": "git", "url": "https://github.com/doctrine/instantiator.git", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc" + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/instantiator/zipball/10dcfce151b967d20fde1b34ae6640712c3891bc", - "reference": "10dcfce151b967d20fde1b34ae6640712c3891bc", + "url": "https://api.github.com/repos/doctrine/instantiator/zipball/c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", + "reference": "c6222283fa3f4ac679f8b9ced9a4e23f163e80d0", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" + "php": "^8.1" }, "require-dev": { - "doctrine/coding-standard": "^9", + "doctrine/coding-standard": "^11", "ext-pdo": "*", "ext-phar": "*", - "phpbench/phpbench": "^0.16 || ^1", - "phpstan/phpstan": "^1.4", - "phpstan/phpstan-phpunit": "^1", - "phpunit/phpunit": "^7.5 || ^8.5 || ^9.5", - "vimeo/psalm": "^4.22" + "phpbench/phpbench": "^1.2", + "phpstan/phpstan": "^1.9.4", + "phpstan/phpstan-phpunit": "^1.3", + "phpunit/phpunit": "^9.5.27", + "vimeo/psalm": "^5.4" }, "type": "library", "autoload": { @@ -252,7 +151,7 @@ ], "support": { "issues": "https://github.com/doctrine/instantiator/issues", - "source": "https://github.com/doctrine/instantiator/tree/1.4.1" + "source": "https://github.com/doctrine/instantiator/tree/2.0.0" }, "funding": [ { @@ -268,416 +167,366 @@ "type": "tidelift" } ], - "time": "2022-03-03T08:28:38+00:00" + "time": "2022-12-30T00:23:10+00:00" }, { - "name": "myclabs/deep-copy", - "version": "1.11.0", + "name": "fidry/cpu-core-counter", + "version": "0.5.1", "source": { "type": "git", - "url": "https://github.com/myclabs/DeepCopy.git", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614" + "url": "https://github.com/theofidry/cpu-core-counter.git", + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/14daed4296fae74d9e3201d2c4925d1acb7aa614", - "reference": "14daed4296fae74d9e3201d2c4925d1acb7aa614", + "url": "https://api.github.com/repos/theofidry/cpu-core-counter/zipball/b58e5a3933e541dc286cc91fc4f3898bbc6f1623", + "reference": "b58e5a3933e541dc286cc91fc4f3898bbc6f1623", "shasum": "" }, "require": { - "php": "^7.1 || ^8.0" - }, - "conflict": { - "doctrine/collections": "<1.6.8", - "doctrine/common": "<2.13.3 || >=3,<3.2.2" + "php": "^7.2 || ^8.0" }, "require-dev": { - "doctrine/collections": "^1.6.8", - "doctrine/common": "^2.13.3 || ^3.2.2", - "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" + "fidry/makefile": "^0.2.0", + "phpstan/extension-installer": "^1.2.0", + "phpstan/phpstan": "^1.9.2", + "phpstan/phpstan-deprecation-rules": "^1.0.0", + "phpstan/phpstan-phpunit": "^1.2.2", + "phpstan/phpstan-strict-rules": "^1.4.4", + "phpunit/phpunit": "^9.5.26 || ^8.5.31", + "theofidry/php-cs-fixer-config": "^1.0", + "webmozarts/strict-phpunit": "^7.5" }, "type": "library", "autoload": { - "files": [ - "src/DeepCopy/deep_copy.php" - ], "psr-4": { - "DeepCopy\\": "src/DeepCopy/" + "Fidry\\CpuCoreCounter\\": "src/" } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], - "description": "Create deep copies (clones) of your objects", + "authors": [ + { + "name": "Théo FIDRY", + "email": "theo.fidry@gmail.com" + } + ], + "description": "Tiny utility to get the number of CPU cores.", "keywords": [ - "clone", - "copy", - "duplicate", - "object", - "object graph" + "CPU", + "core" ], "support": { - "issues": "https://github.com/myclabs/DeepCopy/issues", - "source": "https://github.com/myclabs/DeepCopy/tree/1.11.0" + "issues": "https://github.com/theofidry/cpu-core-counter/issues", + "source": "https://github.com/theofidry/cpu-core-counter/tree/0.5.1" }, "funding": [ { - "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", - "type": "tidelift" + "url": "https://github.com/theofidry", + "type": "github" } ], - "time": "2022-03-03T13:19:32+00:00" + "time": "2022-12-24T12:35:10+00:00" }, { - "name": "phar-io/manifest", - "version": "1.0.3", + "name": "jean85/pretty-package-versions", + "version": "2.0.5", "source": { "type": "git", - "url": "https://github.com/phar-io/manifest.git", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4" + "url": "https://github.com/Jean85/pretty-package-versions.git", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/manifest/zipball/7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", - "reference": "7761fcacf03b4d4f16e7ccb606d4879ca431fcf4", + "url": "https://api.github.com/repos/Jean85/pretty-package-versions/zipball/ae547e455a3d8babd07b96966b17d7fd21d9c6af", + "reference": "ae547e455a3d8babd07b96966b17d7fd21d9c6af", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-phar": "*", - "phar-io/version": "^2.0", - "php": "^5.6 || ^7.0" + "composer-runtime-api": "^2.0.0", + "php": "^7.1|^8.0" + }, + "require-dev": { + "friendsofphp/php-cs-fixer": "^2.17", + "jean85/composer-provided-replaced-stub-package": "^1.0", + "phpstan/phpstan": "^0.12.66", + "phpunit/phpunit": "^7.5|^8.5|^9.4", + "vimeo/psalm": "^4.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "1.x-dev" } }, "autoload": { - "classmap": [ - "src/" - ] + "psr-4": { + "Jean85\\": "src/" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "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" + "name": "Alessandro Lai", + "email": "alessandro.lai85@gmail.com" } ], - "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", + "description": "A library to get pretty versions strings of installed dependencies", + "keywords": [ + "composer", + "package", + "release", + "versions" + ], "support": { - "issues": "https://github.com/phar-io/manifest/issues", - "source": "https://github.com/phar-io/manifest/tree/master" + "issues": "https://github.com/Jean85/pretty-package-versions/issues", + "source": "https://github.com/Jean85/pretty-package-versions/tree/2.0.5" }, - "time": "2018-07-08T19:23:20+00:00" + "time": "2021-10-08T21:21:46+00:00" }, { - "name": "phar-io/version", - "version": "2.0.1", + "name": "myclabs/deep-copy", + "version": "1.11.1", "source": { "type": "git", - "url": "https://github.com/phar-io/version.git", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6" + "url": "https://github.com/myclabs/DeepCopy.git", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phar-io/version/zipball/45a2ec53a73c70ce41d55cedef9063630abaf1b6", - "reference": "45a2ec53a73c70ce41d55cedef9063630abaf1b6", + "url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", + "reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c", "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", - "support": { - "issues": "https://github.com/phar-io/version/issues", - "source": "https://github.com/phar-io/version/tree/master" - }, - "time": "2018-07-08T19:19:57+00:00" - }, - { - "name": "phpdocumentor/reflection-common", - "version": "2.1.0", - "source": { - "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionCommon.git", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b" + "php": "^7.1 || ^8.0" }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionCommon/zipball/6568f4687e5b41b054365f9ae03fcb1ed5f2069b", - "reference": "6568f4687e5b41b054365f9ae03fcb1ed5f2069b", - "shasum": "" + "conflict": { + "doctrine/collections": "<1.6.8", + "doctrine/common": "<2.13.3 || >=3,<3.2.2" }, - "require": { - "php": ">=7.1" + "require-dev": { + "doctrine/collections": "^1.6.8", + "doctrine/common": "^2.13.3 || ^3.2.2", + "phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "2.x-dev" - } - }, "autoload": { + "files": [ + "src/DeepCopy/deep_copy.php" + ], "psr-4": { - "phpDocumentor\\Reflection\\": "src/" + "DeepCopy\\": "src/DeepCopy/" } }, "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", + "description": "Create deep copies (clones) of your objects", "keywords": [ - "FQSEN", - "phpDocumentor", - "phpdoc", - "reflection", - "static analysis" + "clone", + "copy", + "duplicate", + "object", + "object graph" ], "support": { - "issues": "https://github.com/phpDocumentor/ReflectionCommon/issues", - "source": "https://github.com/phpDocumentor/ReflectionCommon/tree/master" + "issues": "https://github.com/myclabs/DeepCopy/issues", + "source": "https://github.com/myclabs/DeepCopy/tree/1.11.1" }, - "time": "2020-04-27T09:25:28+00:00" + "funding": [ + { + "url": "https://tidelift.com/funding/github/packagist/myclabs/deep-copy", + "type": "tidelift" + } + ], + "time": "2023-03-08T13:26:56+00:00" }, { - "name": "phpdocumentor/reflection-docblock", - "version": "4.3.4", + "name": "nikic/php-parser", + "version": "v4.16.0", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/ReflectionDocBlock.git", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c" + "url": "https://github.com/nikic/PHP-Parser.git", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/ReflectionDocBlock/zipball/da3fd972d6bafd628114f7e7e036f45944b62e9c", - "reference": "da3fd972d6bafd628114f7e7e036f45944b62e9c", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/19526a33fb561ef417e822e85f08a00db4059c17", + "reference": "19526a33fb561ef417e822e85f08a00db4059c17", "shasum": "" }, "require": { - "php": "^7.0", - "phpdocumentor/reflection-common": "^1.0.0 || ^2.0.0", - "phpdocumentor/type-resolver": "~0.4 || ^1.0.0", - "webmozart/assert": "^1.0" + "ext-tokenizer": "*", + "php": ">=7.0" }, "require-dev": { - "doctrine/instantiator": "^1.0.5", - "mockery/mockery": "^1.0", - "phpdocumentor/type-resolver": "0.4.*", - "phpunit/phpunit": "^6.4" + "ircmaxell/php-yacc": "^0.0.7", + "phpunit/phpunit": "^6.5 || ^7.0 || ^8.0 || ^9.0" }, + "bin": [ + "bin/php-parse" + ], "type": "library", "extra": { "branch-alias": { - "dev-master": "4.x-dev" + "dev-master": "4.9-dev" } }, "autoload": { "psr-4": { - "phpDocumentor\\Reflection\\": [ - "src/" - ] + "PhpParser\\": "lib/PhpParser" } }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "name": "Nikita Popov" } ], - "description": "With this component, a library can provide support for annotations via DocBlocks or otherwise retrieve information that is embedded in a DocBlock.", + "description": "A PHP parser written in PHP", + "keywords": [ + "parser", + "php" + ], "support": { - "issues": "https://github.com/phpDocumentor/ReflectionDocBlock/issues", - "source": "https://github.com/phpDocumentor/ReflectionDocBlock/tree/release/4.x" + "issues": "https://github.com/nikic/PHP-Parser/issues", + "source": "https://github.com/nikic/PHP-Parser/tree/v4.16.0" }, - "time": "2019-12-28T18:55:12+00:00" + "time": "2023-06-25T14:52:30+00:00" }, { - "name": "phpdocumentor/type-resolver", - "version": "1.0.1", + "name": "phar-io/manifest", + "version": "2.0.3", "source": { "type": "git", - "url": "https://github.com/phpDocumentor/TypeResolver.git", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9" + "url": "https://github.com/phar-io/manifest.git", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpDocumentor/TypeResolver/zipball/2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", - "reference": "2e32a6d48972b2c1976ed5d8967145b6cec4a4a9", + "url": "https://api.github.com/repos/phar-io/manifest/zipball/97803eca37d319dfa7826cc2437fc020857acb53", + "reference": "97803eca37d319dfa7826cc2437fc020857acb53", "shasum": "" }, "require": { - "php": "^7.1", - "phpdocumentor/reflection-common": "^2.0" - }, - "require-dev": { - "ext-tokenizer": "^7.1", - "mockery/mockery": "~1", - "phpunit/phpunit": "^7.0" + "ext-dom": "*", + "ext-phar": "*", + "ext-xmlwriter": "*", + "phar-io/version": "^3.0.1", + "php": "^7.2 || ^8.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { - "psr-4": { - "phpDocumentor\\Reflection\\": "src" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Mike van Riel", - "email": "me@mikevanriel.com" + "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": "A PSR-5 based resolver of Class names, Types and Structural Element Names", + "description": "Component for reading phar.io manifest information from a PHP Archive (PHAR)", "support": { - "issues": "https://github.com/phpDocumentor/TypeResolver/issues", - "source": "https://github.com/phpDocumentor/TypeResolver/tree/0.7.2" + "issues": "https://github.com/phar-io/manifest/issues", + "source": "https://github.com/phar-io/manifest/tree/2.0.3" }, - "time": "2019-08-22T18:11:29+00:00" + "time": "2021-07-20T11:28:43+00:00" }, { - "name": "phpspec/prophecy", - "version": "v1.10.3", + "name": "phar-io/version", + "version": "3.2.1", "source": { "type": "git", - "url": "https://github.com/phpspec/prophecy.git", - "reference": "451c3cd1418cf640de218914901e51b064abb093" + "url": "https://github.com/phar-io/version.git", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpspec/prophecy/zipball/451c3cd1418cf640de218914901e51b064abb093", - "reference": "451c3cd1418cf640de218914901e51b064abb093", + "url": "https://api.github.com/repos/phar-io/version/zipball/4f7fd7836c6f332bb2933569e566a0d6c4cbed74", + "reference": "4f7fd7836c6f332bb2933569e566a0d6c4cbed74", "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" + "php": "^7.2 || ^8.0" }, "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.10.x-dev" - } - }, "autoload": { - "psr-4": { - "Prophecy\\": "src/Prophecy" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Konstantin Kudryashov", - "email": "ever.zet@gmail.com", - "homepage": "http://everzet.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" }, { - "name": "Marcello Duarte", - "email": "marcello.duarte@gmail.com" + "name": "Sebastian Heuer", + "email": "sebastian@phpeople.de", + "role": "Developer" + }, + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de", + "role": "Developer" } ], - "description": "Highly opinionated mocking framework for PHP 5.3+", - "homepage": "https://github.com/phpspec/prophecy", - "keywords": [ - "Double", - "Dummy", - "fake", - "mock", - "spy", - "stub" - ], + "description": "Library for handling version information and constraints", "support": { - "issues": "https://github.com/phpspec/prophecy/issues", - "source": "https://github.com/phpspec/prophecy/tree/v1.10.3" + "issues": "https://github.com/phar-io/version/issues", + "source": "https://github.com/phar-io/version/tree/3.2.1" }, - "time": "2020-03-05T15:02:03+00:00" + "time": "2022-02-21T01:04:05+00:00" }, { "name": "phpstan/phpstan", - "version": "0.12.99", + "version": "0.12.100", "source": { "type": "git", "url": "https://github.com/phpstan/phpstan.git", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7" + "reference": "48236ddf823547081b2b153d1cd2994b784328c3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/phpstan/phpstan/zipball/b4d40f1d759942f523be267a1bab6884f46ca3f7", - "reference": "b4d40f1d759942f523be267a1bab6884f46ca3f7", + "url": "https://api.github.com/repos/phpstan/phpstan/zipball/48236ddf823547081b2b153d1cd2994b784328c3", + "reference": "48236ddf823547081b2b153d1cd2994b784328c3", "shasum": "" }, "require": { @@ -708,7 +557,7 @@ "description": "PHPStan - PHP Static Analysis Tool", "support": { "issues": "https://github.com/phpstan/phpstan/issues", - "source": "https://github.com/phpstan/phpstan/tree/0.12.99" + "source": "https://github.com/phpstan/phpstan/tree/0.12.100" }, "funding": [ { @@ -719,53 +568,53 @@ "url": "https://github.com/phpstan", "type": "github" }, - { - "url": "https://www.patreon.com/phpstan", - "type": "patreon" - }, { "url": "https://tidelift.com/funding/github/packagist/phpstan/phpstan", "type": "tidelift" } ], - "time": "2021-09-12T20:09:55+00:00" + "time": "2022-11-01T09:52:08+00:00" }, { "name": "phpunit/php-code-coverage", - "version": "6.1.4", + "version": "9.2.26", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-code-coverage.git", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d" + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", - "reference": "807e6013b00af69b6c5d9ceb4282d0393dbb9d8d", + "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", + "reference": "443bc6912c9bd5b409254a40f4b0f4ced7c80ea1", "shasum": "" }, "require": { "ext-dom": "*", + "ext-libxml": "*", "ext-xmlwriter": "*", - "php": "^7.1", - "phpunit/php-file-iterator": "^2.0", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-token-stream": "^3.0", - "sebastian/code-unit-reverse-lookup": "^1.0.1", - "sebastian/environment": "^3.1 || ^4.0", - "sebastian/version": "^2.0.1", - "theseer/tokenizer": "^1.1" + "nikic/php-parser": "^4.15", + "php": ">=7.3", + "phpunit/php-file-iterator": "^3.0.3", + "phpunit/php-text-template": "^2.0.2", + "sebastian/code-unit-reverse-lookup": "^2.0.2", + "sebastian/complexity": "^2.0", + "sebastian/environment": "^5.1.2", + "sebastian/lines-of-code": "^1.0.3", + "sebastian/version": "^3.0.1", + "theseer/tokenizer": "^1.2.0" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "suggest": { - "ext-xdebug": "^2.6.0" + "ext-pcov": "PHP extension that provides line coverage", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "6.1-dev" + "dev-master": "9.2-dev" } }, "autoload": { @@ -793,34 +642,40 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-code-coverage/issues", - "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/master" + "source": "https://github.com/sebastianbergmann/php-code-coverage/tree/9.2.26" }, - "time": "2018-10-31T16:06:48+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2023-03-06T12:58:08+00:00" }, { "name": "phpunit/php-file-iterator", - "version": "2.0.5", + "version": "3.0.6", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/php-file-iterator.git", - "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5" + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", - "reference": "42c5ba5220e6904cbfe8b1a1bda7c0cfdc8c12f5", + "url": "https://api.github.com/repos/sebastianbergmann/php-file-iterator/zipball/cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", + "reference": "cf1c2e7c203ac650e352f4cc675a7021e7d1b3cf", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -847,7 +702,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/php-file-iterator/issues", - "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/2.0.5" + "source": "https://github.com/sebastianbergmann/php-file-iterator/tree/3.0.6" }, "funding": [ { @@ -855,26 +710,38 @@ "type": "github" } ], - "time": "2021-12-02T12:42:26+00:00" + "time": "2021-12-02T12:48:52+00:00" }, - { - "name": "phpunit/php-text-template", - "version": "1.2.1", + { + "name": "phpunit/php-invoker", + "version": "3.1.1", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-text-template.git", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686" + "url": "https://github.com/sebastianbergmann/php-invoker.git", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686", - "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686", + "url": "https://api.github.com/repos/sebastianbergmann/php-invoker/zipball/5a10147d0aaf65b58940a0b72f71c9ac0423cc67", + "reference": "5a10147d0aaf65b58940a0b72f71c9ac0423cc67", "shasum": "" }, "require": { - "php": ">=5.3.3" + "php": ">=7.3" + }, + "require-dev": { + "ext-pcntl": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-pcntl": "*" }, "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.1-dev" + } + }, "autoload": { "classmap": [ "src/" @@ -891,41 +758,47 @@ "role": "lead" } ], - "description": "Simple template engine.", - "homepage": "https://github.com/sebastianbergmann/php-text-template/", + "description": "Invoke callables with a timeout", + "homepage": "https://github.com/sebastianbergmann/php-invoker/", "keywords": [ - "template" + "process" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-text-template/issues", - "source": "https://github.com/sebastianbergmann/php-text-template/tree/1.2.1" + "issues": "https://github.com/sebastianbergmann/php-invoker/issues", + "source": "https://github.com/sebastianbergmann/php-invoker/tree/3.1.1" }, - "time": "2015-06-21T13:50:34+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T05:58:55+00:00" }, { - "name": "phpunit/php-timer", - "version": "2.1.3", + "name": "phpunit/php-text-template", + "version": "2.0.4", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-timer.git", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662" + "url": "https://github.com/sebastianbergmann/php-text-template.git", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/2454ae1765516d20c4ffe103d85a58a9a3bd5662", - "reference": "2454ae1765516d20c4ffe103d85a58a9a3bd5662", + "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", + "reference": "5da5f67fc95621df9ff4c4e5a84d6a8a2acf7c28", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -944,14 +817,14 @@ "role": "lead" } ], - "description": "Utility class for timing", - "homepage": "https://github.com/sebastianbergmann/php-timer/", + "description": "Simple template engine.", + "homepage": "https://github.com/sebastianbergmann/php-text-template/", "keywords": [ - "timer" + "template" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-timer/issues", - "source": "https://github.com/sebastianbergmann/php-timer/tree/2.1.3" + "issues": "https://github.com/sebastianbergmann/php-text-template/issues", + "source": "https://github.com/sebastianbergmann/php-text-template/tree/2.0.4" }, "funding": [ { @@ -959,33 +832,32 @@ "type": "github" } ], - "time": "2020-11-30T08:20:02+00:00" + "time": "2020-10-26T05:33:50+00:00" }, { - "name": "phpunit/php-token-stream", - "version": "3.1.3", + "name": "phpunit/php-timer", + "version": "5.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/php-token-stream.git", - "reference": "9c1da83261628cb24b6a6df371b6e312b3954768" + "url": "https://github.com/sebastianbergmann/php-timer.git", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/9c1da83261628cb24b6a6df371b6e312b3954768", - "reference": "9c1da83261628cb24b6a6df371b6e312b3954768", + "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", + "reference": "5a63ce20ed1b5bf577850e2c4e87f4aa902afbd2", "shasum": "" }, "require": { - "ext-tokenizer": "*", - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1-dev" + "dev-master": "5.0-dev" } }, "autoload": { @@ -1000,17 +872,18 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Wrapper around PHP's tokenizer extension.", - "homepage": "https://github.com/sebastianbergmann/php-token-stream/", + "description": "Utility class for timing", + "homepage": "https://github.com/sebastianbergmann/php-timer/", "keywords": [ - "tokenizer" + "timer" ], "support": { - "issues": "https://github.com/sebastianbergmann/php-token-stream/issues", - "source": "https://github.com/sebastianbergmann/php-token-stream/tree/3.1.3" + "issues": "https://github.com/sebastianbergmann/php-timer/issues", + "source": "https://github.com/sebastianbergmann/php-timer/tree/5.0.3" }, "funding": [ { @@ -1018,58 +891,54 @@ "type": "github" } ], - "abandoned": true, - "time": "2021-07-26T12:15:06+00:00" + "time": "2020-10-26T13:16:10+00:00" }, { "name": "phpunit/phpunit", - "version": "7.5.20", + "version": "9.6.9", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/phpunit.git", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c" + "reference": "a9aceaf20a682aeacf28d582654a1670d8826778" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/9467db479d1b0487c99733bb1e7944d32deded2c", - "reference": "9467db479d1b0487c99733bb1e7944d32deded2c", + "url": "https://api.github.com/repos/sebastianbergmann/phpunit/zipball/a9aceaf20a682aeacf28d582654a1670d8826778", + "reference": "a9aceaf20a682aeacf28d582654a1670d8826778", "shasum": "" }, "require": { - "doctrine/instantiator": "^1.1", + "doctrine/instantiator": "^1.3.1 || ^2", "ext-dom": "*", "ext-json": "*", "ext-libxml": "*", "ext-mbstring": "*", "ext-xml": "*", - "myclabs/deep-copy": "^1.7", - "phar-io/manifest": "^1.0.2", - "phar-io/version": "^2.0", - "php": "^7.1", - "phpspec/prophecy": "^1.7", - "phpunit/php-code-coverage": "^6.0.7", - "phpunit/php-file-iterator": "^2.0.1", - "phpunit/php-text-template": "^1.2.1", - "phpunit/php-timer": "^2.1", - "sebastian/comparator": "^3.0", - "sebastian/diff": "^3.0", - "sebastian/environment": "^4.0", - "sebastian/exporter": "^3.1", - "sebastian/global-state": "^2.0", - "sebastian/object-enumerator": "^3.0.3", - "sebastian/resource-operations": "^2.0", - "sebastian/version": "^2.0.1" - }, - "conflict": { - "phpunit/phpunit-mock-objects": "*" - }, - "require-dev": { - "ext-pdo": "*" + "ext-xmlwriter": "*", + "myclabs/deep-copy": "^1.10.1", + "phar-io/manifest": "^2.0.3", + "phar-io/version": "^3.0.2", + "php": ">=7.3", + "phpunit/php-code-coverage": "^9.2.13", + "phpunit/php-file-iterator": "^3.0.5", + "phpunit/php-invoker": "^3.1.1", + "phpunit/php-text-template": "^2.0.3", + "phpunit/php-timer": "^5.0.2", + "sebastian/cli-parser": "^1.0.1", + "sebastian/code-unit": "^1.0.6", + "sebastian/comparator": "^4.0.8", + "sebastian/diff": "^4.0.3", + "sebastian/environment": "^5.1.3", + "sebastian/exporter": "^4.0.5", + "sebastian/global-state": "^5.0.1", + "sebastian/object-enumerator": "^4.0.3", + "sebastian/resource-operations": "^3.0.3", + "sebastian/type": "^3.2", + "sebastian/version": "^3.0.2" }, "suggest": { - "ext-soap": "*", - "ext-xdebug": "*", - "phpunit/php-invoker": "^2.0" + "ext-soap": "To be able to generate mocks based on WSDL files", + "ext-xdebug": "PHP extension that provides line coverage as well as branch and path coverage" }, "bin": [ "phpunit" @@ -1077,10 +946,13 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "7.5-dev" + "dev-master": "9.6-dev" } }, "autoload": { + "files": [ + "src/Framework/Assert/Functions.php" + ], "classmap": [ "src/" ] @@ -1105,31 +977,46 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/phpunit/issues", - "source": "https://github.com/sebastianbergmann/phpunit/tree/7.5.20" + "security": "https://github.com/sebastianbergmann/phpunit/security/policy", + "source": "https://github.com/sebastianbergmann/phpunit/tree/9.6.9" }, - "time": "2020-01-08T08:45:45+00:00" + "funding": [ + { + "url": "https://phpunit.de/sponsors.html", + "type": "custom" + }, + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/phpunit/phpunit", + "type": "tidelift" + } + ], + "time": "2023-06-11T06:13:56+00:00" }, { "name": "psr/container", - "version": "1.0.0", + "version": "2.0.2", "source": { "type": "git", "url": "https://github.com/php-fig/container.git", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f" + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/php-fig/container/zipball/b7ce3b176482dbbc1245ebf52b181af44c2cf55f", - "reference": "b7ce3b176482dbbc1245ebf52b181af44c2cf55f", + "url": "https://api.github.com/repos/php-fig/container/zipball/c71ecc56dfe541dbd90c5360474fbc405f8d5963", + "reference": "c71ecc56dfe541dbd90c5360474fbc405f8d5963", "shasum": "" }, "require": { - "php": ">=5.3.0" + "php": ">=7.4.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0.x-dev" } }, "autoload": { @@ -1144,7 +1031,7 @@ "authors": [ { "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" + "homepage": "https://www.php-fig.org/" } ], "description": "Common Container Interface (PHP FIG PSR-11)", @@ -1158,34 +1045,146 @@ ], "support": { "issues": "https://github.com/php-fig/container/issues", - "source": "https://github.com/php-fig/container/tree/master" + "source": "https://github.com/php-fig/container/tree/2.0.2" + }, + "time": "2021-11-05T16:47:00+00:00" + }, + { + "name": "sebastian/cli-parser", + "version": "1.0.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/cli-parser.git", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/cli-parser/zipball/442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "reference": "442e7c7e687e42adc03470c7b668bc4b2402c0b2", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "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": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Library for parsing CLI options", + "homepage": "https://github.com/sebastianbergmann/cli-parser", + "support": { + "issues": "https://github.com/sebastianbergmann/cli-parser/issues", + "source": "https://github.com/sebastianbergmann/cli-parser/tree/1.0.1" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:08:49+00:00" + }, + { + "name": "sebastian/code-unit", + "version": "1.0.8", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/code-unit.git", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit/zipball/1fc9f64c0927627ef78ba436c9b17d967e68e120", + "reference": "1fc9f64c0927627ef78ba436c9b17d967e68e120", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "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": "sebastian@phpunit.de", + "role": "lead" + } + ], + "description": "Collection of value objects that represent the PHP code units", + "homepage": "https://github.com/sebastianbergmann/code-unit", + "support": { + "issues": "https://github.com/sebastianbergmann/code-unit/issues", + "source": "https://github.com/sebastianbergmann/code-unit/tree/1.0.8" }, - "time": "2017-02-14T16:28:37+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-10-26T13:08:54+00:00" }, { "name": "sebastian/code-unit-reverse-lookup", - "version": "1.0.2", + "version": "2.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/code-unit-reverse-lookup.git", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619" + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/1de8cd5c010cb153fcd68b8d0f64606f523f7619", - "reference": "1de8cd5c010cb153fcd68b8d0f64606f523f7619", + "url": "https://api.github.com/repos/sebastianbergmann/code-unit-reverse-lookup/zipball/ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", + "reference": "ac91f01ccec49fb77bdc6fd1e548bc70f7faa3e5", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.0.x-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1207,7 +1206,7 @@ "homepage": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/", "support": { "issues": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/issues", - "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/1.0.2" + "source": "https://github.com/sebastianbergmann/code-unit-reverse-lookup/tree/2.0.3" }, "funding": [ { @@ -1215,34 +1214,34 @@ "type": "github" } ], - "time": "2020-11-30T08:15:22+00:00" + "time": "2020-09-28T05:30:19+00:00" }, { "name": "sebastian/comparator", - "version": "3.0.3", + "version": "4.0.8", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/comparator.git", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758" + "reference": "fa0f136dd2334583309d32b62544682ee972b51a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/1071dfcef776a57013124ff35e1fc41ccd294758", - "reference": "1071dfcef776a57013124ff35e1fc41ccd294758", + "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/fa0f136dd2334583309d32b62544682ee972b51a", + "reference": "fa0f136dd2334583309d32b62544682ee972b51a", "shasum": "" }, "require": { - "php": ">=7.1", - "sebastian/diff": "^3.0", - "sebastian/exporter": "^3.1" + "php": ">=7.3", + "sebastian/diff": "^4.0", + "sebastian/exporter": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1281,7 +1280,64 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/comparator/issues", - "source": "https://github.com/sebastianbergmann/comparator/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/comparator/tree/4.0.8" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T12:41:17+00:00" + }, + { + "name": "sebastian/complexity", + "version": "2.0.2", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/complexity.git", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/complexity/zipball/739b35e53379900cc9ac327b2147867b8b6efd88", + "reference": "739b35e53379900cc9ac327b2147867b8b6efd88", + "shasum": "" + }, + "require": { + "nikic/php-parser": "^4.7", + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.3" + }, + "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", + "role": "lead" + } + ], + "description": "Library for calculating the complexity of PHP code units", + "homepage": "https://github.com/sebastianbergmann/complexity", + "support": { + "issues": "https://github.com/sebastianbergmann/complexity/issues", + "source": "https://github.com/sebastianbergmann/complexity/tree/2.0.2" }, "funding": [ { @@ -1289,33 +1345,33 @@ "type": "github" } ], - "time": "2020-11-30T08:04:30+00:00" + "time": "2020-10-26T15:52:27+00:00" }, { "name": "sebastian/diff", - "version": "3.0.3", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/diff.git", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211" + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/14f72dd46eaf2f2293cbe79c93cc0bc43161a211", - "reference": "14f72dd46eaf2f2293cbe79c93cc0bc43161a211", + "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/74be17022044ebaaecfdf0c5cd504fc9cd5a7131", + "reference": "74be17022044ebaaecfdf0c5cd504fc9cd5a7131", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5 || ^8.0", - "symfony/process": "^2 || ^3.3 || ^4" + "phpunit/phpunit": "^9.3", + "symfony/process": "^4.2 || ^5" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1347,7 +1403,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/diff/issues", - "source": "https://github.com/sebastianbergmann/diff/tree/3.0.3" + "source": "https://github.com/sebastianbergmann/diff/tree/4.0.5" }, "funding": [ { @@ -1355,27 +1411,27 @@ "type": "github" } ], - "time": "2020-11-30T07:59:04+00:00" + "time": "2023-05-07T05:35:17+00:00" }, { "name": "sebastian/environment", - "version": "4.2.4", + "version": "5.1.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/environment.git", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0" + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", - "reference": "d47bbbad83711771f167c72d4e3f25f7fcc1f8b0", + "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", + "reference": "830c43a844f1f8d5b7a1f6d6076b784454d8b7ed", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^7.5" + "phpunit/phpunit": "^9.3" }, "suggest": { "ext-posix": "*" @@ -1383,7 +1439,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-master": "4.2-dev" + "dev-master": "5.1-dev" } }, "autoload": { @@ -1410,7 +1466,7 @@ ], "support": { "issues": "https://github.com/sebastianbergmann/environment/issues", - "source": "https://github.com/sebastianbergmann/environment/tree/4.2.4" + "source": "https://github.com/sebastianbergmann/environment/tree/5.1.5" }, "funding": [ { @@ -1418,34 +1474,34 @@ "type": "github" } ], - "time": "2020-11-30T07:53:42+00:00" + "time": "2023-02-03T06:03:51+00:00" }, { "name": "sebastian/exporter", - "version": "3.1.4", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/exporter.git", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db" + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", - "reference": "0c32ea2e40dbf59de29f3b49bf375176ce7dd8db", + "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", + "reference": "ac230ed27f0f98f597c8a2b6eb7ac563af5e5b9d", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/recursion-context": "^4.0" }, "require-dev": { "ext-mbstring": "*", - "phpunit/phpunit": "^8.5" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.1.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1480,14 +1536,78 @@ } ], "description": "Provides the functionality to export PHP variables for visualization", - "homepage": "http://www.github.com/sebastianbergmann/exporter", + "homepage": "https://www.github.com/sebastianbergmann/exporter", "keywords": [ "export", "exporter" ], "support": { "issues": "https://github.com/sebastianbergmann/exporter/issues", - "source": "https://github.com/sebastianbergmann/exporter/tree/3.1.4" + "source": "https://github.com/sebastianbergmann/exporter/tree/4.0.5" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2022-09-14T06:03:37+00:00" + }, + { + "name": "sebastian/global-state", + "version": "5.0.5", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/global-state.git", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "reference": "0ca8db5a5fc9c8646244e629625ac486fa286bf2", + "shasum": "" + }, + "require": { + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" + }, + "require-dev": { + "ext-dom": "*", + "phpunit/phpunit": "^9.3" + }, + "suggest": { + "ext-uopz": "*" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "5.0-dev" + } + }, + "autoload": { + "classmap": [ + "src/" + ] + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "BSD-3-Clause" + ], + "authors": [ + { + "name": "Sebastian Bergmann", + "email": "sebastian@phpunit.de" + } + ], + "description": "Snapshotting of global state", + "homepage": "http://www.github.com/sebastianbergmann/global-state", + "keywords": [ + "global state" + ], + "support": { + "issues": "https://github.com/sebastianbergmann/global-state/issues", + "source": "https://github.com/sebastianbergmann/global-state/tree/5.0.5" }, "funding": [ { @@ -1495,35 +1615,33 @@ "type": "github" } ], - "time": "2021-11-11T13:51:24+00:00" + "time": "2022-02-14T08:28:10+00:00" }, { - "name": "sebastian/global-state", - "version": "2.0.0", + "name": "sebastian/lines-of-code", + "version": "1.0.3", "source": { "type": "git", - "url": "https://github.com/sebastianbergmann/global-state.git", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4" + "url": "https://github.com/sebastianbergmann/lines-of-code.git", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/global-state/zipball/e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", - "reference": "e8ba02eed7bbbb9e59e43dedd3dddeff4a56b0c4", + "url": "https://api.github.com/repos/sebastianbergmann/lines-of-code/zipball/c1c2e997aa3146983ed888ad08b15470a2e22ecc", + "reference": "c1c2e997aa3146983ed888ad08b15470a2e22ecc", "shasum": "" }, "require": { - "php": "^7.0" + "nikic/php-parser": "^4.6", + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" - }, - "suggest": { - "ext-uopz": "*" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "1.0-dev" } }, "autoload": { @@ -1538,46 +1656,50 @@ "authors": [ { "name": "Sebastian Bergmann", - "email": "sebastian@phpunit.de" + "email": "sebastian@phpunit.de", + "role": "lead" } ], - "description": "Snapshotting of global state", - "homepage": "http://www.github.com/sebastianbergmann/global-state", - "keywords": [ - "global state" - ], + "description": "Library for counting the lines of code in PHP source code", + "homepage": "https://github.com/sebastianbergmann/lines-of-code", "support": { - "issues": "https://github.com/sebastianbergmann/global-state/issues", - "source": "https://github.com/sebastianbergmann/global-state/tree/2.0.0" + "issues": "https://github.com/sebastianbergmann/lines-of-code/issues", + "source": "https://github.com/sebastianbergmann/lines-of-code/tree/1.0.3" }, - "time": "2017-04-27T15:39:26+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-11-28T06:42:11+00:00" }, { "name": "sebastian/object-enumerator", - "version": "3.0.4", + "version": "4.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-enumerator.git", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2" + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", - "reference": "e67f6d32ebd0c749cf9d1dbd9f226c727043cdf2", + "url": "https://api.github.com/repos/sebastianbergmann/object-enumerator/zipball/5c9eeac41b290a3712d88851518825ad78f45c71", + "reference": "5c9eeac41b290a3712d88851518825ad78f45c71", "shasum": "" }, "require": { - "php": ">=7.0", - "sebastian/object-reflector": "^1.1.1", - "sebastian/recursion-context": "^3.0" + "php": ">=7.3", + "sebastian/object-reflector": "^2.0", + "sebastian/recursion-context": "^4.0" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1599,7 +1721,7 @@ "homepage": "https://github.com/sebastianbergmann/object-enumerator/", "support": { "issues": "https://github.com/sebastianbergmann/object-enumerator/issues", - "source": "https://github.com/sebastianbergmann/object-enumerator/tree/3.0.4" + "source": "https://github.com/sebastianbergmann/object-enumerator/tree/4.0.4" }, "funding": [ { @@ -1607,32 +1729,32 @@ "type": "github" } ], - "time": "2020-11-30T07:40:27+00:00" + "time": "2020-10-26T13:12:34+00:00" }, { "name": "sebastian/object-reflector", - "version": "1.1.2", + "version": "2.0.4", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/object-reflector.git", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d" + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", - "reference": "9b8772b9cbd456ab45d4a598d2dd1a1bced6363d", + "url": "https://api.github.com/repos/sebastianbergmann/object-reflector/zipball/b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", + "reference": "b4f479ebdbf63ac605d183ece17d8d7fe49c15c7", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "1.1-dev" + "dev-master": "2.0-dev" } }, "autoload": { @@ -1654,7 +1776,7 @@ "homepage": "https://github.com/sebastianbergmann/object-reflector/", "support": { "issues": "https://github.com/sebastianbergmann/object-reflector/issues", - "source": "https://github.com/sebastianbergmann/object-reflector/tree/1.1.2" + "source": "https://github.com/sebastianbergmann/object-reflector/tree/2.0.4" }, "funding": [ { @@ -1662,32 +1784,32 @@ "type": "github" } ], - "time": "2020-11-30T07:37:18+00:00" + "time": "2020-10-26T13:14:26+00:00" }, { "name": "sebastian/recursion-context", - "version": "3.0.1", + "version": "4.0.5", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/recursion-context.git", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb" + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/367dcba38d6e1977be014dc4b22f47a484dac7fb", - "reference": "367dcba38d6e1977be014dc4b22f47a484dac7fb", + "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", + "reference": "e75bd0f07204fec2a0af9b0f3cfe97d05f92efc1", "shasum": "" }, "require": { - "php": ">=7.0" + "php": ">=7.3" }, "require-dev": { - "phpunit/phpunit": "^6.0" + "phpunit/phpunit": "^9.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "3.0.x-dev" + "dev-master": "4.0-dev" } }, "autoload": { @@ -1714,10 +1836,10 @@ } ], "description": "Provides functionality to recursively process PHP variables", - "homepage": "http://www.github.com/sebastianbergmann/recursion-context", + "homepage": "https://github.com/sebastianbergmann/recursion-context", "support": { "issues": "https://github.com/sebastianbergmann/recursion-context/issues", - "source": "https://github.com/sebastianbergmann/recursion-context/tree/3.0.1" + "source": "https://github.com/sebastianbergmann/recursion-context/tree/4.0.5" }, "funding": [ { @@ -1725,29 +1847,32 @@ "type": "github" } ], - "time": "2020-11-30T07:34:24+00:00" + "time": "2023-02-03T06:07:39+00:00" }, { "name": "sebastian/resource-operations", - "version": "2.0.2", + "version": "3.0.3", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/resource-operations.git", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3" + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/31d35ca87926450c44eae7e2611d45a7a65ea8b3", - "reference": "31d35ca87926450c44eae7e2611d45a7a65ea8b3", + "url": "https://api.github.com/repos/sebastianbergmann/resource-operations/zipball/0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", + "reference": "0f4443cb3a1d92ce809899753bc0d5d5a8dd19a8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.0" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1769,7 +1894,63 @@ "homepage": "https://www.github.com/sebastianbergmann/resource-operations", "support": { "issues": "https://github.com/sebastianbergmann/resource-operations/issues", - "source": "https://github.com/sebastianbergmann/resource-operations/tree/2.0.2" + "source": "https://github.com/sebastianbergmann/resource-operations/tree/3.0.3" + }, + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:45:17+00:00" + }, + { + "name": "sebastian/type", + "version": "3.2.1", + "source": { + "type": "git", + "url": "https://github.com/sebastianbergmann/type.git", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/sebastianbergmann/type/zipball/75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "reference": "75e2c2a32f5e0b3aef905b9ed0b179b953b3d7c7", + "shasum": "" + }, + "require": { + "php": ">=7.3" + }, + "require-dev": { + "phpunit/phpunit": "^9.5" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "3.2-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": "Collection of value objects that represent the types of the PHP type system", + "homepage": "https://github.com/sebastianbergmann/type", + "support": { + "issues": "https://github.com/sebastianbergmann/type/issues", + "source": "https://github.com/sebastianbergmann/type/tree/3.2.1" }, "funding": [ { @@ -1777,29 +1958,29 @@ "type": "github" } ], - "time": "2020-11-30T07:30:19+00:00" + "time": "2023-02-03T06:13:03+00:00" }, { "name": "sebastian/version", - "version": "2.0.1", + "version": "3.0.2", "source": { "type": "git", "url": "https://github.com/sebastianbergmann/version.git", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019" + "reference": "c6c1022351a901512170118436c764e473f6de8c" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/99732be0ddb3361e16ad77b68ba41efc8e979019", - "reference": "99732be0ddb3361e16ad77b68ba41efc8e979019", + "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/c6c1022351a901512170118436c764e473f6de8c", + "reference": "c6c1022351a901512170118436c764e473f6de8c", "shasum": "" }, "require": { - "php": ">=5.6" + "php": ">=7.3" }, "type": "library", "extra": { "branch-alias": { - "dev-master": "2.0.x-dev" + "dev-master": "3.0-dev" } }, "autoload": { @@ -1822,9 +2003,15 @@ "homepage": "https://github.com/sebastianbergmann/version", "support": { "issues": "https://github.com/sebastianbergmann/version/issues", - "source": "https://github.com/sebastianbergmann/version/tree/master" + "source": "https://github.com/sebastianbergmann/version/tree/3.0.2" }, - "time": "2016-10-03T07:35:21+00:00" + "funding": [ + { + "url": "https://github.com/sebastianbergmann", + "type": "github" + } + ], + "time": "2020-09-28T06:39:44+00:00" }, { "name": "squizlabs/php_codesniffer", @@ -1911,49 +2098,43 @@ }, { "name": "symfony/console", - "version": "v4.4.43", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/console.git", - "reference": "8a2628d2d5639f35113dc1b833ecd91e1ed1cf46" + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/console/zipball/8a2628d2d5639f35113dc1b833ecd91e1ed1cf46", - "reference": "8a2628d2d5639f35113dc1b833ecd91e1ed1cf46", + "url": "https://api.github.com/repos/symfony/console/zipball/8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", + "reference": "8788808b07cf0bdd6e4b7fdd23d8ddb1470c83b7", "shasum": "" }, "require": { - "php": ">=7.1.3", + "php": ">=8.1", + "symfony/deprecation-contracts": "^2.5|^3", "symfony/polyfill-mbstring": "~1.0", - "symfony/polyfill-php73": "^1.8", - "symfony/polyfill-php80": "^1.16", - "symfony/service-contracts": "^1.1|^2" + "symfony/service-contracts": "^2.5|^3", + "symfony/string": "^5.4|^6.0" }, "conflict": { - "psr/log": ">=3", - "symfony/dependency-injection": "<3.4", - "symfony/event-dispatcher": "<4.3|>=5", - "symfony/lock": "<4.4", - "symfony/process": "<3.3" + "symfony/dependency-injection": "<5.4", + "symfony/dotenv": "<5.4", + "symfony/event-dispatcher": "<5.4", + "symfony/lock": "<5.4", + "symfony/process": "<5.4" }, "provide": { - "psr/log-implementation": "1.0|2.0" + "psr/log-implementation": "1.0|2.0|3.0" }, "require-dev": { - "psr/log": "^1|^2", - "symfony/config": "^3.4|^4.0|^5.0", - "symfony/dependency-injection": "^3.4|^4.0|^5.0", - "symfony/event-dispatcher": "^4.3", - "symfony/lock": "^4.4|^5.0", - "symfony/process": "^3.4|^4.0|^5.0", - "symfony/var-dumper": "^4.3|^5.0" - }, - "suggest": { - "psr/log": "For using the console logger", - "symfony/event-dispatcher": "", - "symfony/lock": "", - "symfony/process": "" + "psr/log": "^1|^2|^3", + "symfony/config": "^5.4|^6.0", + "symfony/dependency-injection": "^5.4|^6.0", + "symfony/event-dispatcher": "^5.4|^6.0", + "symfony/lock": "^5.4|^6.0", + "symfony/process": "^5.4|^6.0", + "symfony/var-dumper": "^5.4|^6.0" }, "type": "library", "autoload": { @@ -1980,8 +2161,81 @@ ], "description": "Eases the creation of beautiful and testable command line interfaces", "homepage": "https://symfony.com", + "keywords": [ + "cli", + "command-line", + "console", + "terminal" + ], + "support": { + "source": "https://github.com/symfony/console/tree/v6.3.0" + }, + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-05-29T12:49:39+00:00" + }, + { + "name": "symfony/deprecation-contracts", + "version": "v3.3.0", + "source": { + "type": "git", + "url": "https://github.com/symfony/deprecation-contracts.git", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", + "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "shasum": "" + }, + "require": { + "php": ">=8.1" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-main": "3.4-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", "support": { - "source": "https://github.com/symfony/console/tree/v4.4.43" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.3.0" }, "funding": [ { @@ -1997,20 +2251,20 @@ "type": "tidelift" } ], - "time": "2022-06-23T12:22:25+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -2025,7 +2279,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2063,7 +2317,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -2079,35 +2333,32 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "name": "symfony/polyfill-intl-grapheme", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "url": "https://github.com/symfony/polyfill-intl-grapheme.git", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-intl-grapheme/zipball/511a08c03c1960e08a883f4cffcacd219b758354", + "reference": "511a08c03c1960e08a883f4cffcacd219b758354", "shasum": "" }, "require": { "php": ">=7.1" }, - "provide": { - "ext-mbstring": "*" - }, "suggest": { - "ext-mbstring": "For best performance" + "ext-intl": "For best performance" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2119,7 +2370,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Mbstring\\": "" + "Symfony\\Polyfill\\Intl\\Grapheme\\": "" } }, "notification-url": "https://packagist.org/downloads/", @@ -2136,17 +2387,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill for the Mbstring extension", + "description": "Symfony polyfill for intl's grapheme_* functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", - "mbstring", + "grapheme", + "intl", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-grapheme/tree/v1.27.0" }, "funding": [ { @@ -2162,29 +2414,32 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-php73", - "version": "v1.26.0", + "name": "symfony/polyfill-intl-normalizer", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php73.git", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85" + "url": "https://github.com/symfony/polyfill-intl-normalizer.git", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php73/zipball/e440d35fa0286f77fb45b79a03fedbeda9307e85", - "reference": "e440d35fa0286f77fb45b79a03fedbeda9307e85", + "url": "https://api.github.com/repos/symfony/polyfill-intl-normalizer/zipball/19bd1e4fcd5b91116f14d8533c57831ed00571b6", + "reference": "19bd1e4fcd5b91116f14d8533c57831ed00571b6", "shasum": "" }, "require": { "php": ">=7.1" }, + "suggest": { + "ext-intl": "For best performance" + }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2196,7 +2451,7 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php73\\": "" + "Symfony\\Polyfill\\Intl\\Normalizer\\": "" }, "classmap": [ "Resources/stubs" @@ -2216,16 +2471,18 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 7.3+ features to lower PHP versions", + "description": "Symfony polyfill for intl's Normalizer class and related functions", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "intl", + "normalizer", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php73/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-intl-normalizer/tree/v1.27.0" }, "funding": [ { @@ -2241,29 +2498,35 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { - "name": "symfony/polyfill-php80", - "version": "v1.26.0", + "name": "symfony/polyfill-mbstring", + "version": "v1.27.0", "source": { "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace" + "url": "https://github.com/symfony/polyfill-mbstring.git", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/cfa0ae98841b9e461207c13ab093d76b0fa7bace", - "reference": "cfa0ae98841b9e461207c13ab093d76b0fa7bace", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { "php": ">=7.1" }, + "provide": { + "ext-mbstring": "*" + }, + "suggest": { + "ext-mbstring": "For best performance" + }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -2275,21 +2538,14 @@ "bootstrap.php" ], "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "classmap": [ - "Resources/stubs" - ] + "Symfony\\Polyfill\\Mbstring\\": "" + } }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" ], "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, { "name": "Nicolas Grekas", "email": "p@tchwork.com" @@ -2299,16 +2555,17 @@ "homepage": "https://symfony.com/contributors" } ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", + "description": "Symfony polyfill for the Mbstring extension", "homepage": "https://symfony.com", "keywords": [ "compatibility", + "mbstring", "polyfill", "portable", "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -2324,25 +2581,24 @@ "type": "tidelift" } ], - "time": "2022-05-10T07:21:04+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/process", - "version": "v4.4.41", + "version": "v6.3.0", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "9eedd60225506d56e42210a70c21bb80ca8456ce" + "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/9eedd60225506d56e42210a70c21bb80ca8456ce", - "reference": "9eedd60225506d56e42210a70c21bb80ca8456ce", + "url": "https://api.github.com/repos/symfony/process/zipball/8741e3ed7fe2e91ec099e02446fb86667a0f1628", + "reference": "8741e3ed7fe2e91ec099e02446fb86667a0f1628", "shasum": "" }, "require": { - "php": ">=7.1.3", - "symfony/polyfill-php80": "^1.16" + "php": ">=8.1" }, "type": "library", "autoload": { @@ -2370,7 +2626,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v4.4.41" + "source": "https://github.com/symfony/process/tree/v6.3.0" }, "funding": [ { @@ -2386,33 +2642,33 @@ "type": "tidelift" } ], - "time": "2022-04-04T10:19:07+00:00" + "time": "2023-05-19T08:06:44+00:00" }, { "name": "symfony/service-contracts", - "version": "v1.1.13", + "version": "v3.3.0", "source": { "type": "git", "url": "https://github.com/symfony/service-contracts.git", - "reference": "afa00c500c2d6aea6e3b2f4862355f507bc5ebb4" + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/service-contracts/zipball/afa00c500c2d6aea6e3b2f4862355f507bc5ebb4", - "reference": "afa00c500c2d6aea6e3b2f4862355f507bc5ebb4", + "url": "https://api.github.com/repos/symfony/service-contracts/zipball/40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", + "reference": "40da9cc13ec349d9e4966ce18b5fbcd724ab10a4", "shasum": "" }, "require": { - "php": ">=7.1.3", - "psr/container": "^1.0" + "php": ">=8.1", + "psr/container": "^2.0" }, - "suggest": { - "symfony/service-implementation": "" + "conflict": { + "ext-psr": "<1.1|>=2" }, "type": "library", "extra": { "branch-alias": { - "dev-main": "1.1-dev" + "dev-main": "3.4-dev" }, "thanks": { "name": "symfony/contracts", @@ -2422,7 +2678,10 @@ "autoload": { "psr-4": { "Symfony\\Contracts\\Service\\": "" - } + }, + "exclude-from-classmap": [ + "/Test/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ @@ -2449,7 +2708,7 @@ "standards" ], "support": { - "source": "https://github.com/symfony/service-contracts/tree/v1.1.13" + "source": "https://github.com/symfony/service-contracts/tree/v3.3.0" }, "funding": [ { @@ -2465,104 +2724,143 @@ "type": "tidelift" } ], - "time": "2022-05-27T14:01:05+00:00" + "time": "2023-05-23T14:45:45+00:00" }, { - "name": "theseer/tokenizer", - "version": "1.1.3", + "name": "symfony/string", + "version": "v6.3.0", "source": { "type": "git", - "url": "https://github.com/theseer/tokenizer.git", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9" + "url": "https://github.com/symfony/string.git", + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/theseer/tokenizer/zipball/11336f6f84e16a720dae9d8e6ed5019efa85a0f9", - "reference": "11336f6f84e16a720dae9d8e6ed5019efa85a0f9", + "url": "https://api.github.com/repos/symfony/string/zipball/f2e190ee75ff0f5eced645ec0be5c66fac81f51f", + "reference": "f2e190ee75ff0f5eced645ec0be5c66fac81f51f", "shasum": "" }, "require": { - "ext-dom": "*", - "ext-tokenizer": "*", - "ext-xmlwriter": "*", - "php": "^7.0" + "php": ">=8.1", + "symfony/polyfill-ctype": "~1.8", + "symfony/polyfill-intl-grapheme": "~1.0", + "symfony/polyfill-intl-normalizer": "~1.0", + "symfony/polyfill-mbstring": "~1.0" + }, + "conflict": { + "symfony/translation-contracts": "<2.5" + }, + "require-dev": { + "symfony/error-handler": "^5.4|^6.0", + "symfony/http-client": "^5.4|^6.0", + "symfony/intl": "^6.2", + "symfony/translation-contracts": "^2.5|^3.0", + "symfony/var-exporter": "^5.4|^6.0" }, "type": "library", "autoload": { - "classmap": [ - "src/" + "files": [ + "Resources/functions.php" + ], + "psr-4": { + "Symfony\\Component\\String\\": "" + }, + "exclude-from-classmap": [ + "/Tests/" ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "BSD-3-Clause" + "MIT" ], "authors": [ { - "name": "Arne Blankerts", - "email": "arne@blankerts.de", - "role": "Developer" + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" } ], - "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", + "description": "Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way", + "homepage": "https://symfony.com", + "keywords": [ + "grapheme", + "i18n", + "string", + "unicode", + "utf-8", + "utf8" + ], "support": { - "issues": "https://github.com/theseer/tokenizer/issues", - "source": "https://github.com/theseer/tokenizer/tree/master" + "source": "https://github.com/symfony/string/tree/v6.3.0" }, - "time": "2019-06-13T22:48:21+00:00" + "funding": [ + { + "url": "https://symfony.com/sponsor", + "type": "custom" + }, + { + "url": "https://github.com/fabpot", + "type": "github" + }, + { + "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", + "type": "tidelift" + } + ], + "time": "2023-03-21T21:06:29+00:00" }, { - "name": "webmozart/assert", - "version": "1.9.1", + "name": "theseer/tokenizer", + "version": "1.2.1", "source": { "type": "git", - "url": "https://github.com/webmozarts/assert.git", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389" + "url": "https://github.com/theseer/tokenizer.git", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/webmozarts/assert/zipball/bafc69caeb4d49c39fd0779086c03a3738cbb389", - "reference": "bafc69caeb4d49c39fd0779086c03a3738cbb389", + "url": "https://api.github.com/repos/theseer/tokenizer/zipball/34a41e998c2183e22995f158c581e7b5e755ab9e", + "reference": "34a41e998c2183e22995f158c581e7b5e755ab9e", "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" + "ext-dom": "*", + "ext-tokenizer": "*", + "ext-xmlwriter": "*", + "php": "^7.2 || ^8.0" }, "type": "library", "autoload": { - "psr-4": { - "Webmozart\\Assert\\": "src/" - } + "classmap": [ + "src/" + ] }, "notification-url": "https://packagist.org/downloads/", "license": [ - "MIT" + "BSD-3-Clause" ], "authors": [ { - "name": "Bernhard Schussek", - "email": "bschussek@gmail.com" + "name": "Arne Blankerts", + "email": "arne@blankerts.de", + "role": "Developer" } ], - "description": "Assertions to validate method input/output with nice error messages.", - "keywords": [ - "assert", - "check", - "validate" - ], + "description": "A small library for converting tokenized PHP source code into XML and potentially other formats", "support": { - "issues": "https://github.com/webmozarts/assert/issues", - "source": "https://github.com/webmozarts/assert/tree/1.9.1" + "issues": "https://github.com/theseer/tokenizer/issues", + "source": "https://github.com/theseer/tokenizer/tree/1.2.1" }, - "time": "2020-07-08T17:02:28+00:00" + "funding": [ + { + "url": "https://github.com/theseer", + "type": "github" + } + ], + "time": "2021-07-28T10:34:58+00:00" } ], "aliases": [], @@ -2571,7 +2869,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": ">= 7.1", + "php": ">= 8.0", "ext-curl": "*", "ext-dom": "*", "ext-openssl": "*", diff --git a/metadata.xml b/metadata.xml index 32c28ba9..208452bb 100644 --- a/metadata.xml +++ b/metadata.xml @@ -1,3 +1,3 @@ - 8.0.2 + 9.0.0 \ No newline at end of file diff --git a/src/Builders/ManagementBuilder.php b/src/Builders/ManagementBuilder.php index 5e45698e..350abfb6 100644 --- a/src/Builders/ManagementBuilder.php +++ b/src/Builders/ManagementBuilder.php @@ -5,6 +5,7 @@ use GlobalPayments\Api\Entities\{DccRateData, FundsData, LodgingData, Transaction}; use GlobalPayments\Api\Entities\Enums\{ CommercialIndicator, + PaymentMethodType, PaymentMethodUsageMode, TaxType, TransactionModifier, @@ -275,9 +276,19 @@ public function __isset($name) public function execute($configName = 'default') { parent::execute($configName); - return ServicesContainer::instance() - ->getClient($configName) - ->manageTransaction($this); + + $client = ServicesContainer::instance()->getClient($configName); + if ($client->supportsOpenBanking() && + $this->paymentMethod instanceof TransactionReference && + $this->paymentMethod->paymentMethodType == PaymentMethodType::BANK_PAYMENT + ) { + $obClient = ServicesContainer::instance()->getOpenBanking($configName); + if (get_class($obClient) != get_class($client)) { + return $obClient->manageOpenBanking($this); + } + } + + return $client->manageTransaction($this); } /** diff --git a/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.php b/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.php index 3e6c8e1a..781400b4 100644 --- a/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.php +++ b/src/Builders/RequestBuilder/GpApi/GpApiAuthorizationRequestBuilder.php @@ -62,7 +62,7 @@ class GpApiAuthorizationRequestBuilder implements IRequestBuilder * * @return bool */ - public static function canProcess($builder) + public static function canProcess($builder = null) { if ($builder instanceof AuthorizationBuilder) { return true; @@ -831,4 +831,9 @@ public function mapFraudManagement() 'rules' => $rules ?? null ]; } + + public function buildRequestFromJson($jsonRequest, $config) + { + // TODO: Implement buildRequestFromJson() method. + } } diff --git a/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.php b/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.php index 388940c9..655e103b 100644 --- a/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.php +++ b/src/Builders/RequestBuilder/GpApi/GpApiManagementRequestBuilder.php @@ -32,7 +32,7 @@ class GpApiManagementRequestBuilder implements IRequestBuilder * @param $builder * @return bool */ - public static function canProcess($builder) + public static function canProcess($builder = null) { if ($builder instanceof ManagementBuilder) { return true; @@ -306,4 +306,9 @@ private function getTransactionTypeName($transactionType) return array_search($transactionType,$reflector->getConstants()); } + + public function buildRequestFromJson($jsonRequest, $config) + { + // TODO: Implement buildRequestFromJson() method. + } } \ No newline at end of file diff --git a/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.php b/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.php new file mode 100644 index 00000000..6f1ce3fa --- /dev/null +++ b/src/Builders/RequestBuilder/GpApi/GpApiMiCRequestBuilder.php @@ -0,0 +1,53 @@ + (string) $this->builder->getCustomerAuthenticationMethod() ]; } + + public function buildRequestFromJson($jsonRequest, $config) + { + // TODO: Implement buildRequestFromJson() method. + } } \ No newline at end of file diff --git a/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.php b/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.php index bc96f6c1..d3d1c4e9 100644 --- a/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.php +++ b/src/Builders/RequestBuilder/GpEcom/GpEcomAuthorizationRequestBuilder.php @@ -13,6 +13,7 @@ use GlobalPayments\Api\Entities\Enums\TransactionModifier; use GlobalPayments\Api\Entities\Enums\TransactionType; use GlobalPayments\Api\Entities\Exceptions\BuilderException; +use GlobalPayments\Api\Entities\IRequestBuilder; use GlobalPayments\Api\Entities\Request; use GlobalPayments\Api\Mapping\EnumMapping; use GlobalPayments\Api\Mapping\GpEcomMapping; @@ -23,14 +24,14 @@ use GlobalPayments\Api\Utils\CardUtils; use GlobalPayments\Api\Utils\GenerationUtils; -class GpEcomAuthorizationRequestBuilder extends GpEcomRequestBuilder +class GpEcomAuthorizationRequestBuilder extends GpEcomRequestBuilder implements IRequestBuilder { /*** * @param AuthorizationBuilder $builder * * @return bool */ - public static function canProcess($builder) + public static function canProcess($builder = null) { if ($builder instanceof AuthorizationBuilder) { return true; @@ -44,7 +45,7 @@ public static function canProcess($builder) * @param GpEcomConfig $config * @return Request */ - public function buildRequest(BaseBuilder $builder, GpEcomConfig $config) + public function buildRequest(BaseBuilder $builder, $config) { /** @var AuthorizationBuilder $builder */ //for google payment amount and currency is required @@ -221,11 +222,12 @@ public function buildRequest(BaseBuilder $builder, GpEcomConfig $config) $cardElement->appendChild($xml->createElement("number", $card->number ?? '')); $cardElement->appendChild($xml->createElement("expdate", $card->getShortExpiry() ?? '')); $cardElement->appendChild($xml->createElement("chname", $card->cardHolderName ?? '')); - - $cardElement->appendChild($xml->createElement( - "type", - strtoupper(EnumMapping::mapCardType(GatewayProvider::GP_ECOM, CardUtils::getBaseCardType($card->getCardType()))) - )); + if (!empty($card->number)) { + $cardElement->appendChild($xml->createElement( + "type", + strtoupper(EnumMapping::mapCardType(GatewayProvider::GP_ECOM, CardUtils::getBaseCardType($card->getCardType()))) + )); + } if ($card->cvn !== null || isset($card->cvnPresenceIndicator)) { //if cvn number is not empty indicator should be PRESENT @@ -568,4 +570,9 @@ private function getShal1RequestValues($timestamp, $orderId, $builder, $card, $c } return $requestValues; } + + public function buildRequestFromJson($jsonRequest, $config) + { + // TODO: Implement buildRequestFromJson() method. + } } \ No newline at end of file diff --git a/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.php b/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.php index 1cefac17..7be6c66c 100644 --- a/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.php +++ b/src/Builders/RequestBuilder/GpEcom/GpEcomManagementRequestBuilder.php @@ -8,18 +8,19 @@ use GlobalPayments\Api\Entities\Enums\AlternativePaymentType; use GlobalPayments\Api\Entities\Enums\TransactionType; use GlobalPayments\Api\Entities\Exceptions\BuilderException; +use GlobalPayments\Api\Entities\IRequestBuilder; use GlobalPayments\Api\Entities\Request; use GlobalPayments\Api\Mapping\GpEcomMapping; use GlobalPayments\Api\ServiceConfigs\Gateways\GpEcomConfig; use GlobalPayments\Api\Utils\GenerationUtils; -class GpEcomManagementRequestBuilder extends GpEcomRequestBuilder +class GpEcomManagementRequestBuilder extends GpEcomRequestBuilder implements IRequestBuilder { /** * @param $builder * @return bool */ - public static function canProcess($builder) + public static function canProcess($builder = null) { if ($builder instanceof ManagementBuilder) { return true; @@ -34,7 +35,7 @@ public static function canProcess($builder) * * @return Request */ - public function buildRequest(BaseBuilder $builder, GpEcomConfig $config) + public function buildRequest(BaseBuilder $builder, $config) { /** @var ManagementBuilder $builder */ $xml = new DOMDocument(); @@ -153,4 +154,9 @@ public function buildRequest(BaseBuilder $builder, GpEcomConfig $config) return new Request('', 'POST', $xml->saveXML($request)); } + + public function buildRequestFromJson($jsonRequest, $config) + { + // TODO: Implement buildRequestFromJson() method. + } } \ No newline at end of file diff --git a/src/Builders/RequestBuilder/GpEcom/GpEcomRecurringRequestBuilder.php b/src/Builders/RequestBuilder/GpEcom/GpEcomRecurringRequestBuilder.php index a79f1d7e..a8469344 100644 --- a/src/Builders/RequestBuilder/GpEcom/GpEcomRecurringRequestBuilder.php +++ b/src/Builders/RequestBuilder/GpEcom/GpEcomRecurringRequestBuilder.php @@ -25,7 +25,7 @@ class GpEcomRecurringRequestBuilder implements IRequestBuilder * * @return bool */ - public static function canProcess($builder) + public static function canProcess($builder = null) { if ($builder instanceof RecurringBuilder) { return true; @@ -373,4 +373,9 @@ private function mapRecurringRequestType(RecurringBuilder $builder) 'The selected gateway does not support this transaction type.' ); } + + public function buildRequestFromJson($jsonRequest, $config) + { + // TODO: Implement buildRequestFromJson() method. + } } \ No newline at end of file diff --git a/src/Builders/RequestBuilder/GpEcom/GpEcomReportRequestBuilder.php b/src/Builders/RequestBuilder/GpEcom/GpEcomReportRequestBuilder.php index 617dd58c..cef5b1ec 100644 --- a/src/Builders/RequestBuilder/GpEcom/GpEcomReportRequestBuilder.php +++ b/src/Builders/RequestBuilder/GpEcom/GpEcomReportRequestBuilder.php @@ -7,13 +7,14 @@ use GlobalPayments\Api\Builders\TransactionReportBuilder; use GlobalPayments\Api\Entities\Enums\ReportType; use GlobalPayments\Api\Entities\Exceptions\UnsupportedTransactionException; +use GlobalPayments\Api\Entities\IRequestBuilder; use GlobalPayments\Api\Entities\Request; use GlobalPayments\Api\ServiceConfigs\Gateways\GpEcomConfig; use GlobalPayments\Api\Utils\GenerationUtils; -class GpEcomReportRequestBuilder +class GpEcomReportRequestBuilder implements IRequestBuilder { - public static function canProcess($builder) + public static function canProcess($builder = null) { if ($builder instanceof TransactionReportBuilder) { return true; @@ -28,7 +29,7 @@ public static function canProcess($builder) * * @return Request */ - public function buildRequest(BaseBuilder $builder, GpEcomConfig $config) + public function buildRequest(BaseBuilder $builder, $config) { $xml = new DOMDocument(); $timestamp = GenerationUtils::generateTimestamp(); @@ -70,4 +71,9 @@ private function mapReportRequestType($reportType) throw new UnsupportedTransactionException("This reporting call is not supported by your currently configured gateway."); } } + + public function buildRequestFromJson($jsonRequest, $config) + { + // TODO: Implement buildRequestFromJson() method. + } } \ No newline at end of file diff --git a/src/Builders/RequestBuilder/RequestBuilderFactory.php b/src/Builders/RequestBuilder/RequestBuilderFactory.php index f56b0baf..d2fcf046 100644 --- a/src/Builders/RequestBuilder/RequestBuilderFactory.php +++ b/src/Builders/RequestBuilder/RequestBuilderFactory.php @@ -38,7 +38,8 @@ class RequestBuilderFactory GpApiManagementRequestBuilder::class, GpApiReportRequestBuilder::class, GpApiSecureRequestBuilder::class, - GpApiPayFacRequestBuilder::class + GpApiPayFacRequestBuilder::class, + GpApiMiCRequestBuilder::class ], GatewayProvider::TRANSACTION_API => [ TransactionApiReportRequestBuilder::class, diff --git a/src/Builders/RequestBuilder/TransactionApi/TransactionApiAuthorizationRequestBuilder.php b/src/Builders/RequestBuilder/TransactionApi/TransactionApiAuthorizationRequestBuilder.php index 2609af24..2d2fcde9 100644 --- a/src/Builders/RequestBuilder/TransactionApi/TransactionApiAuthorizationRequestBuilder.php +++ b/src/Builders/RequestBuilder/TransactionApi/TransactionApiAuthorizationRequestBuilder.php @@ -22,7 +22,7 @@ class TransactionApiAuthorizationRequestBuilder implements IRequestBuilder * * @return bool */ - public static function canProcess($builder) + public static function canProcess($builder = null) { return $builder instanceof AuthorizationBuilder; } @@ -389,4 +389,9 @@ private function getPhoneNumber(AuthorizationBuilder $builder, String $type) return [StringUtils::validateToNumber($phoneNumber), StringUtils::validateToNumber($phoneCountryCode)]; } + + public function buildRequestFromJson($jsonRequest, $config) + { + // TODO: Implement buildRequestFromJson() method. + } } diff --git a/src/Builders/RequestBuilder/TransactionApi/TransactionApiManagementRequestBuilder.php b/src/Builders/RequestBuilder/TransactionApi/TransactionApiManagementRequestBuilder.php index e1166c06..780aad0b 100644 --- a/src/Builders/RequestBuilder/TransactionApi/TransactionApiManagementRequestBuilder.php +++ b/src/Builders/RequestBuilder/TransactionApi/TransactionApiManagementRequestBuilder.php @@ -5,7 +5,8 @@ use GlobalPayments\Api\Builders\{BaseBuilder, ManagementBuilder}; use GlobalPayments\Api\Entities\IRequestBuilder; use GlobalPayments\Api\Entities\TransactionApi\TransactionApiRequest; -use GlobalPayments\Api\Entities\Enums\{PaymentMethodType, TransactionType, Region}; +use GlobalPayments\Api\Mapping\EnumMapping; +use GlobalPayments\Api\Entities\Enums\{GatewayProvider, PaymentMethodType, TransactionType, Region}; use GlobalPayments\Api\Entities\Exceptions\ApiException; use GlobalPayments\Api\ServiceConfigs\Gateways\TransactionApiConfig; use GlobalPayments\Api\Utils\AmountUtils; @@ -16,7 +17,7 @@ class TransactionApiManagementRequestBuilder implements IRequestBuilder * @param $builder * @return bool */ - public static function canProcess($builder) + public static function canProcess($builder = null) { if ($builder instanceof ManagementBuilder) { return true; @@ -43,7 +44,11 @@ public function buildRequest(BaseBuilder $builder, $config) if (isset($builder->paymentMethod) && $builder->paymentMethod->paymentMethodType == PaymentMethodType::ACH) { $verb = 'POST'; $payload["check"] = [ - "account_type" => isset($builder->bankTransferDetails->accountType) ? $builder->bankTransferDetails->accountType : "0.00", + "account_type" => isset($builder->bankTransferDetails->accountType) ? + EnumMapping::mapAccountType( + GatewayProvider::TRANSACTION_API, + $builder->bankTransferDetails->accountType + ) : "0.00", "check_number" => isset($builder->bankTransferDetails->checkNumber) ? $builder->bankTransferDetails->checkNumber : null ]; $payload["payment"] = [ @@ -151,4 +156,9 @@ public function buildRequest(BaseBuilder $builder, $config) return new TransactionApiRequest($endpoint, $verb, $payload); } + + public function buildRequestFromJson($jsonRequest, $config) + { + // TODO: Implement buildRequestFromJson() method. + } } diff --git a/src/Builders/RequestBuilder/TransactionApi/TransactionApiReportRequestBuilder.php b/src/Builders/RequestBuilder/TransactionApi/TransactionApiReportRequestBuilder.php index 96481a96..898385a4 100644 --- a/src/Builders/RequestBuilder/TransactionApi/TransactionApiReportRequestBuilder.php +++ b/src/Builders/RequestBuilder/TransactionApi/TransactionApiReportRequestBuilder.php @@ -10,7 +10,7 @@ class TransactionApiReportRequestBuilder implements IRequestBuilder { - public static function canProcess($builder) + public static function canProcess($builder = null) { return $builder instanceof TransactionReportBuilder; } @@ -74,4 +74,9 @@ public function buildRequest(BaseBuilder $builder, $config) return new TransactionApiRequest($endpoint, $verb, $payload, $queryParams); } + + public function buildRequestFromJson($jsonRequest, $config) + { + // TODO: Implement buildRequestFromJson() method. + } } diff --git a/src/Builders/TransactionBuilder.php b/src/Builders/TransactionBuilder.php index dba23907..00ca88a2 100644 --- a/src/Builders/TransactionBuilder.php +++ b/src/Builders/TransactionBuilder.php @@ -5,6 +5,7 @@ use GlobalPayments\Api\Entities\Enums\TransactionModifier; use GlobalPayments\Api\Entities\Enums\TransactionType; use GlobalPayments\Api\Entities\PayLinkData; +use GlobalPayments\Api\Entities\TransactionApi\TransactionApiData; use GlobalPayments\Api\PaymentMethods\Interfaces\IPaymentMethod; abstract class TransactionBuilder extends BaseBuilder @@ -195,11 +196,11 @@ public function withPaymentLinkId($paymentLinkId) /** * Set the request transactionData * - * @param array $data Request transactionData + * @param TransactionApiData $data Request transactionData * * @return $this */ - public function withTransactionData($data) + public function withTransactionData(TransactionApiData $data) { $this->transactionData = $data; return $this; diff --git a/src/Entities/BankPaymentResponse.php b/src/Entities/BankPaymentResponse.php index c89b74e1..e838ff14 100644 --- a/src/Entities/BankPaymentResponse.php +++ b/src/Entities/BankPaymentResponse.php @@ -49,4 +49,10 @@ class BankPaymentResponse /** @var string */ public $remittanceReferenceType; + + /** @var float */ + public $amount; + + /** @var string */ + public $currency; } \ No newline at end of file diff --git a/src/Entities/EcommerceInfo.php b/src/Entities/EcommerceInfo.php index 7a438224..540d4ffa 100644 --- a/src/Entities/EcommerceInfo.php +++ b/src/Entities/EcommerceInfo.php @@ -11,30 +11,22 @@ class EcommerceInfo { /** * Identifies eCommerce vs mail order / telephone order (MOTO) transactions. - * * Default value is `EcommerceChannel.ECOM`. - * * @var EcommerceChannel */ public $channel; /** * The expected shipping month. - * * Default value is the date of one day in the future. - * - * @var integer */ - public $shipDay; + public int|string $shipDay; /** * The expected shipping month. - * * Default value is the month of one day in the future. - * - * @var integer */ - public $shipMonth; + public int|string $shipMonth; /** * Instantiates a new `EcommerceInfo` object. @@ -50,6 +42,5 @@ public function __construct() $this->shipMonth = (new \DateTime()) ->add(new \DateInterval('P1D')) ->format('m'); - $this->paymentDataType = '3DSecure'; } } diff --git a/src/Entities/Enums/BankPaymentStatus.php b/src/Entities/Enums/BankPaymentStatus.php index 54e87481..a1c3c481 100644 --- a/src/Entities/Enums/BankPaymentStatus.php +++ b/src/Entities/Enums/BankPaymentStatus.php @@ -25,4 +25,5 @@ class BankPaymentStatus extends Enum const FAILURE_DECLINED = 'FAILURE_DECLINED'; const STATUS_NOT_AVAILABLE = 'STATUS_NOT_AVAILABLE'; const PAYMENT_NOT_COMPLETED = 'PAYMENT_NOT_COMPLETED'; + const INITIATION_PROCESSING = 'INITIATION_PROCESSING'; } \ No newline at end of file diff --git a/src/Entities/Enums/Environment.php b/src/Entities/Enums/Environment.php index 29188914..6b85d335 100644 --- a/src/Entities/Enums/Environment.php +++ b/src/Entities/Enums/Environment.php @@ -8,4 +8,5 @@ class Environment extends Enum { const TEST = "TEST"; const PRODUCTION = "PRODUCTION"; + const QA = 'QA'; } diff --git a/src/Entities/Enums/ServiceEndpoints.php b/src/Entities/Enums/ServiceEndpoints.php index 1d55f681..7a5c3bd8 100644 --- a/src/Entities/Enums/ServiceEndpoints.php +++ b/src/Entities/Enums/ServiceEndpoints.php @@ -26,6 +26,7 @@ class ServiceEndpoints extends Enum const PROPAY_PRODUCTION_CANADIAN = "https://www.propaycanada.ca/API/PropayAPI.aspx"; const GP_API_TEST = "https://apis.sandbox.globalpay.com/ucp"; const GP_API_PRODUCTION = "https://apis.globalpay.com/ucp"; + const GP_API_QA = "https://apis-uat.globalpay.com/ucp"; const OPEN_BANKING_TEST = 'https://api.sandbox.globalpay-ecommerce.com/openbanking'; const OPEN_BANKING_PRODUCTION = 'https://api.globalpay-ecommerce.com/openbanking'; const TRANSACTION_API_TEST = "https://api.pit.paygateway.com/transactions/"; diff --git a/src/Entities/GpApi/GpApiRequest.php b/src/Entities/GpApi/GpApiRequest.php index 42623076..4eb86f2e 100644 --- a/src/Entities/GpApi/GpApiRequest.php +++ b/src/Entities/GpApi/GpApiRequest.php @@ -23,4 +23,5 @@ class GpApiRequest extends Request const RISK_ASSESSMENTS = '/risk-assessments'; const ACCOUNTS_ENDPOINT = '/accounts'; const TRANSFER_ENDPOINT = '/transfers'; + const DEVICE_ENDPOINT = '/devices'; } \ No newline at end of file diff --git a/src/Entities/IRequestBuilder.php b/src/Entities/IRequestBuilder.php index f0c242cb..4a371fa5 100644 --- a/src/Entities/IRequestBuilder.php +++ b/src/Entities/IRequestBuilder.php @@ -1,6 +1,5 @@ transactionReference->clientTransactionId; } return null; - case 'checkRefundId': - if ($this->transactionReference !== null) { - return $this->transactionReference->checkRefundId; - } - return null; - case 'checkSaleId': - if ($this->transactionReference !== null) { - return $this->transactionReference->checkSaleId; - } - return null; case 'orderId': if ($this->transactionReference !== null) { return $this->transactionReference->orderId; @@ -628,8 +616,6 @@ public function __isset($name) 'authorizationId', 'paymentMethodType', 'clientTransactionId', - 'checkRefundId', - 'checkSaleId', 'alternativePaymentResponse', 'bnplResponse', 'transfersFundsAccount' @@ -651,18 +637,6 @@ public function __set($name, $value) } $this->transactionReference->clientTransactionId = $value; return; - case 'checkRefundId': - if (!$this->transactionReference instanceof TransactionReference) { - $this->transactionReference = new TransactionReference(); - } - $this->transactionReference->checkRefundId = $value; - return; - case 'checkSaleId': - if (!$this->transactionReference instanceof TransactionReference) { - $this->transactionReference = new TransactionReference(); - } - $this->transactionReference->checkSaleId = $value; - return; case 'orderId': if (!$this->transactionReference instanceof TransactionReference) { $this->transactionReference = new TransactionReference(); diff --git a/src/Entities/TransactionApi/TransactionApiData.php b/src/Entities/TransactionApi/TransactionApiData.php index e76484b2..1254f632 100644 --- a/src/Entities/TransactionApi/TransactionApiData.php +++ b/src/Entities/TransactionApi/TransactionApiData.php @@ -14,6 +14,7 @@ class TransactionApiData public $softDescriptor; public $region; public $paymentPurposeCode; + public $language; /** * @var bool diff --git a/src/Entities/TransactionApi/TransactionApiRequest.php b/src/Entities/TransactionApi/TransactionApiRequest.php index f82f016e..6942412a 100644 --- a/src/Entities/TransactionApi/TransactionApiRequest.php +++ b/src/Entities/TransactionApi/TransactionApiRequest.php @@ -2,7 +2,9 @@ namespace GlobalPayments\Api\Entities\TransactionApi; -class TransactionApiRequest +use GlobalPayments\Api\Entities\Request; + +class TransactionApiRequest extends Request { const CREDITSALE = 'creditsales'; const CREDITSALEREF = 'creditsales/reference_id'; @@ -14,18 +16,4 @@ class TransactionApiRequest const CHECKSALESREF = 'checksales/reference_id'; const CREDITREFUND = 'creditreturns'; const CREDITREFUNDREF = 'creditreturns/reference_id'; - - public $endpoint; - public $requestBody; - public $queryParams; - public $httpVerb; - public $resultsField; - - public function __construct($endpoint, $httpVerb, $requestBody = '', $queryParams = null) - { - $this->endpoint = $endpoint; - $this->httpVerb = $httpVerb; - $this->requestBody = $requestBody; - $this->queryParams = $queryParams; - } } diff --git a/src/Gateways/GeniusConnector.php b/src/Gateways/GeniusConnector.php index ad954eb1..6b900b34 100644 --- a/src/Gateways/GeniusConnector.php +++ b/src/Gateways/GeniusConnector.php @@ -74,10 +74,10 @@ public function processAuthorization(AuthorizationBuilder $builder) if ($paymentMethod->paymentMethodType === PaymentMethodType::GIFT && !empty($builder->currency)) { $request->appendChild($xml->createElement('AmountType', $builder->currency)); } - $request->appendChild($xml->createElement('Amount', $builder->amount)); - $request->appendChild($xml->createElement('CashbackAmount', $builder->cashBackAmount)); - $request->appendChild($xml->createElement('SurchargeAmount', $builder->convenienceAmount)); - $request->appendChild($xml->createElement('AuthorizationCode', $builder->offlineAuthCode)); + $request->appendChild($xml->createElement('Amount', $builder->amount ?? '')); + $request->appendChild($xml->createElement('CashbackAmount', $builder->cashBackAmount ?? '')); + $request->appendChild($xml->createElement('SurchargeAmount', $builder->convenienceAmount?? '')); + $request->appendChild($xml->createElement('AuthorizationCode', $builder->offlineAuthCode ?? '')); if ($builder->autoSubstantiation != null) { $healthcare = $xml->createElement('HealthCareAmountDetails'); @@ -93,13 +93,13 @@ public function processAuthorization(AuthorizationBuilder $builder) $request->appendChild($healthcare); } - $request->appendChild($xml->createElement('InvoiceNumber', $builder->invoiceNumber)); - $request->appendChild($xml->createElement('RegisterNumber', $this->registerNumber)); - $request->appendChild($xml->createElement('MerchantTransactionId', $builder->clientTransactionId)); - $request->appendChild($xml->createElement('CardAcceptorTerminalId', $this->terminalId)); + $request->appendChild($xml->createElement('InvoiceNumber', $builder->invoiceNumber ?? '')); + $request->appendChild($xml->createElement('RegisterNumber', $this->registerNumber ?? '')); + $request->appendChild($xml->createElement('MerchantTransactionId', $builder->clientTransactionId ?? '')); + $request->appendChild($xml->createElement('CardAcceptorTerminalId', $this->terminalId ?? '')); // invoice object - $request->appendChild($xml->createElement('EnablePartialAuthorization', $builder->allowPartialAuth)); - $request->appendChild($xml->createElement('ForceDuplicate', $builder->allowDuplicates)); + $request->appendChild($xml->createElement('EnablePartialAuthorization', $builder->allowPartialAuth ?? '')); + $request->appendChild($xml->createElement('ForceDuplicate', $builder->allowDuplicates ?? '')); $transaction->appendChild($request); $response = $this->doTransaction($this->buildEnvelope($xml, $transaction), $endpoint); @@ -137,7 +137,7 @@ public function manageTransaction($builder) // Request $request = $xml->createElement('Request'); if ($transactionType !== TransactionType::REFUND) { - $request->appendChild($xml->createElement('Token', $builder->transactionId)); + $request->appendChild($xml->createElement('Token', $builder->transactionId ?? '')); } $request->appendChild($xml->createElement('Amount', $builder->amount + $builder->gratuity)); if (!empty($builder->invoiceNumber)) { @@ -369,7 +369,7 @@ private function hydratePaymentData($xml, $paymentData, $paymentMethod) $paymentData->appendChild($xml->createElement('Source', 'Keyed')); $paymentData->appendChild($xml->createElement('CardNumber', $card->number)); $paymentData->appendChild($xml->createElement('ExpirationDate', $card->getShortExpiry())); - $paymentData->appendChild($xml->createElement('CardHolder', $card->cardHolderName)); + $paymentData->appendChild($xml->createElement('CardHolder', $card->cardHolderName ?? '')); $paymentData->appendChild($xml->createElement('CardVerificationValue', $card->cvn)); } } elseif ($paymentMethod instanceof CreditTrackData) { diff --git a/src/Gateways/Gp3DSProvider.php b/src/Gateways/Gp3DSProvider.php index ebcd7349..18c5761b 100644 --- a/src/Gateways/Gp3DSProvider.php +++ b/src/Gateways/Gp3DSProvider.php @@ -137,14 +137,14 @@ public function processSecure3d(Secure3dBuilder $builder) if (empty($orderId)) { $orderId = GenerationUtils::generateOrderId(); } - + /** @var ThreeDSecure $secureEcom */ $secureEcom = $secure3d->threeDSecure; $request = $this->maybeSetKey($request, 'request_timestamp', $timestamp); $request = $this->maybeSetKey($request, 'authentication_source', $builder->getAuthenticationSource()); $request = $this->maybeSetKey($request, 'authentication_request_type', $builder->getAuthenticationRequestType()); $request = $this->maybeSetKey($request, 'message_category', $builder->getMessageCategory()); - $request = $this->maybeSetKey($request, 'message_version', '2.1.0'); + $request = $this->maybeSetKey($request, 'message_version', $secureEcom->acsEndVersion); $request = $this->maybeSetKey($request, 'server_trans_id', $secureEcom->serverTransactionId); $request = $this->maybeSetKey($request, 'merchant_id', $this->merchantId); $request = $this->maybeSetKey($request, 'account_id', $this->accountId); diff --git a/src/Gateways/GpApiConnector.php b/src/Gateways/GpApiConnector.php index 1beace07..4146fe72 100644 --- a/src/Gateways/GpApiConnector.php +++ b/src/Gateways/GpApiConnector.php @@ -3,10 +3,12 @@ namespace GlobalPayments\Api\Gateways; use GlobalPayments\Api\Builders\AuthorizationBuilder; +use GlobalPayments\Api\Builders\BaseBuilder; use GlobalPayments\Api\Builders\FraudBuilder; use GlobalPayments\Api\Builders\ManagementBuilder; use GlobalPayments\Api\Builders\PayFacBuilder; use GlobalPayments\Api\Builders\ReportBuilder; +use GlobalPayments\Api\Builders\RequestBuilder\GpApi\GpApiMiCRequestBuilder; use GlobalPayments\Api\Builders\RequestBuilder\RequestBuilderFactory; use GlobalPayments\Api\Builders\Secure3dBuilder; use GlobalPayments\Api\Entities\Enums\PaymentMethodType; @@ -27,12 +29,15 @@ use GlobalPayments\Api\Entities\Transaction; use GlobalPayments\Api\Entities\Reporting\TransactionSummary; use GlobalPayments\Api\Entities\User; +use GlobalPayments\Api\Gateways\Interfaces\IDeviceCloudService; use GlobalPayments\Api\PaymentMethods\TransactionReference; use GlobalPayments\Api\ServiceConfigs\Gateways\GpApiConfig; use GlobalPayments\Api\Mapping\GpApiMapping; use GlobalPayments\Api\PaymentMethods\AlternativePaymentMethod; +use GlobalPayments\Api\Terminals\Abstractions\IDeviceMessage; +use GlobalPayments\Api\Utils\GenerationUtils; -class GpApiConnector extends RestGateway implements IPaymentGateway, ISecure3dProvider, IPayFacProvider, IFraudCheckService +class GpApiConnector extends RestGateway implements IPaymentGateway, ISecure3dProvider, IPayFacProvider, IFraudCheckService, IDeviceCloudService { const GP_API_VERSION = '2021-03-22'; const IDEMPOTENCY_HEADER = 'x-gp-idempotency'; @@ -186,7 +191,29 @@ public function processFraud(FraudBuilder $builder) : RiskAssessment return GpApiMapping::mapRiskAssessmentResponse($response); } - private function executeProcess($builder) + public function processPassThrough($jsonRequest) + { + if (empty($this->accessToken)) { + $this->signIn(); + } + $requestBuilder = new GpApiMiCRequestBuilder(); + $request = $requestBuilder->buildRequestFromJson($jsonRequest, $this->gpApiConfig); + if (empty($request)) { + throw new GatewayException("Request was not generated!"); + } + $request->endpoint = $this->getMerchantUrl($request) . $request->endpoint; + $idempotencyKey = !empty($builder->idempotencyKey) ? $builder->idempotencyKey : null; + + return $this->doTransaction( + $request->httpVerb, + $request->endpoint, + $request->requestBody, + $request->queryParams, + $idempotencyKey + ); + } + + private function executeProcess(BaseBuilder $builder) { $processFactory = new RequestBuilderFactory(); /** @@ -200,12 +227,7 @@ private function executeProcess($builder) * @var GpApiRequest $request */ $request = $requestBuilder->buildRequest($builder, $this->gpApiConfig); - $merchantUrl = ( - !empty($this->gpApiConfig->merchantId) && - strpos($request->endpoint, GpApiRequest::MERCHANT_MANAGEMENT_ENDPOINT) === false) ? - GpApiRequest::MERCHANT_MANAGEMENT_ENDPOINT . '/' . $this->gpApiConfig->merchantId : ''; - - $request->endpoint = $merchantUrl . $request->endpoint; + $request->endpoint = $this->getMerchantUrl($request) . $request->endpoint; if (empty($request)) { throw new ApiException("Request was not generated!"); @@ -318,6 +340,7 @@ public function signIn() empty($accessTokenInfo->tokenizationAccountName) ) { $accessTokenInfo->tokenizationAccountID = $response->getTokenizationAccountID(); + $accessTokenInfo->tokenizationAccountName = $response->getTokenizationAccountName(); } if ( @@ -325,6 +348,7 @@ public function signIn() empty($accessTokenInfo->transactionProcessingAccountName) ) { $accessTokenInfo->transactionProcessingAccountID = $response->getTransactionProcessingAccountID(); + $accessTokenInfo->transactionProcessingAccountName = $response->getTransactionProcessingAccountName(); } if ( empty($accessTokenInfo->disputeManagementAccountID) && @@ -372,4 +396,12 @@ public function getAccessToken() return new GpApiTokenResponse($response); } + + private function getMerchantUrl(GpApiRequest $request) + { + return ( + !empty($this->gpApiConfig->merchantId) && + strpos($request->endpoint, GpApiRequest::MERCHANT_MANAGEMENT_ENDPOINT) === false) ? + GpApiRequest::MERCHANT_MANAGEMENT_ENDPOINT . '/' . $this->gpApiConfig->merchantId : ''; + } } diff --git a/src/Gateways/IOpenBankingProvider.php b/src/Gateways/IOpenBankingProvider.php index 1797bf89..cf9f1512 100644 --- a/src/Gateways/IOpenBankingProvider.php +++ b/src/Gateways/IOpenBankingProvider.php @@ -3,8 +3,11 @@ namespace GlobalPayments\Api\Gateways; use GlobalPayments\Api\Builders\AuthorizationBuilder; +use GlobalPayments\Api\Builders\ManagementBuilder; interface IOpenBankingProvider { public function processOpenBanking(AuthorizationBuilder $builder); + + public function manageOpenBanking(ManagementBuilder $builder); } \ No newline at end of file diff --git a/src/Gateways/Interfaces/IDeviceCloudService.php b/src/Gateways/Interfaces/IDeviceCloudService.php new file mode 100644 index 00000000..75f009c4 --- /dev/null +++ b/src/Gateways/Interfaces/IDeviceCloudService.php @@ -0,0 +1,8 @@ +reportType); } + public function manageOpenBanking(ManagementBuilder $builder) + { + $httpVerb = $endpoint = $payload = null; + $amount = ($builder->amount !== null) ? preg_replace('/[^0-9]/', '', sprintf('%01.2f', $builder->amount)) : null; + $timestamp = (new \DateTime())->format("YmdHis"); + switch ($builder->transactionType) { + case TransactionType::REFUND: + $httpVerb = 'POST'; + $endpoint = '/refunds'; + $hash = implode('.', [ + $this->merchantId, + $this->accountId, + $timestamp, + $builder->transactionId, + $builder->clientTransactionId, + $amount + ]); + $this->setAuthorizationHeader($hash); + $payload = [ + 'request_timestamp' => $timestamp, + 'merchant_id' => $this->merchantId, + 'account_id' => $this->accountId, + 'order' => [ + 'id' => $builder->transactionId, + 'ob_trans_id' => $builder->clientTransactionId, + 'amount' => $amount, + 'description' => $builder->description + ] + ]; + break; + default: + break; + } + + $payload = ArrayUtils::array_remove_empty($payload); + $payload = json_encode($payload, JSON_UNESCAPED_SLASHES); + try { + $response = parent::doTransaction($httpVerb, $endpoint, $payload); + } catch (GatewayException $gatewayException) { + throw $gatewayException; + } + + return OpenBankingMapping::mapResponse($response); + } + + private function setAuthorizationHeader($hash) { $hash = hash($this->shaHashType, $hash) . '.' . $this->sharedSecret; diff --git a/src/Gateways/PayPlanConnector.php b/src/Gateways/PayPlanConnector.php index fca8e28c..37e3a6aa 100644 --- a/src/Gateways/PayPlanConnector.php +++ b/src/Gateways/PayPlanConnector.php @@ -112,7 +112,7 @@ public function __set($name, $value) switch ($name) { case 'secretApiKey': $this->apiKey = $value; - $auth = sprintf('Basic %s', base64_encode($value)); + $auth = sprintf('Basic %s', base64_encode((string) $value)); $this->headers['Authorization'] = $auth; return; case 'developerId': diff --git a/src/Gateways/PorticoConnector.php b/src/Gateways/PorticoConnector.php index 98d8518b..257509c3 100644 --- a/src/Gateways/PorticoConnector.php +++ b/src/Gateways/PorticoConnector.php @@ -134,6 +134,9 @@ class PorticoConnector extends XmlGateway implements IPaymentGateway */ public $clientTransactionId; + /** @var string */ + public $uniqueDeviceId; + /** * Indicates the version of this SDK used to send a gateway request. * @@ -571,7 +574,7 @@ public function processAuthorization(AuthorizationBuilder $builder) } } - $autoSubstantiationNode->appendChild($xml->createElement("MerchantVerificationValue", $builder->autoSubstantiation->merchantVerificationValue)); + $autoSubstantiationNode->appendChild($xml->createElement("MerchantVerificationValue", $builder->autoSubstantiation->merchantVerificationValue ?? '')); $autoSubstantiationNode->appendChild($xml->createElement("RealTimeSubstantiation", $builder->autoSubstantiation->realTimeSubstantiation ? "Y" : "N")); if ($hasAdditionalAmount) { // Portico Gateway requires at least one healthcare amount subtotal @@ -932,7 +935,7 @@ public function processReport(ReportBuilder $builder) $xml = new DOMDocument('1.0', 'utf-8'); $transaction = $xml->createElement($this->mapReportType($builder)); - $transaction->appendChild($xml->createElement('TzConversion', $builder->timeZoneConversion)); + $transaction->appendChild($xml->createElement('TzConversion', $builder->timeZoneConversion ?? '')); if ($builder instanceof TransactionReportBuilder) { /* if ($builder->deviceId !== null) { @@ -1469,7 +1472,7 @@ protected function hydrateTransactionSummary($item) } if (isset($item) && isset($item->AuthAmt)) { - $summary->authorizatedAmount = (string)$item->AuthAmt; + $summary->authorizedAmount = (string)$item->AuthAmt; } if (isset($item) && isset($item->AuthCode)) { @@ -1659,7 +1662,7 @@ protected function hydrateTransactionSummary($item) } if (isset($item) && isset($item->UserName)) { - $summary->userName = (string)$item->UserName; + $summary->username = (string)$item->UserName; } if (isset($item) && isset($item->AdditionalTxnFields)) { @@ -2065,7 +2068,7 @@ protected function hydrateHolder(DOMDocument $xml, BaseBuilder $builder, $isChec $xml->createElement($isCheck ? 'City' : 'CardHolderCity', htmlentities($builder->billingAddress->city ?? '')) ); $holder->appendChild( - $xml->createElement($isCheck ? 'State' : 'CardHolderState', $builder->billingAddress->getProvince()) + $xml->createElement($isCheck ? 'State' : 'CardHolderState', $builder->billingAddress->getProvince() ?? '') ); $holder->appendChild( $xml->createElement($isCheck ? 'Zip' : 'CardHolderZip', $address->checkZipCode($builder->billingAddress->postalCode)) diff --git a/src/Gateways/TransactionApiConnector.php b/src/Gateways/TransactionApiConnector.php index 29c16ed6..09f0c6be 100644 --- a/src/Gateways/TransactionApiConnector.php +++ b/src/Gateways/TransactionApiConnector.php @@ -142,15 +142,6 @@ public function doTransaction( $this->signIn(); } - //weird bug where if you populate the contentType header on this endpoint it throws a 502 bad gateway error - //if you don't send it the error is even weirder, you just have to send it empty - if ( - strpos($endpoint, 'settlement') !== false || - (strpos($endpoint, 'disputes') !== false && strpos($endpoint, 'challenge') == false) - ) { - $this->contentType = ''; - } - try { $response = parent::doTransaction( $verb, diff --git a/src/Mapping/EnumMapping.php b/src/Mapping/EnumMapping.php index b09109cc..af9370e2 100644 --- a/src/Mapping/EnumMapping.php +++ b/src/Mapping/EnumMapping.php @@ -25,17 +25,27 @@ class EnumMapping */ public static function mapAccountType($gateway, $accountType) { - if ($gateway === GatewayProvider::GP_API) { - switch ($accountType) { - case AccountType::SAVINGS: - return 'SAVING'; - case AccountType::CHECKING: - return 'CHECKING'; - case AccountType::CREDIT: - return 'CREDIT'; - default: - return null; - } + switch ($gateway) { + case GatewayProvider::GP_API: + switch ($accountType) { + case AccountType::SAVINGS: + return 'SAVING'; + case AccountType::CHECKING: + return 'CHECKING'; + case AccountType::CREDIT: + return 'CREDIT'; + default: + return null; + } + case GatewayProvider::TRANSACTION_API: + switch ($accountType) { + case AccountType::CHECKING: + return 'Checking'; + default: + return $accountType; + } + default: + return $accountType; } } @@ -117,7 +127,7 @@ public static function mapCardType($gateway, $value) return $value; } default: - return null; + return $value; } } diff --git a/src/Mapping/GpApiMapping.php b/src/Mapping/GpApiMapping.php index bba909b6..d38b70b0 100644 --- a/src/Mapping/GpApiMapping.php +++ b/src/Mapping/GpApiMapping.php @@ -932,7 +932,7 @@ public static function mapPayLinkSummary($response) $summary->status = $response->status ?? null; $summary->type = $response->type ?? null; $summary->usageMode = $response->usage_mode ?? null; - $summary->usageLimit = $response->usage_limit ?? null; //@TODO + $summary->usageLimit = $response->usage_limit ?? null; $summary->reference = $response->reference ?? null; $summary->name = $response->name ?? null; $summary->description = $response->description ?? null; diff --git a/src/Mapping/OpenBankingMapping.php b/src/Mapping/OpenBankingMapping.php index fce29bb9..9dfc683a 100644 --- a/src/Mapping/OpenBankingMapping.php +++ b/src/Mapping/OpenBankingMapping.php @@ -22,15 +22,18 @@ public static function mapResponse($response) return $transaction; } - $transaction->transactionId = $response->ob_trans_id; + $transaction->transactionId = $response->order->id ?? null; + $transaction->clientTransactionId = $response->ob_trans_id ?? null; $transaction->paymentMethodType = PaymentMethodType::BANK_PAYMENT; - $transaction->orderId = $response->order->id; - $transaction->responseMessage = $response->status; + $transaction->orderId = $response->order->id ?? null; + $transaction->responseMessage = $response->status ?? null; $obResponse = new BankPaymentResponse(); - $obResponse->redirectUrl = $response->redirect_url; - $obResponse->paymentStatus = $response->status; - $obResponse->id = $response->ob_trans_id; + $obResponse->redirectUrl = $response->redirect_url ?? null; + $obResponse->paymentStatus = $response->status ?? null; + $obResponse->id = $response->ob_trans_id ?? null; + $obResponse->amount = $response->order->amount ?? null; + $obResponse->currency = $response->order->currency ?? null; $transaction->bankPaymentResponse = $obResponse; return $transaction; diff --git a/src/Mapping/TransactionApiMapping.php b/src/Mapping/TransactionApiMapping.php index 26665c86..28f6d80c 100644 --- a/src/Mapping/TransactionApiMapping.php +++ b/src/Mapping/TransactionApiMapping.php @@ -2,6 +2,7 @@ namespace GlobalPayments\Api\Mapping; +use GlobalPayments\Api\Entities\Enums\PaymentMethodType; use GlobalPayments\Api\Entities\Transaction; use GlobalPayments\Api\Entities\Enums\ReportType; use GlobalPayments\Api\Entities\Exceptions\ApiException; @@ -26,10 +27,18 @@ public static function mapResponse($response) $transaction->clientTransactionId = !empty($response->creditauth_id) ? $response->creditauth_id : null; - $transaction->checkSaleId = !empty($response->checksale_id) - ? $response->checksale_id : null; - $transaction->checkRefundId = !empty($response->checkrefund_id) - ? $response->checkrefund_id : null; + + if (!empty($response->payment->type)) { + switch ($response->payment->type) { + case 'check': + $transaction->paymentMethodType = PaymentMethodType::ACH; + $transaction->transactionId = $response->checksale_id ?? + ($response->checkrefund_id ?? null); + break; + default: + break; + } + } if (!empty($response->creditsale_id)) $transaction->transactionId = $response->creditsale_id; if (!empty($response->creditreturn_id)) diff --git a/src/ServiceConfigs/Configuration.php b/src/ServiceConfigs/Configuration.php index 7bfe12fd..4c73db4d 100644 --- a/src/ServiceConfigs/Configuration.php +++ b/src/ServiceConfigs/Configuration.php @@ -28,19 +28,17 @@ abstract class Configuration */ public $webProxy; - abstract public function configureContainer(ConfiguredServices $services); - /** @var bool */ public $enableLogging; /** @var bool */ public $forceGatewayTimeout; - /** - * @var array - */ + /** @var array */ public $dynamicHeaders = []; + abstract public function configureContainer(ConfiguredServices $services); + public function validate() { $this->validated = true; diff --git a/src/ServiceConfigs/Gateways/GpApiConfig.php b/src/ServiceConfigs/Gateways/GpApiConfig.php index ce37bc55..4b501821 100644 --- a/src/ServiceConfigs/Gateways/GpApiConfig.php +++ b/src/ServiceConfigs/Gateways/GpApiConfig.php @@ -76,6 +76,12 @@ class GpApiConfig extends GatewayConfig /** @var string */ public $merchantId; + /** + * Property used for terminal configuration + * @var string + */ + public $deviceCurrency; + public function __construct() { $this->gatewayProvider = GatewayProvider::GP_API; @@ -85,7 +91,11 @@ public function configureContainer(ConfiguredServices $services) { if (empty($this->serviceUrl)) { $this->serviceUrl = ($this->environment == Environment::PRODUCTION) ? - ServiceEndpoints::GP_API_PRODUCTION : ServiceEndpoints::GP_API_TEST; + ServiceEndpoints::GP_API_PRODUCTION : + ( + $this->environment == Environment::QA ? + ServiceEndpoints::GP_API_QA :ServiceEndpoints::GP_API_TEST + ); } $gateway = new GpApiConnector($this); $gateway->serviceUrl = $this->serviceUrl; diff --git a/src/ServiceConfigs/Gateways/GpEcomConfig.php b/src/ServiceConfigs/Gateways/GpEcomConfig.php index d53eba62..6421e8c2 100644 --- a/src/ServiceConfigs/Gateways/GpEcomConfig.php +++ b/src/ServiceConfigs/Gateways/GpEcomConfig.php @@ -66,10 +66,11 @@ public function configureContainer(ConfiguredServices $services) $services->recurringConnector = $gateway; if (empty($this->secure3dVersion)) { - $services->secure3dVersion = Secure3dVersion::ONE; + $this->secure3dVersion = Secure3dVersion::TWO; } - if ($this->secure3dVersion == Secure3dVersion::ONE || $this->secure3dVersion == Secure3dVersion::ANY) { + if ($this->secure3dVersion == Secure3dVersion::ONE || + $this->secure3dVersion == Secure3dVersion::ANY) { $services->setSecure3dProvider(Secure3dVersion::ONE, $gateway); } diff --git a/src/ServiceConfigs/Gateways/PorticoConfig.php b/src/ServiceConfigs/Gateways/PorticoConfig.php index aa44b7d2..a352d09d 100644 --- a/src/ServiceConfigs/Gateways/PorticoConfig.php +++ b/src/ServiceConfigs/Gateways/PorticoConfig.php @@ -35,9 +35,14 @@ class PorticoConfig extends GatewayConfig public function getPayPlanEndpoint() { - if (strpos(strtolower($this->secretApiKey), 'cert') !== false || (empty($this->secretApiKey) && $this->environment = Environment::TEST)) { + if ( + !empty($this->secretApiKey) && + (strpos(strtolower($this->secretApiKey), 'cert') !== false || + (empty($this->secretApiKey) && $this->environment = Environment::TEST)) + ) { return '/Portico.PayPlan.v2/'; } + return '/PayPlan.v2/'; } diff --git a/src/Services/DeviceService.php b/src/Services/DeviceService.php index 039080fd..9de91625 100644 --- a/src/Services/DeviceService.php +++ b/src/Services/DeviceService.php @@ -20,6 +20,10 @@ class DeviceService public static function create(ConnectionConfig $config, string $configName = "default") : IDeviceInterface { ServicesContainer::configureService($config, $configName); + if (!empty($config->gatewayConfig)) { + $config->setConfigName($configName); + ServicesContainer::configureService($config->gatewayConfig, $configName); + } return ServicesContainer::instance()->getDeviceInterface($configName); } } diff --git a/src/Services/HostedService.php b/src/Services/HostedService.php index 0abbc8de..465549ec 100644 --- a/src/Services/HostedService.php +++ b/src/Services/HostedService.php @@ -8,6 +8,7 @@ use GlobalPayments\Api\Entities\Enums\ShaHashType; use GlobalPayments\Api\Entities\Enums\TransactionType; use GlobalPayments\Api\PaymentMethods\TransactionReference; +use GlobalPayments\Api\ServiceConfigs\Gateways\GpEcomConfig; use GlobalPayments\Api\ServicesContainer; use GlobalPayments\Api\Utils\GenerationUtils; use GlobalPayments\Api\Entities\Exceptions\ApiException; @@ -19,14 +20,10 @@ class HostedService /** * Shared secret to authenticate with the gateway - * - * @var string */ - public $sharedSecret; - - public $shaHashType = ShaHashType::SHA1; - - private static $supportedShaType = [ + public string $sharedSecret; + public ShaHashType|string $shaHashType = ShaHashType::SHA1; + private static array $supportedShaType = [ ShaHashType::SHA1, ShaHashType::SHA256 ]; @@ -34,11 +31,10 @@ class HostedService /** * Instatiates a new object * - * @param ServicesConfig $config Service config + * @param GpEcomConfig $config Service config * - * @return void */ - public function __construct($config) + public function __construct(GpEcomConfig $config) { if (!in_array($config->shaHashType, self::$supportedShaType)) { throw new ApiException(sprintf("%s not supported. Please check your code and the Developers Documentation.", $config->shaHashType)); @@ -52,11 +48,11 @@ public function __construct($config) * Creates an authorization builder with type * `TransactionType::CREDIT_AUTH` * - * @param string|float $amount Amount to authorize + * @param float|string|nullCardUtils $amount Amount to authorize * * @return AuthorizationBuilder */ - public function authorize($amount = null) + public function authorize(string|float $amount = null) { return (new AuthorizationBuilder(TransactionType::AUTH)) ->withAmount($amount); diff --git a/src/Services/Secure3dService.php b/src/Services/Secure3dService.php index 8f088482..ff51f93c 100644 --- a/src/Services/Secure3dService.php +++ b/src/Services/Secure3dService.php @@ -18,10 +18,16 @@ public static function checkEnrollment(IPaymentMethod $paymentMethod) ->withPaymentMethod($paymentMethod); } - /** @return Secure3dBuilder */ + /** + * @param IPaymentMethod $paymentMethod + * @param ThreeDSecure $secureEcom + * @return Secure3dBuilder + */ public static function initiateAuthentication(IPaymentMethod $paymentMethod, ThreeDSecure $secureEcom) { - $paymentMethod->threeDSecure = $secureEcom; + if ($paymentMethod instanceof ISecure3d) { + $paymentMethod->threeDSecure = $secureEcom; + } return (new Secure3dBuilder(TransactionType::INITIATE_AUTHENTICATION)) ->withPaymentMethod($paymentMethod); diff --git a/src/ServicesContainer.php b/src/ServicesContainer.php index 7b63a88b..d71753bf 100644 --- a/src/ServicesContainer.php +++ b/src/ServicesContainer.php @@ -32,8 +32,8 @@ class ServicesContainer */ public function __construct(IPaymentGateway $gateway = null, IRecurringService $recurring = null) { - $this->gateway = $gateway; - $this->recurring = $recurring; + $this->gatewayConnector = $gateway; + $this->recurringConnector = $recurring; } public static function configure(ServicesConfig $config, $configName = 'default') diff --git a/src/Terminals/Abstractions/IDeviceMessage.php b/src/Terminals/Abstractions/IDeviceMessage.php new file mode 100644 index 00000000..22a48257 --- /dev/null +++ b/src/Terminals/Abstractions/IDeviceMessage.php @@ -0,0 +1,8 @@ +ecrId = $ecrId; + return $this; + } + + public function withTerminalRefNumber(string $terminalRefNumber) + { + $this->terminalRefNumber = $terminalRefNumber; + return $this; + } + protected function setupValidations() { $this->validations->of(TransactionType::AUTH | TransactionType::SALE | TransactionType::REFUND) diff --git a/src/Terminals/Builders/TerminalBuilder.php b/src/Terminals/Builders/TerminalBuilder.php index 69e689ed..f9740720 100644 --- a/src/Terminals/Builders/TerminalBuilder.php +++ b/src/Terminals/Builders/TerminalBuilder.php @@ -45,6 +45,9 @@ abstract class TerminalBuilder extends TransactionBuilder */ public $cardBrandTransId; + /** @var int */ + public $ecrId; + public function __construct($type, $paymentMethodType) { $this->paymentMethodType = $paymentMethodType; diff --git a/src/Terminals/ConnectionConfig.php b/src/Terminals/ConnectionConfig.php index 88267f7e..c2fbfd06 100644 --- a/src/Terminals/ConnectionConfig.php +++ b/src/Terminals/ConnectionConfig.php @@ -5,6 +5,9 @@ use GlobalPayments\Api\ConfiguredServices; use GlobalPayments\Api\Entities\Exceptions\ConfigurationException; use GlobalPayments\Api\ServiceConfigs\Configuration; +use GlobalPayments\Api\ServiceConfigs\Gateways\GatewayConfig; +use GlobalPayments\Api\ServiceConfigs\Gateways\GpApiConfig; +use GlobalPayments\Api\Terminals\Abstractions\ITerminalConfiguration; use GlobalPayments\Api\Terminals\Enums\BaudRate; use GlobalPayments\Api\Terminals\Enums\ConnectionModes; use GlobalPayments\Api\Terminals\Enums\DataBits; @@ -16,7 +19,7 @@ use GlobalPayments\Api\Terminals\PAX\PaxController; use GlobalPayments\Api\Terminals\UPA\UpaController; -class ConnectionConfig extends Configuration +class ConnectionConfig extends Configuration implements ITerminalConfiguration { /** @var DeviceType */ public $deviceType; @@ -55,6 +58,21 @@ class ConnectionConfig extends Configuration */ public $logManagementProvider; + /** @var GatewayConfig */ + public $gatewayConfig; + + private $configName; + + public function setConfigName(string $configName) : void + { + $this->configName = $configName; + } + + public function getConfigName() : string + { + return $this->configName; + } + public function configureContainer(ConfiguredServices $services) { switch ($this->deviceType) { @@ -87,14 +105,14 @@ public function validate() "IpAddress is required for TCP or HTTP communication modes." ); } - } - if (empty($this->port)) { - throw new ConfigurationException( - "Port is required for TCP or HTTP communication modes." - ); + if (empty($this->port)) { + throw new ConfigurationException( + "Port is required for TCP or HTTP communication modes." + ); + } } - + if ($this->deviceType == DeviceType::HPA_ISC250 && empty($this->requestIdProvider) ) { @@ -102,5 +120,116 @@ public function validate() "Request id is mandatory for this transaction. IRequestIdProvider is not implemented" ); } + + if ($this->connectionMode == ConnectionModes::MIC) { + if (empty($this->gatewayConfig)) { + throw new ConfigurationException('Gateway config is required for the Meet In the Cloud Service'); + } + } + } + + public function getConnectionMode() + { + return $this->connectionMode; + } + + public function setConnectionMode(ConnectionModes $connectionModes): void + { + // TODO: Implement setConnectionMode() method. + } + + public function getDeviceType(): DeviceType + { + // TODO: Implement getDeviceType() method. + } + + public function setDeviceType(DeviceType $deviceType): void + { + // TODO: Implement setDeviceType() method. + } + + public function getRequestIdProvider(): IRequestIdProvider + { + // TODO: Implement getRequestIdProvider() method. + } + + public function setRequestIdProvider(IRequestIdProvider $requestIdProvider): void + { + // TODO: Implement setRequestIdProvider() method. + } + + public function getIpAddress(): string + { + // TODO: Implement getIpAddress() method. + } + + public function setIpAddress(string $ipAddress): void + { + // TODO: Implement setIpAddress() method. + } + + public function getPort(): string + { + return $this->port; + } + + public function setPort(string $port): void + { + $this->port = $port; + } + + public function getBaudRate(): BaudRate + { + // TODO: Implement getBaudRate() method. + } + + public function setBaudRate(BaudRate $baudRate): void + { + // TODO: Implement setBaudRate() method. + } + + public function getParity(): Parity + { + // TODO: Implement getParity() method. + } + + public function setParity(Parity $parity): void + { + // TODO: Implement setParity() method. + } + + public function getStopBits(): StopBits + { + // TODO: Implement getStopBits() method. + } + + public function setStopBits(StopBits $stopBits): void + { + // TODO: Implement setStopBits() method. + } + + public function getDataBits(): DataBits + { + // TODO: Implement getDataBits() method. + } + + public function setDataBits(DataBits $dataBits): void + { + // TODO: Implement setDataBits() method. + } + + public function getTimeout(): int + { + // TODO: Implement getTimeout() method. + } + + public function getGatewayConfig(): GatewayConfig + { + return $this->gatewayConfig; + } + + public function setGatewayConfig(GatewayConfig $gatewayConfig): void + { + $this->gatewayConfig = $gatewayConfig; } } diff --git a/src/Terminals/DeviceController.php b/src/Terminals/DeviceController.php index a6868874..a8f51a3e 100644 --- a/src/Terminals/DeviceController.php +++ b/src/Terminals/DeviceController.php @@ -2,6 +2,8 @@ namespace GlobalPayments\Api\Terminals; +use GlobalPayments\Api\Terminals\Abstractions\IDeviceCommInterface; +use GlobalPayments\Api\Terminals\Abstractions\ITerminalConfiguration; use GlobalPayments\Api\Terminals\Builders\TerminalAuthBuilder; use GlobalPayments\Api\Terminals\Builders\TerminalManageBuilder; use GlobalPayments\Api\Terminals\Builders\TerminalReportBuilder; @@ -16,7 +18,25 @@ abstract class DeviceController /** @var IRequestIdProvider */ public $requestIdProvider; - abstract public function send($message, $requestType = null); + /** @var IDeviceCommInterface */ + public $connector; + + /** @var ITerminalConfiguration */ + public $settings; + + public function __construct(ITerminalConfiguration $settings) + { + $this->settings = $settings; + $this->connector = $this->configureConnector(); + } + + public function send(DeviceMessage $message, $requestType = null) + { + $message->awaitResponse = true; + if (!empty($this->connector)) { + return $this->connector->send($message); + } + } abstract public function processTransaction(TerminalAuthBuilder $builder) : TerminalResponse; @@ -25,4 +45,6 @@ abstract public function manageTransaction(TerminalManageBuilder $builder) : Ter abstract public function processReport(TerminalReportBuilder $builder) : TerminalResponse; abstract public function configureInterface() : IDeviceInterface; + + abstract public function configureConnector() : IDeviceCommInterface; } diff --git a/src/Terminals/DeviceInterface.php b/src/Terminals/DeviceInterface.php index ac9d21b9..e48bda4e 100644 --- a/src/Terminals/DeviceInterface.php +++ b/src/Terminals/DeviceInterface.php @@ -13,7 +13,7 @@ use GlobalPayments\Api\Terminals\Abstractions\IDeviceInterface; use GlobalPayments\Api\Tests\Integration\Gateways\Terminals\RequestIdProvider; -class DeviceInterface implements IDeviceInterface +abstract class DeviceInterface implements IDeviceInterface { /** @var DeviceController */ public $controller; diff --git a/src/Terminals/DeviceMessage.php b/src/Terminals/DeviceMessage.php new file mode 100644 index 00000000..4d5bdc58 --- /dev/null +++ b/src/Terminals/DeviceMessage.php @@ -0,0 +1,57 @@ + */ + private $buffer; + + /** @var array */ + private $jsonRequest; + + public function __construct(array $buffer) + { + $this->buffer = $buffer; + } + public function getSendBuffer(): array + { + return $this->buffer; + } + + public function setJsonRequest($jsonRequest) + { + $this->jsonRequest = $jsonRequest; + } + + public function getJsonRequest() + { + return $this->jsonRequest; + } + + public function toString() + { + return implode('',$this->buffer); + } + + public function getRequestField($key) + { + $value = null; + array_walk_recursive($this->jsonRequest, function ($item, $k) use ($key, &$value) { + if ($k === $key) { + $value = $item; + return; + } + }); + + return $value; + } +} \ No newline at end of file diff --git a/src/Terminals/Enums/ConnectionModes.php b/src/Terminals/Enums/ConnectionModes.php index 3d5dd76b..44a021ae 100644 --- a/src/Terminals/Enums/ConnectionModes.php +++ b/src/Terminals/Enums/ConnectionModes.php @@ -11,4 +11,5 @@ class ConnectionModes extends Enum const SSL_TCP = 'SSL_TCP'; const HTTP = 'HTTP'; const HTTPS = 'HTTPS'; -} + const MIC = 'MIC'; +} \ No newline at end of file diff --git a/src/Terminals/TerminalUtils.php b/src/Terminals/TerminalUtils.php index a2697b6b..cad05ab1 100644 --- a/src/Terminals/TerminalUtils.php +++ b/src/Terminals/TerminalUtils.php @@ -4,6 +4,7 @@ use GlobalPayments\Api\Terminals\Enums\ControlCodes; use GlobalPayments\Api\Terminals\Abstractions\ILogManagement; +use GlobalPayments\Api\Terminals\UPA\UpaMessageType; class TerminalUtils { @@ -122,11 +123,31 @@ public static function manageLog($logProvider, $message = '', $backTrace = false $logProvider->setLog($message, $trace); } } - - public static function buildUPAMessage($messageType, $requestId, $otherData = null) + + public static function buildUpaRequest($requestParams) : DeviceMessage + { + $buffer = array(); + // Begin Message + array_push($buffer, chr(ControlCodes::STX)); + array_push($buffer, chr(ControlCodes::LF)); + + // Add the Message + array_push($buffer, json_encode($requestParams)); + + // End the Message + array_push($buffer, chr(ControlCodes::LF)); + array_push($buffer, chr(ControlCodes::ETX)); + array_push($buffer, chr(ControlCodes::LF)); + + $deviceMessage = new DeviceMessage($buffer); + $deviceMessage->setJsonRequest($requestParams); + return $deviceMessage; + } + + public static function buildUPAMessage($messageType, $requestId, $otherData = null) : DeviceMessage { $requestMessage = [ - 'message' => 'MSG', + 'message' => UpaMessageType::MSG, 'data' => [ 'command' => $messageType, 'requestId' => $requestId, @@ -138,13 +159,19 @@ public static function buildUPAMessage($messageType, $requestId, $otherData = nu $requestMessage['data']['data'] = $otherData; } - $message = chr(ControlCodes::STX); - $message .= chr(ControlCodes::LF); - $message .= json_encode($requestMessage); - $message .= chr(ControlCodes::LF); - $message .= chr(ControlCodes::ETX); - $message .= chr(ControlCodes::LF); - - return $message; + $buffer = array(); + // Begin Message + array_push($buffer, chr(ControlCodes::STX)); + array_push($buffer, chr(ControlCodes::LF)); + + // Add the Message + array_push($buffer, json_encode($requestMessage)); + + // End the Message + array_push($buffer, chr(ControlCodes::LF)); + array_push($buffer, chr(ControlCodes::ETX)); + array_push($buffer, chr(ControlCodes::LF)); + + return new DeviceMessage($buffer); } } diff --git a/src/Terminals/UPA/Interfaces/UpaMicInterface.php b/src/Terminals/UPA/Interfaces/UpaMicInterface.php new file mode 100644 index 00000000..fbf0bdc6 --- /dev/null +++ b/src/Terminals/UPA/Interfaces/UpaMicInterface.php @@ -0,0 +1,103 @@ +config = $config; + $this->gatewayConfig = $config->getGatewayConfig(); + } + + public function connect() + { + $this->connector = ServicesContainer::instance()->getClient($this->config->getConfigName()); + } + + public function disconnect() + { + // TODO: Implement disconnect() method. + } + + /** + * @param IDeviceMessage $message + * @param null $requestType + * @return mixed + * @throws GatewayException + */ + public function send($message, $requestType = null) + { + $this->connect(); + try { + $requestData = [ + 'merchant_id' => $this->gatewayConfig->accessTokenInfo->merchantId, + 'account_id' => $this->gatewayConfig->accessTokenInfo->transactionProcessingAccountID, + 'account_name' => $this->gatewayConfig->accessTokenInfo->transactionProcessingAccountName, + 'channel' => $this->gatewayConfig->channel, + 'country' => $this->gatewayConfig->country, + 'currency' => $this->gatewayConfig->deviceCurrency, + 'reference' => $message->getRequestField('tranNo') ?? GenerationUtils::generateOrderId(), + 'request' => $message->getJsonRequest(), + 'notifications' => [ + 'status_url' => $this->gatewayConfig->methodNotificationUrl + ] + ]; + $out = $this->connector->processPassThrough($requestData); + + return $this->parseResponse($out); + } catch (\Exception $e) { + throw new GatewayException( + 'Device error: ' . $e->getMessage(), + null, + $e->getMessage() + ); + } + } + + public function parseResponse($gatewayResponse) + { + $gatewayResponse = $this->arrayCastRecursive($gatewayResponse); + $gatewayResponse['provider'] = $this->gatewayConfig->gatewayProvider; + + return $gatewayResponse; + } + + private function arrayCastRecursive($array) + { + if (is_array($array)) { + foreach ($array as $key => $value) { + if (is_array($value)) { + $array[$key] = $this->arrayCastRecursive($value); + } + if (is_object($value)) { + $array[$key] = $this->arrayCastRecursive((array)$value); + } + } + } + + if (is_object($array)) { + return $this->arrayCastRecursive((array)$array); + } + + return $array; + } + + +} \ No newline at end of file diff --git a/src/Terminals/UPA/Interfaces/UpaTcpInterface.php b/src/Terminals/UPA/Interfaces/UpaTcpInterface.php index eb8c73bb..083fa33c 100644 --- a/src/Terminals/UPA/Interfaces/UpaTcpInterface.php +++ b/src/Terminals/UPA/Interfaces/UpaTcpInterface.php @@ -6,10 +6,8 @@ use GlobalPayments\Api\Terminals\ConnectionConfig; use GlobalPayments\Api\Entities\Exceptions\GatewayException; use GlobalPayments\Api\Terminals\Enums\ControlCodes; -use GlobalPayments\Api\Terminals\Messaging\IMessageSentInterface; -use GlobalPayments\Api\Terminals\UPA\Entities\Enums\UpaMessageId; use GlobalPayments\Api\Terminals\TerminalUtils; -use GlobalPayments\Api\Terminals\Enums\ConnectionModes; +use GlobalPayments\Api\Terminals\UPA\UpaMessageType; /* * TCP interface for the device connection and parse response @@ -98,12 +96,12 @@ public function send($message, $requestType = null) TerminalUtils::manageLog( $this->deviceDetails->logManagementProvider, - "$requestType Request Message\n: $message" + "$requestType Request Message\n: {$message->toString()}" ); if ($this->tcpConnection !== null) { try { - if (false === ($bytes_written = fwrite($this->tcpConnection, $message))) { + if (false === ($bytes_written = fwrite($this->tcpConnection, $message->toString()))) { throw new GatewayException('Device error: failed to write to socket'); } else { //set time out for read and write @@ -119,7 +117,7 @@ public function send($message, $requestType = null) $etxCount++; if ($etxCount === 2) { $requestMessage = [ - 'message' => 'ACK', + 'message' => UpaMessageType::ACK, 'data' => "" ]; $ackMessage = chr(ControlCodes::STX) . chr(ControlCodes::LF); @@ -158,7 +156,7 @@ public function parseResponse($gatewayResponse) foreach ($responseList as $rawMessage) { $message = trim(preg_replace('/[\x00-\x0A\n]/', '', trim($rawMessage))); $jsonResponse = json_decode(html_entity_decode($message), 1); - if ($jsonResponse['message'] == 'MSG') { + if ($jsonResponse['message'] == UpaMessageType::MSG) { return $jsonResponse; } } diff --git a/src/Terminals/UPA/Responses/UpaDeviceResponse.php b/src/Terminals/UPA/Responses/TransactionResponse.php similarity index 73% rename from src/Terminals/UPA/Responses/UpaDeviceResponse.php rename to src/Terminals/UPA/Responses/TransactionResponse.php index d0831a6a..15afc037 100644 --- a/src/Terminals/UPA/Responses/UpaDeviceResponse.php +++ b/src/Terminals/UPA/Responses/TransactionResponse.php @@ -2,30 +2,45 @@ namespace GlobalPayments\Api\Terminals\UPA\Responses; -class UpaDeviceResponse extends UpaResponseHandler +use GlobalPayments\Api\Entities\Enums\GatewayProvider; + +class TransactionResponse extends UpaResponseHandler { - public function __construct($jsonResponse, $messageId) + public function __construct($jsonResponse) { $this->parseResponse($jsonResponse); } public function parseResponse($jsonResponse) { - if (!empty($jsonResponse['data']['cmdResult'])) { - $this->checkResponse($jsonResponse['data']['cmdResult']); - - if ($jsonResponse['data']['cmdResult']['result'] === 'Success') { + if ($this->isGpApiResponse($jsonResponse)) { + if ( + !empty($jsonResponse['action']['result_code']) && + $jsonResponse['action']['result_code'] === 'SUCCESS' + ) { $this->deviceResponseCode = '00'; } - } - - if (!empty($jsonResponse['data']['data'])) { - $responseMapping = $this->getResponseMapping(); - foreach ($jsonResponse['data']['data'] as $responseData) { - if (is_array($responseData)) { - foreach ($responseData as $key => $value) { - $propertyName = !empty($responseMapping[$key]) ? $responseMapping[$key] : $key; - $this->{$propertyName} = $value; + + $this->status = $jsonResponse['status'] ?? null; + $this->transactionId = $jsonResponse['id'] ?? null; + $this->deviceResponseText = $jsonResponse['status'] ?? null; + } else { + if (!empty($jsonResponse['data']['cmdResult'])) { + $this->checkResponse($jsonResponse['data']['cmdResult']); + + if ($jsonResponse['data']['cmdResult']['result'] === 'Success') { + $this->deviceResponseCode = '00'; + } + } + + if (!empty($jsonResponse['data']['data'])) { + $responseMapping = $this->getResponseMapping(); + foreach ($jsonResponse['data']['data'] as $responseData) { + if (is_array($responseData)) { + foreach ($responseData as $key => $value) { + $propertyName = !empty($responseMapping[$key]) ? $responseMapping[$key] : $key; + $this->{$propertyName} = $value; + } } } } @@ -43,6 +58,7 @@ public function getResponseMapping() return array( //host 'responseId' => 'responseId', + 'transactionId' => 'responseId', 'tranNo' => 'terminalRefNumber', 'respDateTime' => 'responseDateTime', 'gatewayResponseCode' => 'gatewayResponseCode', @@ -133,4 +149,9 @@ public function getResponseMapping() 'availableBalance' => 'availableBalance' ); } + + private function isGpApiResponse($jsonResponse) + { + return !empty($jsonResponse['provider']) && $jsonResponse['provider'] === GatewayProvider::GP_API; + } } diff --git a/src/Terminals/UPA/UpaController.php b/src/Terminals/UPA/UpaController.php index b0965651..c0e04d75 100644 --- a/src/Terminals/UPA/UpaController.php +++ b/src/Terminals/UPA/UpaController.php @@ -3,14 +3,20 @@ namespace GlobalPayments\Api\Terminals\UPA; use GlobalPayments\Api\Entities\Exceptions\ConfigurationException; +use GlobalPayments\Api\Entities\Exceptions\NotImplementedException; +use GlobalPayments\Api\Terminals\Abstractions\IDeviceCommInterface; +use GlobalPayments\Api\Terminals\Abstractions\IDeviceMessage; use GlobalPayments\Api\Terminals\Builders\TerminalAuthBuilder; use GlobalPayments\Api\Terminals\Builders\TerminalManageBuilder; use GlobalPayments\Api\Terminals\Builders\TerminalReportBuilder; use GlobalPayments\Api\Terminals\DeviceController; use GlobalPayments\Api\Terminals\ConnectionConfig; +use GlobalPayments\Api\Terminals\DeviceMessage; use GlobalPayments\Api\Terminals\Enums\ConnectionModes; use GlobalPayments\Api\Terminals\Abstractions\IDeviceInterface; +use GlobalPayments\Api\Terminals\UPA\Interfaces\UpaMicInterface; use GlobalPayments\Api\Terminals\UPA\Interfaces\UpaTcpInterface; +use GlobalPayments\Api\Terminals\UPA\Responses\UpaMitcResponse; use GlobalPayments\Api\Terminals\UPA\Responses\UpaTransactionResponse; use GlobalPayments\Api\Terminals\UPA\SubGroups\RequestParamFields; use GlobalPayments\Api\Terminals\TerminalUtils; @@ -18,7 +24,7 @@ use GlobalPayments\Api\Entities\Exceptions\UnsupportedTransactionException; use GlobalPayments\Api\Terminals\UPA\Entities\Enums\UpaMessageId; use GlobalPayments\Api\Terminals\UPA\SubGroups\RequestTransactionFields; -use GlobalPayments\Api\Terminals\UPA\Responses\UpaDeviceResponse; +use GlobalPayments\Api\Terminals\UPA\Responses\TransactionResponse; use GlobalPayments\Api\Terminals\TerminalResponse; /* @@ -38,6 +44,7 @@ class UpaController extends DeviceController */ public function __construct(ConnectionConfig $config) { + parent::__construct($config); $this->device = new UpaInterface($this); $this->requestIdProvider = $config->requestIdProvider; $this->deviceConfig = $config; @@ -47,6 +54,9 @@ public function __construct(ConnectionConfig $config) case ConnectionModes::SSL_TCP: $this->deviceInterface = new UpaTcpInterface($config); break; + case ConnectionModes::MIC: + $this->deviceInterface = new UpaMicInterface($config); + break; default: throw new ConfigurationException('Unsupported connection mode.'); } @@ -62,20 +72,21 @@ public function configureInterface() : IDeviceInterface return $this->device; } - /* - * Send control message to device - * - * @param string $message control message to device - * - * @return UpaResponse parsed device response - */ - public function send($message, $requestType = null) + public function manageTransaction(TerminalManageBuilder $builder) : TerminalResponse { - //send message to gateway - return $this->deviceInterface->send($message, $requestType); + $request = $this->buildManageTransaction($builder); + + return $this->doTransaction($request); } - public function manageTransaction(TerminalManageBuilder $builder) : TerminalResponse + public function processTransaction(TerminalAuthBuilder $builder) : TerminalResponse + { + $request = $this->buildProcessTransaction($builder); + + return $this->doTransaction($request); + } + + private function buildManageTransaction(TerminalManageBuilder $builder) : IDeviceMessage { $requestId = (!empty($builder->requestId)) ? $builder->requestId : @@ -84,16 +95,27 @@ public function manageTransaction(TerminalManageBuilder $builder) : TerminalResp $requestTransactionFields = new RequestTransactionFields(); $requestTransactionFields->setParams($builder); - $transactionType = $this->mapTransactionType($builder->transactionType); - return $this->doTransaction( - $transactionType, - $requestId, - null, - $requestTransactionFields - ); + $requestType = $this->mapTransactionType($builder->transactionType); + + if (!is_null($requestTransactionFields) && !empty($requestTransactionFields->getElementString())) { + $transactionFields = $requestTransactionFields->getElementString(); + } + + $requestMessage = [ + 'message' => UpaMessageType::MSG, + 'data' => [ + 'command' => $requestType, + 'requestId' => $requestId, + 'EcrId' => $builder->ecrId ?? 13, + 'data' => [ + 'transaction' => $transactionFields ?? null + ] + ] + ]; + return TerminalUtils::buildUpaRequest($requestMessage); } - public function processTransaction(TerminalAuthBuilder $builder) : TerminalResponse + private function buildProcessTransaction(TerminalAuthBuilder $builder) : DeviceMessage { $requestId = (!empty($builder->requestId)) ? $builder->requestId : @@ -105,17 +127,32 @@ public function processTransaction(TerminalAuthBuilder $builder) : TerminalRespo $requestTransactionFields = new RequestTransactionFields(); $requestTransactionFields->setParams($builder); - $transactionType = $this->mapTransactionType($builder->transactionType); + $requestType = $this->mapTransactionType($builder->transactionType); + + if (!is_null($requestParamFields) && !empty($requestParamFields->getElementString())) { + $data['params'] = $requestParamFields->getElementString(); + } + + if (!is_null($requestTransactionFields) && !empty($requestTransactionFields->getElementString())) { + $data['transaction'] = $requestTransactionFields->getElementString(); + } - return $this->doTransaction( - $transactionType, - $requestId, - $requestParamFields, - $requestTransactionFields - ); + $requestMessage = [ + 'message' => UpaMessageType::MSG, + 'data' => [ + 'command' => $requestType, + 'requestId' => $requestId, + 'EcrId' => $builder->ecrId ?? 13, + ] + ]; + if (!empty($data)) { + $requestMessage['data']['data'] = $data; + } + + return TerminalUtils::buildUpaRequest($requestMessage); } - private function mapTransactionType($type, $requestToken = null) + private function mapTransactionType($type) { switch ($type) { case TransactionType::SALE: @@ -142,30 +179,35 @@ private function mapTransactionType($type, $requestToken = null) ); } } - - private function doTransaction( - $requestType, - $requestId, - RequestParamFields $requestParamFields = null, - RequestTransactionFields $requestTransactionFields = null - ) { - - $data = []; - if (!is_null($requestParamFields) && !empty($requestParamFields->getElementString())) { - $data['params'] = $requestParamFields->getElementString(); - } - - if (!is_null($requestTransactionFields) && !empty($requestTransactionFields->getElementString())) { - $data['transaction'] = $requestTransactionFields->getElementString(); + private function doTransaction(IDeviceMessage $request) + { + $request->awaitResponse = true; + $response = $this->connector->send($request); + if (empty($response)) { + return null; } - $message = TerminalUtils::buildUPAMessage($requestType, $requestId, $data); - $response = $this->send($message, $requestType); - return new UpaDeviceResponse($response, $requestType); + return new TransactionResponse($response); } public function processReport(TerminalReportBuilder $builder) : TerminalResponse { return false; } + + public function configureConnector(): IDeviceCommInterface + { + switch ($this->settings->getConnectionMode()) + { + case ConnectionModes::TCP_IP: + return new UpaTcpInterface($this->settings); + case ConnectionModes::HTTP: + case ConnectionModes::SERIAL: + case ConnectionModes::SSL_TCP: + case ConnectionModes::MIC: + return new UpaMicInterface($this->settings); + default: + throw new NotImplementedException(); + } + } } diff --git a/src/Terminals/UPA/UpaInterface.php b/src/Terminals/UPA/UpaInterface.php index 9c0d1d5e..f12ecc65 100644 --- a/src/Terminals/UPA/UpaInterface.php +++ b/src/Terminals/UPA/UpaInterface.php @@ -14,10 +14,9 @@ use GlobalPayments\Api\Terminals\Builders\{ TerminalAuthBuilder, TerminalManageBuilder }; -use GlobalPayments\Api\Terminals\UPA\Builders\UpaTerminalManageBuilder; use GlobalPayments\Api\Terminals\UPA\Entities\Enums\UpaMessageId; use GlobalPayments\Api\Terminals\UPA\Responses\{ - UpaBatchReport, UpaDeviceResponse, UpaReportHandler + UpaBatchReport, TransactionResponse, UpaReportHandler }; /** @@ -46,7 +45,7 @@ public function batchClose() ); $rawResponse = $this->upaController->send($message, UpaMessageId::EOD); - return new UpaDeviceResponse($rawResponse, UpaMessageId::EOD); + return new TransactionResponse($rawResponse, UpaMessageId::EOD); } public function cancel($cancelParams = null) @@ -63,7 +62,7 @@ public function cancel($cancelParams = null) ); $rawResponse = $this->upaController->send($message, UpaMessageId::CANCEL); - return new UpaDeviceResponse($rawResponse, UpaMessageId::CANCEL); + return new TransactionResponse($rawResponse, UpaMessageId::CANCEL); } public function authorize($amount = null) : TerminalAuthBuilder @@ -74,7 +73,7 @@ public function authorize($amount = null) : TerminalAuthBuilder public function creditReversal() { - return (new UpaTerminalManageBuilder(TransactionType::REVERSAL, PaymentMethodType::CREDIT)); + return (new TerminalManageBuilder(TransactionType::REVERSAL, PaymentMethodType::CREDIT)); } public function tipAdjust($tipAmount = null) : TerminalManageBuilder @@ -119,7 +118,7 @@ public function addValue($amount = null) : TerminalAuthBuilder public function void() : TerminalManageBuilder { - return (new UpaTerminalManageBuilder(TransactionType::VOID, PaymentMethodType::CREDIT)); + return (new TerminalManageBuilder(TransactionType::VOID, PaymentMethodType::CREDIT)); } public function lineItem( @@ -137,14 +136,22 @@ public function lineItem( if (!empty($rightText)) { $data['params']['lineItemRight'] = $rightText; } - $message = TerminalUtils::buildUPAMessage( - UpaMessageId::LINEITEM, - $this->upaController->requestIdProvider->getRequestId(), - $data - ); + $requestMessage = [ + 'message' => UpaMessageType::MSG, + 'data' => [ + 'command' => UpaMessageId::LINEITEM, + 'requestId' => $requestId, + 'EcrId' => $builder->ecrId ?? 12, + 'data' => [ + 'params' => $data['params'] ?? null, + ] + ] + ]; + + $message = TerminalUtils::buildUpaRequest($requestMessage); $rawResponse = $this->upaController->send($message, UpaMessageId::LINEITEM); - return new UpaDeviceResponse($rawResponse, UpaMessageId::LINEITEM); + return new TransactionResponse($rawResponse, UpaMessageId::LINEITEM); } public function reboot() : DeviceResponse @@ -156,7 +163,7 @@ public function reboot() : DeviceResponse $rawResponse = $this->upaController->send($message); - return new UpaDeviceResponse($rawResponse, UpaMessageId::REBOOT); + return new TransactionResponse($rawResponse, UpaMessageId::REBOOT); } public function sendFile($sendFileData) diff --git a/src/Terminals/UPA/UpaMessageType.php b/src/Terminals/UPA/UpaMessageType.php new file mode 100644 index 00000000..3ee025fc --- /dev/null +++ b/src/Terminals/UPA/UpaMessageType.php @@ -0,0 +1,13 @@ +modify('-30 days')->setTime(0, 0, 0); - $endDate = (new \DateTime())->modify('-3 days')->setTime(0, 0, 0); + $endDate = (new \DateTime())->modify('-1 days')->setTime(0, 0, 0); $response = ReportingService::findStoredPaymentMethodsPaged(1, 1) ->orderBy(StoredPaymentMethodSortProperty::TIME_CREATED, SortDirection::DESC) @@ -1431,20 +1431,20 @@ public function AvsCardTests() [GpApiAvsCheckTestCards::AVS_MASTERCARD_2, "MATCHED", "NOT_CHECKED", "NOT_CHECKED", 'SUCCESS', TransactionStatus::CAPTURED, "M", "I", "I"], [GpApiAvsCheckTestCards::AVS_MASTERCARD_3, "MATCHED", "NOT_CHECKED", "NOT_CHECKED", 'SUCCESS', TransactionStatus::CAPTURED, "M", "P", "P"], [GpApiAvsCheckTestCards::AVS_MASTERCARD_4, "MATCHED", "MATCHED", "MATCHED", 'SUCCESS', TransactionStatus::CAPTURED, "M", "M", "M"], - [GpApiAvsCheckTestCards::AVS_MASTERCARD_5, "MATCHED", "MATCHED", "NOT_MATCHED", 'SUCCESS', TransactionStatus::CAPTURED, "M", "M", "N"], + [GpApiAvsCheckTestCards::AVS_MASTERCARD_5, "MATCHED", "NOT_MATCHED", "NOT_MATCHED", 'SUCCESS', TransactionStatus::CAPTURED, "M", "N", "N"], [GpApiAvsCheckTestCards::AVS_MASTERCARD_6, "MATCHED", "NOT_MATCHED", "MATCHED", 'SUCCESS', TransactionStatus::CAPTURED, "M", "N", "M"], [GpApiAvsCheckTestCards::AVS_MASTERCARD_7, "MATCHED", "NOT_MATCHED", "NOT_MATCHED", 'SUCCESS', TransactionStatus::CAPTURED, "M", "N", "N"], [GpApiAvsCheckTestCards::AVS_MASTERCARD_8, "NOT_MATCHED", "NOT_MATCHED", "MATCHED", 'SUCCESS', TransactionStatus::CAPTURED, "N", "N", "M"], [GpApiAvsCheckTestCards::AVS_MASTERCARD_9, "NOT_MATCHED", "NOT_CHECKED", "NOT_CHECKED", 'SUCCESS', TransactionStatus::CAPTURED, "N", "U", "U"], [GpApiAvsCheckTestCards::AVS_MASTERCARD_10, "NOT_MATCHED", "NOT_CHECKED", "NOT_CHECKED", 'SUCCESS', TransactionStatus::CAPTURED, "N", "I", "I"], [GpApiAvsCheckTestCards::AVS_MASTERCARD_11, "NOT_MATCHED", "NOT_CHECKED", "NOT_CHECKED", 'SUCCESS', TransactionStatus::CAPTURED, "N", "P", "P"], - [GpApiAvsCheckTestCards::AVS_MASTERCARD_12, "NOT_MATCHED", "MATCHED", "MATCHED", 'SUCCESS', TransactionStatus::CAPTURED, "N", "M", "M"], + [GpApiAvsCheckTestCards::AVS_MASTERCARD_12, "NOT_MATCHED", "NOT_CHECKED", "MATCHED", 'SUCCESS', TransactionStatus::CAPTURED, "N", "P", "M"], [GpApiAvsCheckTestCards::AVS_MASTERCARD_13, "NOT_MATCHED", "MATCHED", "NOT_MATCHED", 'SUCCESS', TransactionStatus::CAPTURED, "N", "M", "N"], [GpApiAvsCheckTestCards::AVS_MASTERCARD_14, "NOT_MATCHED", "NOT_MATCHED", "NOT_MATCHED", 'SUCCESS', TransactionStatus::CAPTURED, "N", "N", "N"], [GpApiAvsCheckTestCards::AVS_VISA_1, "NOT_CHECKED", "NOT_CHECKED", "NOT_CHECKED", 'DECLINED', TransactionStatus::DECLINED, "I", "U", "U"], [GpApiAvsCheckTestCards::AVS_VISA_2, "NOT_CHECKED", "NOT_CHECKED", "NOT_CHECKED", 'DECLINED', TransactionStatus::DECLINED, "I", "I", "I"], [GpApiAvsCheckTestCards::AVS_VISA_3, "NOT_CHECKED", "NOT_CHECKED", "NOT_CHECKED", 'DECLINED', TransactionStatus::DECLINED, "I", "P", "P"], - [GpApiAvsCheckTestCards::AVS_VISA_4, "NOT_CHECKED", "MATCHED", "MATCHED", 'DECLINED', TransactionStatus::DECLINED, "I", "M", "M"], + [GpApiAvsCheckTestCards::AVS_VISA_4, "MATCHED", "MATCHED", "MATCHED", 'DECLINED', TransactionStatus::DECLINED, "M", "M", "M"], [GpApiAvsCheckTestCards::AVS_VISA_5, "NOT_CHECKED", "MATCHED", "NOT_MATCHED", 'DECLINED', TransactionStatus::DECLINED, "I", "M", "N"], [GpApiAvsCheckTestCards::AVS_VISA_6, "NOT_CHECKED", "NOT_MATCHED", "MATCHED", 'DECLINED', TransactionStatus::DECLINED, "I", "N", "M"], [GpApiAvsCheckTestCards::AVS_VISA_7, "NOT_CHECKED", "NOT_MATCHED", "NOT_MATCHED", 'DECLINED', TransactionStatus::DECLINED, "I", "N", "N"], diff --git a/test/Integration/Gateways/GpApiConnector/GpApiDigitalWalletTest.php b/test/Integration/Gateways/GpApiConnector/GpApiDigitalWalletTest.php index 13e9e6e1..80f0b64d 100644 --- a/test/Integration/Gateways/GpApiConnector/GpApiDigitalWalletTest.php +++ b/test/Integration/Gateways/GpApiConnector/GpApiDigitalWalletTest.php @@ -29,9 +29,9 @@ public function setup(): void $this->card->cardHolderName = "James Mason"; $this->clickToPayToken = '8144735251653223601'; $this->googlePayToken = '{ - "signature": "MEQCIDoMJc0jcHAzk846Y7BT6XVN/YrwypNtShE+nF/XWMiAAiAd0nhStaWT0Fw3mWjJXPRy4J+GXhdm5WOjlgEu9DS7pQ", + "signature": "MEUCIQDfPIw2HJESkx+b0HzNK1hi0O9sTh53YI8qrakH7TDhvQIgaqjMtjK3u3z3ebO1yN5XdemDPsMb9SyxiybevScdvu4=", "protocolVersion": "ECv1", - "signedMessage": "{\"encryptedMessage\":\"c9G2ljhM/OK3IrJapYrVYCi/HUQOX9IZfPE7mSLhxe26R/fpCkXF8i0j9DhM7kttoQBa1KmzNwAP4kaIR9XQB/IZsnZ0YllS+Jo0KYmOoLfcW/OUFYzRXZGbvJZRts7PP4U/NPXDiSDQM7ACna7Nca9o5UBIrY4ZL8MLiIbdBI8BSlCdJYqw4kyXibY2C5QMG+2lzF3fn4kSsz2odC8c9BuW/2D2Rz2Lau9awUMtQUpIHI4W6VU8t1FtDWppWzPUbD0CBw88ZlBOdHTgu2OJE5bR/+NXz99Rn7h3hmqnnMu/0JNxryvZr+Ed1cmLqoVbRf+3ik5WVUsyOcQWrouH8vjOTVq208o8MbSA1wX0LK4gAWVnyRpPsUkz5KJOKvKWIzT3VlV7m9BxlVc7E4RQe7/QJO5LKVcV5cotKXdGK9YINLSyIwkLRcKR9qQ92Q4z0h4g\",\"ephemeralPublicKey\":\"BPUg4L7vjs5ucmOzR+GNmLxWp1LnEsFV/Bc6WQY6qgtyxT4HFnziN/3nkbspF0l4auZX1UjCV1scYjE910Lp2TU\\u003d\",\"tag\":\"x0md5a9GwLxoCWrxQYS4jJfPjuQv9ajrJMd5zNjbd+A\\u003d\"}" + "signedMessage": "{\"encryptedMessage\":\"Q8iPUJbx6BAIk0h36AzVv7e0GCZaNMDXGEl00VQg8zfHW8X9Qjcz0k48tQp0fxB0Q4bkcapTf1Nm3ANcHsffKCuPMZgROFwNwyvOfgylAVwskJx05OBGlxTzm3s1bn7BQNE7P0UM1q+oIO+lsRtW/tIGNsEvTOZC46QGET2hsTp8l0GylWHu2L0Gw/yYFYzuq8HB0i/xrkox89eWc0dEgYg6FNhD8t1yYitCk9949HquUeXZ9Bp1fBIqBIfiQtrz/I+4EH3fu4rDrSBzmxJaZK8p/XiMjhuYkt8nwQ7j4bX5xKUwpt1IpcU1kPmt5oPLvHIMO3+RFpivWRbwMjtMB1uOyNVVFoaWM3na94xj4IBTTvloUukOXpP/AZHa2uW2YHdlTRe9DCLEcnz2W15R5xnkOQGZNRRnrY7FvzSOAHuFPQ3xvvssENfVyI9TBdNysK4z\",\"ephemeralPublicKey\":\"BGpWSSPHmkBGiPi/jdUIRsCU5DoeJSP4MKlvvoWfM7JE8iOx5QLP3uuJdMrwAJ0q162XUyw67jb3vDiuZ7nt6C8\\u003d\",\"tag\":\"RZaAl8H0eUIQTGuK7l/aTQLoFJ+nzgcuSJnpotK3oAQ\\u003d\"}" }'; } diff --git a/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.php b/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.php index 647941cf..47382383 100644 --- a/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.php +++ b/test/Integration/Gateways/GpApiConnector/ReportingTransactionsTest.php @@ -85,7 +85,7 @@ public function testReportFindTransactionsByStartDateAndEndDate() } } - public function testReportFindTransactionsByIdX() + public function testReportFindTransactionsById() { $transactionId = 'TRN_RyWZELCUbOq12IPDowbOevTC9BZxZi_6827116a3d1b'; try { diff --git a/test/Integration/Gateways/GpEcomConnector/ApiCaseTest.php b/test/Integration/Gateways/GpEcomConnector/ApiCaseTest.php index ed5a0bd5..f4639610 100644 --- a/test/Integration/Gateways/GpEcomConnector/ApiCaseTest.php +++ b/test/Integration/Gateways/GpEcomConnector/ApiCaseTest.php @@ -3,13 +3,13 @@ namespace GlobalPayments\Api\Tests\Integration\Gateways\GpEcomConnector; use GlobalPayments\Api\Entities\FraudRuleCollection; +use GlobalPayments\Api\Entities\ThreeDSecure; use GlobalPayments\Api\PaymentMethods\CreditCardData; use GlobalPayments\Api\ServiceConfigs\Gateways\GpEcomConfig; use GlobalPayments\Api\ServicesContainer; use GlobalPayments\Api\Entities\Address; use GlobalPayments\Api\Entities\Customer; use GlobalPayments\Api\Entities\Enums\AddressType; -use GlobalPayments\Api\Entities\EcommerceInfo; use GlobalPayments\Api\Entities\Exceptions\GatewayException; use GlobalPayments\Api\Entities\Enums\ReasonCode; use GlobalPayments\Api\Entities\Transaction; @@ -137,15 +137,16 @@ public function testthreeDSecureAuth() $card->cardHolderName = 'James Mason'; // supply the details from the 3D Secure verify-signature response - $threeDSecureInfo = new EcommerceInfo(); + $threeDSecureInfo = new ThreeDSecure(); $threeDSecureInfo->cavv = "AAACBllleHchZTBWIGV4AAAAAAA="; $threeDSecureInfo->xid = "crqAeMwkEL9r4POdxpByWJ1/wYg="; $threeDSecureInfo->eci = "5"; + $card->threeDSecure = $threeDSecureInfo; + try { // create the authorization with 3D Secure information $response = $card->charge(15) - ->withEcommerceInfo($threeDSecureInfo) ->withCurrency("EUR") ->execute(); diff --git a/test/Integration/Gateways/GpEcomConnector/Certifications/SdkTest.php b/test/Integration/Gateways/GpEcomConnector/Certifications/SdkTest.php index 7812f7b2..ba747ae0 100644 --- a/test/Integration/Gateways/GpEcomConnector/Certifications/SdkTest.php +++ b/test/Integration/Gateways/GpEcomConnector/Certifications/SdkTest.php @@ -2208,7 +2208,7 @@ public function testAuth034c1() $response = $card->charge(100.01) ->withCurrency("EUR") ->withAddress($billingAddress) - ->withDescription("JAVA-Auth-034c1") + ->withDescription("PHP-Auth-034c1") ->execute(); $this->assertNotNull($response); $this->assertEquals("00", $response->responseCode); @@ -18063,7 +18063,7 @@ public function testverifyenrolled024a() $card->expMonth = 12; $card->expYear = TestCards::validCardExpYear(); $card->cvn = "123"; - $card->CvnPresenceIndicator = CvnPresenceIndicator::PRESENT; + $card->cvnPresenceIndicator = CvnPresenceIndicator::PRESENT; // request $response = $card->verify() diff --git a/test/Integration/Gateways/GpEcomConnector/CreditTest.php b/test/Integration/Gateways/GpEcomConnector/CreditTest.php index 8ce2b21e..03cfb4ff 100644 --- a/test/Integration/Gateways/GpEcomConnector/CreditTest.php +++ b/test/Integration/Gateways/GpEcomConnector/CreditTest.php @@ -17,7 +17,7 @@ class CreditTest extends TestCase { - protected $card; + protected CreditCardData $card; public function setup() : void { diff --git a/test/Integration/Gateways/GpEcomConnector/HppTestCase.php b/test/Integration/Gateways/GpEcomConnector/HppTestCase.php index 336b723a..41f122b4 100644 --- a/test/Integration/Gateways/GpEcomConnector/HppTestCase.php +++ b/test/Integration/Gateways/GpEcomConnector/HppTestCase.php @@ -11,12 +11,8 @@ class HppTestCase extends TestCase { - - /** @var HostedService */ - protected $service; - - /** @var GpEcomHppClient */ - protected $client; + protected HostedService $service; + protected GpEcomHppClient $client; protected function config() { diff --git a/test/Integration/Gateways/GpEcomConnector/OpenBankingTest.php b/test/Integration/Gateways/GpEcomConnector/OpenBankingTest.php index cc2df8b3..1abb0a9b 100644 --- a/test/Integration/Gateways/GpEcomConnector/OpenBankingTest.php +++ b/test/Integration/Gateways/GpEcomConnector/OpenBankingTest.php @@ -1,10 +1,8 @@ getConfig(); ServicesContainer::configureService($config); } - protected function getConfig() + protected function getConfig(): GpEcomConfig { $config = new GpEcomConfig(); $config->merchantId = 'openbankingsandbox'; $config->sharedSecret = 'sharedsecret'; - $config->accountId = 'internet'; + $config->accountId = 'internet3'; + $config->requestLogger = new SampleRequestLogger(new Logger("logs")); $config->shaHashType = ShaHashType::SHA512; @@ -45,13 +44,14 @@ public function testFasterPaymentsCharge() $trn = $bankPayment->charge($this->amount) ->withCurrency($this->currency) - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); $this->assertOpenBankingResponse($trn); fwrite(STDERR, print_r($trn->bankPaymentResponse->redirectUrl, true)); - sleep(2); + sleep(45); + $response = ReportingService::bankPaymentDetail($trn->bankPaymentResponse->id) ->execute(); @@ -62,6 +62,53 @@ public function testFasterPaymentsCharge() $this->assertNull($response->result[0]->bankPaymentResponse->sortCode); $this->assertNull($response->result[0]->bankPaymentResponse->accountNumber); $this->assertNull($response->result[0]->bankPaymentResponse->accountName); + $this->assertNotNull($response->result[0]->bankPaymentResponse->tokenRequestId); + $this->assertNotNull($response->result[0]->orderId); + $this->assertNotNull($response->result[0]->bankPaymentResponse->id); + $this->assertEquals(BankPaymentType::FASTERPAYMENTS, $response->result[0]->bankPaymentResponse->type); + $this->assertEquals(BankPaymentStatus::SUCCESS, $response->result[0]->bankPaymentResponse->paymentStatus); + } + + public function testFasterPaymentsRefund() + { + $bankPayment = $this->fasterPaymentsConfig(); + + $trn = $bankPayment->charge($this->amount) + ->withCurrency($this->currency) + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) + ->execute(); + + $this->assertOpenBankingResponse($trn); + + fwrite(STDERR, print_r($trn->bankPaymentResponse->redirectUrl, true)); + sleep(45); + + $refund = $trn->refund($this->amount) + ->withCurrency($this->currency) + ->execute(); + + print_r($refund); + + $this->assertEquals(BankPaymentStatus::INITIATION_PROCESSING, $refund->responseMessage); + $this->assertNotNull($refund->transactionId); + $this->assertNotNull($refund->clientTransactionId); + $this->assertNull($refund->bankPaymentResponse->redirectUrl); + + $response = ReportingService::bankPaymentDetail($trn->bankPaymentResponse->id) + ->execute(); + + $this->assertNotNull($response); + $this->assertEquals(1, $response->totalRecordCount); + $this->assertEquals($trn->bankPaymentResponse->id, $response->result[0]->transactionId); + $this->assertNull($response->result[0]->bankPaymentResponse->iban); + $this->assertNull($response->result[0]->bankPaymentResponse->sortCode); + $this->assertNull($response->result[0]->bankPaymentResponse->accountNumber); + $this->assertNull($response->result[0]->bankPaymentResponse->accountName); + $this->assertNotNull($response->result[0]->bankPaymentResponse->tokenRequestId); + $this->assertNotNull($response->result[0]->orderId); + $this->assertNotNull($response->result[0]->bankPaymentResponse->id); + $this->assertEquals(BankPaymentType::FASTERPAYMENTS, $response->result[0]->bankPaymentResponse->type); + $this->assertEquals(BankPaymentStatus::SUCCESS, $response->result[0]->bankPaymentResponse->paymentStatus); } public function testSEPACharge() @@ -70,13 +117,56 @@ public function testSEPACharge() $trn = $bankPayment->charge($this->amount) ->withCurrency('EUR') - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) + ->execute(); + + $this->assertOpenBankingResponse($trn); + + fwrite(STDERR, print_r($trn->bankPaymentResponse->redirectUrl, TRUE)); + sleep(45); + + $response = ReportingService::bankPaymentDetail($trn->bankPaymentResponse->id) + ->execute(); + + $this->assertNotNull($response); + $this->assertEquals(1, $response->totalRecordCount); + $this->assertEquals($trn->bankPaymentResponse->id, $response->result[0]->transactionId); + $this->assertNull($response->result[0]->bankPaymentResponse->iban); + $this->assertNull($response->result[0]->bankPaymentResponse->sortCode); + $this->assertNull($response->result[0]->bankPaymentResponse->accountNumber); + $this->assertNull($response->result[0]->bankPaymentResponse->accountName); + $this->assertNotNull($response->result[0]->bankPaymentResponse->tokenRequestId); + $this->assertNotNull($response->result[0]->orderId); + $this->assertNotNull($response->result[0]->bankPaymentResponse->id); + $this->assertEquals(BankPaymentType::SEPA, $response->result[0]->bankPaymentResponse->type); + $this->assertEquals(BankPaymentStatus::SUCCESS, $response->result[0]->bankPaymentResponse->paymentStatus); + } + + public function testSEPARefund() + { + $bankPayment = $this->sepaConfig(); + + $trn = $bankPayment->charge($this->amount) + ->withCurrency('EUR') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); $this->assertOpenBankingResponse($trn); -// fwrite(STDERR, print_r($trn->bankPaymentResponse->redirectUrl, TRUE)); - sleep(2); + fwrite(STDERR, print_r($trn->bankPaymentResponse->redirectUrl, TRUE)); + sleep(45); + + $refund = $trn->refund($this->amount) + ->withCurrency('EUR') + ->execute(); + + $this->assertEquals(BankPaymentStatus::INITIATION_PROCESSING, $refund->responseMessage); + $this->assertNotNull($refund->transactionId); + $this->assertNotNull($refund->clientTransactionId); + $this->assertNull($refund->bankPaymentResponse->redirectUrl); + + print_r($refund); + $response = ReportingService::bankPaymentDetail($trn->bankPaymentResponse->id) ->execute(); @@ -87,6 +177,11 @@ public function testSEPACharge() $this->assertNull($response->result[0]->bankPaymentResponse->sortCode); $this->assertNull($response->result[0]->bankPaymentResponse->accountNumber); $this->assertNull($response->result[0]->bankPaymentResponse->accountName); + $this->assertNotNull($response->result[0]->bankPaymentResponse->tokenRequestId); + $this->assertNotNull($response->result[0]->orderId); + $this->assertNotNull($response->result[0]->bankPaymentResponse->id); + $this->assertEquals(BankPaymentType::SEPA, $response->result[0]->bankPaymentResponse->type); + $this->assertEquals(BankPaymentStatus::SUCCESS, $response->result[0]->bankPaymentResponse->paymentStatus); } public function testBankPaymentList() @@ -139,18 +234,17 @@ public function testBankPaymentListWithReturnPii() $trn = $response->result[rand(0, count($response->result) - 1)]; $bankPaymentResponse = $trn->bankPaymentResponse; switch ($bankPaymentResponse->type) { - case \GlobalPayments\Api\Entities\Enums\BankPaymentType::FASTERPAYMENTS: + case BankPaymentType::FASTERPAYMENTS: $this->assertNotNull($bankPaymentResponse->sortCode); $this->assertNotNull($bankPaymentResponse->accountNumber); $this->assertNotNull($bankPaymentResponse->accountName); break; - case \GlobalPayments\Api\Entities\Enums\BankPaymentType::SEPA: + case BankPaymentType::SEPA: $this->assertNotNull($bankPaymentResponse->iban); $this->assertNotNull($bankPaymentResponse->accountName); break; default: $this->fail('Bank payment type unknown!'); - break; } } @@ -203,9 +297,9 @@ public function testCharge_AllBankDetails() $bankPayment->iban = '123456'; $trn = $bankPayment->charge($this->amount) - ->withCurrency($this->currency) - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') - ->execute(); + ->withCurrency($this->currency) + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) + ->execute(); $this->assertOpenBankingResponse($trn); } @@ -230,18 +324,12 @@ public function testFasterPaymentsCharge_MissingRemittanceReferenceType() { $bankPayment = $this->fasterPaymentsConfig(); - $exceptionCaught = false; - try { - $bankPayment->charge($this->amount) + $trn = $bankPayment->charge($this->amount) ->withCurrency($this->currency) - ->withRemittanceReference(null, 'Nike Bounce shoes') + ->withRemittanceReference(null, $this->remittanceReferenceValue) ->execute(); - } catch (GatewayException $e) { - $exceptionCaught = true; - $this->assertEquals('Status Code: 400 - remittance_reference.type cannot be blank or null ', $e->getMessage()); - } finally { - $this->assertTrue($exceptionCaught); - } + + $this->assertOpenBankingResponse($trn); } public function testFasterPaymentsCharge_MissingRemittanceReferenceValue() @@ -271,7 +359,7 @@ public function testFasterPaymentsCharge_MissingReturnUrl() try { $bankPayment->charge($this->amount) ->withCurrency($this->currency) - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); } catch (GatewayException $e) { $exceptionCaught = true; @@ -290,7 +378,7 @@ public function testFasterPaymentsCharge_MissingStatusUrl() try { $bankPayment->charge($this->amount) ->withCurrency($this->currency) - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); } catch (GatewayException $e) { $exceptionCaught = true; @@ -309,7 +397,7 @@ public function testFasterPaymentsCharge_MissingAccountNumber() try { $bankPayment->charge($this->amount) ->withCurrency($this->currency) - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); } catch (GatewayException $e) { $exceptionCaught = true; @@ -328,7 +416,7 @@ public function testFasterPaymentsCharge_MissingSortCode() try { $bankPayment->charge($this->amount) ->withCurrency($this->currency) - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); } catch (GatewayException $e) { $exceptionCaught = true; @@ -347,7 +435,7 @@ public function testFasterPaymentsCharge_MissingAccountName() try { $bankPayment->charge($this->amount) ->withCurrency($this->currency) - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); } catch (GatewayException $e) { $exceptionCaught = true; @@ -365,7 +453,7 @@ public function testFasterPaymentsCharge_InvalidCurrency() try { $bankPayment->charge(1) ->withCurrency('EUR') - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); } catch (GatewayException $e) { $exceptionCaught = true; @@ -384,7 +472,7 @@ public function testSEPACharge_MissingIban() try { $bankPayment->charge($this->amount) ->withCurrency('EUR') - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); } catch (GatewayException $e) { $exceptionCaught = true; @@ -403,7 +491,7 @@ public function testSEPACharge_MissingName() try { $bankPayment->charge($this->amount) ->withCurrency('EUR') - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); } catch (GatewayException $e) { $exceptionCaught = true; @@ -421,7 +509,7 @@ public function testSEPACharge_InvalidCurrency() try { $bankPayment->charge($this->amount) ->withCurrency($this->currency) - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); } catch (GatewayException $e) { $exceptionCaught = true; @@ -439,7 +527,7 @@ public function testSEPACharge_CADCurrency() try { $bankPayment->charge($this->amount) ->withCurrency("CAD") - ->withRemittanceReference(RemittanceReferenceType::TEXT, 'Nike Bounce Shoes') + ->withRemittanceReference(RemittanceReferenceType::TEXT, $this->remittanceReferenceValue) ->execute(); } catch (GatewayException $e) { $exceptionCaught = true; @@ -476,6 +564,7 @@ private function assertOpenBankingResponse(Transaction $trn) { $this->assertEquals(BankPaymentStatus::PAYMENT_INITIATED, $trn->responseMessage); $this->assertNotNull($trn->transactionId); + $this->assertNotNull($trn->clientTransactionId); $this->assertNotNull($trn->bankPaymentResponse->redirectUrl); } } diff --git a/test/Integration/Gateways/GpEcomConnector/RecurringTest.php b/test/Integration/Gateways/GpEcomConnector/RecurringTest.php index 62e8fbec..0da9d46f 100644 --- a/test/Integration/Gateways/GpEcomConnector/RecurringTest.php +++ b/test/Integration/Gateways/GpEcomConnector/RecurringTest.php @@ -31,11 +31,8 @@ class RecurringTest extends TestCase { - /** @var $newCustomer */ - public $newCustomer; - - /** @var $card */ - public $card; + public Customer $newCustomer; + public CreditCardData $card; public function getCustomerId() { diff --git a/test/Integration/Gateways/GpEcomConnector/Secure3dServiceTest.php b/test/Integration/Gateways/GpEcomConnector/Secure3dServiceTest.php index 2a681eec..66330d84 100644 --- a/test/Integration/Gateways/GpEcomConnector/Secure3dServiceTest.php +++ b/test/Integration/Gateways/GpEcomConnector/Secure3dServiceTest.php @@ -2,56 +2,38 @@ namespace GlobalPayments\Api\Tests\Integration\Gateways\GpEcomConnector; -use GlobalPayments\Api\Entities\CustomWebProxy; -use GlobalPayments\Api\Entities\Enums\AuthenticationSource; -use GlobalPayments\Api\Entities\Enums\MerchantInitiatedRequestType; -use GlobalPayments\Api\Entities\Enums\MessageCategory; -use GlobalPayments\Api\Entities\Enums\Secure3dStatus; +use GlobalPayments\Api\Entities\Address; +use GlobalPayments\Api\Entities\BrowserData; +use GlobalPayments\Api\Entities\Enums\ { + AddressType, AgeIndicator, AuthenticationRequestType, AuthenticationSource, + ChallengeRequestIndicator, ChallengeWindowSize, ColorDepth, CustomerAuthenticationMethod, DeliveryTimeFrame, + MerchantInitiatedRequestType, MessageCategory, MethodUrlCompletion, OrderTransactionType, PreOrderIndicator, + PriorAuthenticationMethod, ReorderIndicator, SdkInterface, SdkUiType, Secure3dStatus, Secure3dVersion, + ShippingMethod, GatewayProvider +}; use GlobalPayments\Api\Entities\Exceptions\BuilderException; -use GlobalPayments\Api\ServicesContainer; use GlobalPayments\Api\Entities\MerchantDataCollection; -use GlobalPayments\Api\Entities\Enums\Secure3dVersion; use GlobalPayments\Api\PaymentMethods\CreditCardData; use GlobalPayments\Api\PaymentMethods\RecurringPaymentMethod; +use GlobalPayments\Api\ServiceConfigs\Gateways\GpEcomConfig; use GlobalPayments\Api\Services\Secure3dService; +use GlobalPayments\Api\ServicesContainer; use GlobalPayments\Api\Tests\Data\TestCards; use GlobalPayments\Api\Tests\Integration\Gateways\ThreeDSecureAcsClient; use GlobalPayments\Api\Utils\Logging\Logger; use GlobalPayments\Api\Utils\Logging\SampleRequestLogger; use PHPUnit\Framework\TestCase; -use GlobalPayments\Api\Entities\Address; -use GlobalPayments\Api\Entities\BrowserData; -use GlobalPayments\Api\Entities\Enums\ColorDepth; -use GlobalPayments\Api\Entities\Enums\ChallengeWindowSize; -use GlobalPayments\Api\Entities\Enums\AddressType; -use GlobalPayments\Api\Entities\Enums\MethodUrlCompletion; -use GlobalPayments\Api\Entities\Enums\AuthenticationRequestType; -use GlobalPayments\Api\Entities\Enums\DeliveryTimeFrame; -use GlobalPayments\Api\Entities\Enums\ShippingMethod; -use GlobalPayments\Api\Entities\Enums\PreOrderIndicator; -use GlobalPayments\Api\Entities\Enums\ReorderIndicator; -use GlobalPayments\Api\Entities\Enums\OrderTransactionType; -use GlobalPayments\Api\Entities\Enums\AgeIndicator; -use GlobalPayments\Api\Entities\Enums\PriorAuthenticationMethod; -use GlobalPayments\Api\Entities\Enums\CustomerAuthenticationMethod; -use GlobalPayments\Api\Entities\Enums\SdkInterface; -use GlobalPayments\Api\Entities\Enums\SdkUiType; -use GlobalPayments\Api\Entities\Enums\ChallengeRequestIndicator; -use GlobalPayments\Api\ServiceConfigs\Gateways\GpEcomConfig; class Secure3dServiceTest extends TestCase { - private $card; - private $stored; - private $shippingAddress; - private $billingAddress; - private $browserData; - /** - * @var string - */ - private $gatewayProvider; - - public function setup() : void + private CreditCardData $card; + private RecurringPaymentMethod $stored; + private Address $shippingAddress; + private Address $billingAddress; + private BrowserData $browserData; + private GatewayProvider|string $gatewayProvider; + + public function setup(): void { $config = $this->getConfig(); ServicesContainer::configureService($config); @@ -92,6 +74,7 @@ public function setup() : void $this->browserData->colorDepth = ColorDepth::TWENTY_FOUR_BITS; $this->browserData->ipAddress = '123.123.123.123'; $this->browserData->javaEnabled = true; + $this->browserData->javaScriptEnabled = true; $this->browserData->language = 'en'; $this->browserData->screenHeight = 1080; $this->browserData->screenWidth = 1920; @@ -158,9 +141,9 @@ public function testFullCycle_v2() ->withBrowserData($this->browserData) ->withMethodUrlCompletion(MethodUrlCompletion::NO) ->withChallengeRequestIndicator(ChallengeRequestIndicator::NO_PREFERENCE) - ->withMobileNumber('+44','11 33 44 44') + ->withMobileNumber('+44', '11 33 44 44') ->withHomeNumber('44', '12444555') - ->withWorkNumber('+44','345 6667') + ->withWorkNumber('+44', '345 6667') ->execute(); $this->assertNotNull($initAuth); @@ -185,6 +168,66 @@ public function testFullCycle_v2() } } + public function testFullCycle_v2_FrictionlessCards() + { + $cards = array("4263970000005262" => "2.1.0", "4222000006724235" => "2.1.0", "4222000006285344" => "2.2.0", "4222000009719489" => "2.2.0"); + + foreach ($cards as $cardNumber => $cardVersion) { + $this->card->number = $cardNumber; + $secureEcom = Secure3dService::checkEnrollment($this->card) + ->execute('default', Secure3dVersion::TWO); + $this->assertNotNull($secureEcom); + $this->assertNotNull($secureEcom->serverTransactionId); + + if ($secureEcom->enrolled) { + $this->assertEquals(Secure3dVersion::TWO, $secureEcom->getVersion()); + + // initiate authentication + $initAuth = Secure3dService::initiateAuthentication($this->card, $secureEcom) + ->withAmount(10.01) + ->withCurrency('USD') + ->withOrderCreateDate(date('Y-m-d H:i:s')) + ->withAddress($this->billingAddress, AddressType::BILLING) + ->withAddress($this->shippingAddress, AddressType::SHIPPING) + ->withBrowserData($this->browserData) + ->withMethodUrlCompletion(MethodUrlCompletion::NO) + ->withChallengeRequestIndicator(ChallengeRequestIndicator::NO_PREFERENCE) + ->execute(); + + $this->assertNotNull($initAuth); + $this->assertEquals(Secure3dVersion::TWO, $initAuth->getVersion()); + $this->assertEquals('AUTHENTICATION_SUCCESSFUL' , $initAuth->status); + $this->assertNotNull($initAuth->issuerAcsUrl); + $this->assertNotNull($initAuth->acsTransactionId); + $this->assertNotNull($initAuth->acsReferenceNumber); + $this->assertNotNull($initAuth->authenticationValue); + $this->assertNotNull($initAuth->serverTransactionId); + $this->assertNull($initAuth->challengeMandated); + $this->assertEquals('05', $initAuth->eci); + $this->assertEquals($cardVersion, $initAuth->acsEndVersion); + + // get authentication data + $secureEcom = Secure3dService::getAuthenticationData() + ->withServerTransactionId($initAuth->serverTransactionId) + ->execute(); + $this->card->threeDSecure = $secureEcom; + + if ($secureEcom->status == 'AUTHENTICATION_SUCCESSFUL') { + $response = $this->card->charge(10.01) + ->withCurrency('USD') + ->execute(); + + $this->assertNotNull($response); + $this->assertEquals('00', $response->responseCode); + } else { + $this->fail('Signature verification failed.'); + } + } else { + $this->fail('Card not enrolled'); + } + } + } + public function testFullCycle_v2_1_challenge() { $this->card->number = '4012001038488884'; @@ -204,9 +247,9 @@ public function testFullCycle_v2_1_challenge() ->withAddress($this->shippingAddress, AddressType::SHIPPING) ->withMethodUrlCompletion(MethodUrlCompletion::NO) ->withBrowserData($this->browserData) - ->withMobileNumber('+44','11 33 44 44') + ->withMobileNumber('+44', '11 33 44 44') ->withHomeNumber('44', '12444555') - ->withWorkNumber('+44','345 6667') + ->withWorkNumber('+44', '345 6667') ->execute(); $this->assertNotNull($initAuth); @@ -237,6 +280,71 @@ public function testFullCycle_v2_1_challenge() $this->assertEquals('00', $response->responseCode); } + public function testFullCycle_v2_ChallengeRequiredCards() + { + $cards = array("4012001038488884" => "2.1.0", "4222000001227408" => "2.2.0"); + + foreach ($cards as $cardNumber => $cardVersion) { + $this->card->number = $cardNumber; + $secureEcom = Secure3dService::checkEnrollment($this->card) + ->execute('default', Secure3dVersion::TWO); + $this->assertNotNull($secureEcom); + $this->assertNotNull($secureEcom->serverTransactionId); + $this->assertTrue($secureEcom->enrolled); + $this->assertEquals(Secure3dVersion::TWO, $secureEcom->getVersion()); + + // initiate authentication + $initAuth = Secure3dService::initiateAuthentication($this->card, $secureEcom) + ->withAmount(10.01) + ->withCurrency('USD') + ->withOrderCreateDate(date('Y-m-d H:i:s')) + ->withAddress($this->billingAddress, AddressType::BILLING) + ->withAddress($this->shippingAddress, AddressType::SHIPPING) + ->withMethodUrlCompletion(MethodUrlCompletion::NO) + ->withBrowserData($this->browserData) + ->execute(); + + $this->assertNotNull($initAuth); + $this->assertEquals(Secure3dVersion::TWO, $initAuth->getVersion()); + $this->assertEquals(Secure3dStatus::CHALLENGE_REQUIRED, $initAuth->status); + $this->assertNotNull($initAuth->issuerAcsUrl); + $this->assertNotNull($initAuth->payerAuthenticationRequest); + $this->assertNotNull($initAuth->acsTransactionId); + $this->assertNotNull($initAuth->acsReferenceNumber); + $this->assertNotNull($initAuth->authenticationType); + $this->assertNotNull($initAuth->challengeMandated); + $this->assertEmpty($initAuth->eci); + $this->assertEquals($cardVersion, $initAuth->acsEndVersion); + + // get authentication data + $secureEcom = Secure3dService::getAuthenticationData() + ->withServerTransactionId($initAuth->serverTransactionId) + ->execute(); + $this->card->threeDSecure = $secureEcom; + $this->assertEquals('CHALLENGE_REQUIRED', $secureEcom->status); + + $authClient = new ThreeDSecureAcsClient($secureEcom->issuerAcsUrl); + $authClient->setGatewayProvider($this->gatewayProvider); + $authResponse = $authClient->authenticate_v2($initAuth); + $this->assertTrue($authResponse->getStatus()); + $this->assertNotEmpty($authResponse->getMerchantData()); + + // get authentication data + $secureEcom = Secure3dService::getAuthenticationData() + ->withServerTransactionId($initAuth->serverTransactionId) + ->execute(); + $this->card->threeDSecure = $secureEcom; + $this->assertEquals('AUTHENTICATION_SUCCESSFUL', $secureEcom->status); + + $response = $this->card->charge(10.01) + ->withCurrency('USD') + ->execute(); + + $this->assertNotNull($response); + $this->assertEquals('00', $response->responseCode); + } + } + public function testFullCycle_v2_2() { $secureEcom = Secure3dService::checkEnrollment($this->card) @@ -334,7 +442,7 @@ public function testFullCycle_Any() $secureEcom->payerAuthenticationRequest, $secureEcom->getMerchantData()->toString() ); - + $payerAuthenticationResponse = $authResponse->getAuthResponse(); $md = MerchantDataCollection::parse($authResponse->getMerchantData()); @@ -507,7 +615,6 @@ public function testOptionalRequestLevelFields() // optionals ->withMerchantInitiatedRequestType(AuthenticationRequestType::RECURRING_TRANSACTION) - ->execute(); $this->assertNotNull($initAuth); @@ -565,7 +672,6 @@ public function testOptionalOrderLevelFields() ->withPreOrderAvailabilityDate('20190418') ->withReorderIndicator(ReorderIndicator::REORDER) ->withOrderTransactionType(OrderTransactionType::GOODS_SERVICE_PURCHASE) - ->execute(); $this->assertNotNull($initAuth); @@ -628,7 +734,6 @@ public function testOptionalPayerLevelFields() ->withNumberOfAddCardAttemptsInLast24Hours(1) ->withShippingAddressCreateDate('20190128') ->withShippingAddressUsageIndicator(AgeIndicator::THIS_TRANSACTION) - ->execute(); $this->assertNotNull($initAuth); @@ -676,7 +781,6 @@ public function testOptionalPriorAuthenticationData() ->withPriorAuthenticationMethod(PriorAuthenticationMethod::FRICTIONLESS_AUTHENTICATION) ->withPriorAuthenticationTransactionId('26c3f619-39a4-4040-bf1f-6fd433e6d615') ->withPriorAuthenticationTimestamp((new \DateTime('2019-01-10T12:57:33.333Z'))->format(\DateTime::RFC3339_EXTENDED)) - ->execute(); $this->assertNotNull($initAuth); @@ -725,7 +829,6 @@ public function testOptionalRecurringData() ->withRecurringAuthorizationFrequency(25) ->withRecurringAuthorizationExpiryDate('20190825') ->withAuthenticationRequestType(AuthenticationRequestType::INSTALMENT_TRANSACTION) - ->execute(); $this->assertNotNull($initAuth); @@ -773,7 +876,6 @@ public function testOptionalPayerLoginData() ->withCustomerAuthenticationData('string') ->withCustomerAuthenticationTimestamp((new \DateTime('2019-01-10T12:57:33.333Z'))->format(\DateTime::RFC3339_EXTENDED)) ->withCustomerAuthenticationMethod(CustomerAuthenticationMethod::MERCHANT_SYSTEM) - ->execute(); $this->assertNotNull($initAuth); @@ -805,13 +907,13 @@ public function testOptionalMobileFields() ->execute('default', Secure3dVersion::TWO); $this->assertNotNull($secureEcom); $this->assertTrue($secureEcom->enrolled); - $this->assertEquals(Secure3dVersion::TWO, $secureEcom->getVersion()); - $phemeralPublicKey = [ - "kty" => "EC", - "crv" => "P-256", - "x" => "WWcpTjbOqiu_1aODllw5rYTq5oLXE_T0huCPjMIRbkI", - "y" => "Wz_7anIeadV8SJZUfr4drwjzuWoUbOsHp5GdRZBAAiw" - ]; + $this->assertEquals(Secure3dVersion::TWO, $secureEcom->getVersion()); + $phemeralPublicKey = [ + "kty" => "EC", + "crv" => "P-256", + "x" => "WWcpTjbOqiu_1aODllw5rYTq5oLXE_T0huCPjMIRbkI", + "y" => "Wz_7anIeadV8SJZUfr4drwjzuWoUbOsHp5GdRZBAAiw" + ]; // initiate authentication $initAuth = Secure3dService::initiateAuthentication($this->card, $secureEcom) ->withAmount(250.00) diff --git a/test/Integration/Gateways/PorticoConnector/AutoSubstantiationTest.php b/test/Integration/Gateways/PorticoConnector/AutoSubstantiationTest.php index e755991c..877aab96 100644 --- a/test/Integration/Gateways/PorticoConnector/AutoSubstantiationTest.php +++ b/test/Integration/Gateways/PorticoConnector/AutoSubstantiationTest.php @@ -11,6 +11,7 @@ final class AutoSubstantiationTest extends TestCase { + private CreditCardData $card; public function setup() : void { $this->card = new CreditCardData(); diff --git a/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.php b/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.php index 7074b6bd..067b96d1 100644 --- a/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.php +++ b/test/Integration/Gateways/PorticoConnector/Certifications/EcommerceTest.php @@ -6,7 +6,6 @@ Address, EncryptionData, EcommerceInfo, - MobileData, Transaction, ThreeDSecure }; @@ -20,7 +19,10 @@ TransactionModifier, Secure3dVersion }; -use GlobalPayments\Api\Entities\Exceptions\ApiException; +use GlobalPayments\Api\Entities\Exceptions\{ + ApiException, + GatewayException +}; use GlobalPayments\Api\PaymentMethods\{ DebitTrackData, EBTCardData, diff --git a/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.php b/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.php index 4a6b4f96..2149e426 100644 --- a/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.php +++ b/test/Integration/Gateways/PorticoConnector/Certifications/RetailTest.php @@ -1556,7 +1556,7 @@ public function testRetail081EbtfsPurchaseVisaManual() public function testRetail082EbtVoucherPurchaseVisa() { $card = TestCards::asEBTManual(TestCards::visaManual(false, true), '32539F50C245A6A93D123412324000AA'); - $card->SerialNumber = '123456789012345'; + $card->serialNumber = '123456789012345'; $card->approvalCode = '123456'; $response = $card->charge(103.01) diff --git a/test/Integration/Gateways/PorticoConnector/CommercialCardTest.php b/test/Integration/Gateways/PorticoConnector/CommercialCardTest.php index 5961210a..b8041b90 100644 --- a/test/Integration/Gateways/PorticoConnector/CommercialCardTest.php +++ b/test/Integration/Gateways/PorticoConnector/CommercialCardTest.php @@ -18,8 +18,12 @@ use GlobalPayments\Api\Tests\Data\TestCards; use PHPUnit\Framework\TestCase; -final class CommercialCardTest extends TestCase { - public function setup() : void { +final class CommercialCardTest extends TestCase +{ + private CreditCardData $card; + + public function setup() : void + { $this->card = new CreditCardData(); $this->card->number = '4111111111111111'; $this->card->expMonth = 12; diff --git a/test/Integration/Gateways/PorticoConnector/CreditTest.php b/test/Integration/Gateways/PorticoConnector/CreditTest.php index 151459e7..841fa567 100644 --- a/test/Integration/Gateways/PorticoConnector/CreditTest.php +++ b/test/Integration/Gateways/PorticoConnector/CreditTest.php @@ -16,9 +16,9 @@ class CreditTest extends TestCase { - protected $card; - protected $track; - private $enableCryptoUrl = true; + protected CreditCardData $card; + protected CreditTrackData $track; + private bool $enableCryptoUrl = true; public function setup() : void { diff --git a/test/Integration/Gateways/PorticoConnector/PorticoReportingTests.php b/test/Integration/Gateways/PorticoConnector/PorticoReportingTests.php index fafd8967..c755fb5b 100644 --- a/test/Integration/Gateways/PorticoConnector/PorticoReportingTests.php +++ b/test/Integration/Gateways/PorticoConnector/PorticoReportingTests.php @@ -2,30 +2,23 @@ namespace GlobalPayments\Api\Tests\Integration\Gateways\PorticoConnector; -use GlobalPayments\Api\ServicesConfig; use GlobalPayments\Api\ServicesContainer; use GlobalPayments\Api\PaymentMethods\CreditCardData; use GlobalPayments\Api\Tests\Data\TestCards; use PHPUnit\Framework\TestCase; -use GlobalPayments\Api\Entities; use GlobalPayments\Api\Entities\Address; use GlobalPayments\Api\Services\ReportingService; -use GlobalPayments\Api\Entities\Enums\ReportType; use GlobalPayments\Api\Entities\Enums\TimeZoneConversion; -use GlobalPayments\Api\Entities\Reporting\SearchCriteria; -use GlobalPayments\Api\Entities\Reporting\SearchCriteriaBuilder; -use GlobalPayments\Api\Entities\Reporting\TransactionSummary; -use GlobalPayments\Api\Builders\TransactionReportBuilder; use DateTime; use DateInterval; use GlobalPayments\Api\ServiceConfigs\Gateways\PorticoConfig; class PorticoReportingTests extends TestCase { - protected $card; - private $enableCryptoUrl = true; + protected CreditCardData $card; + private bool $enableCryptoUrl = true; /** @var ReportingService */ - private $reportingService; + private ReportingService $reportingService; public function setup() : void { @@ -38,7 +31,6 @@ public function setup() : void $this->reportingService = new ReportingService(); - $this->searchCriteria = new SearchCriteriaBuilder(); ServicesContainer::configureService($this->getConfig()); } diff --git a/test/Integration/Gateways/Terminals/UPA/UpaCreditTests.php b/test/Integration/Gateways/Terminals/UPA/UpaCreditTests.php index bde5c92f..743eefdd 100644 --- a/test/Integration/Gateways/Terminals/UPA/UpaCreditTests.php +++ b/test/Integration/Gateways/Terminals/UPA/UpaCreditTests.php @@ -86,7 +86,7 @@ public function testCreditVoid() $this->assertNotNull($response->terminalRefNumber); $refundResponse = $this->device->void() - ->withTerminalRefNumber($response->terminalRefNumber) + ->withTransactionId($response->transactionId) ->execute(); $this->assertNotNull($refundResponse); diff --git a/test/Integration/Gateways/Terminals/UPA/UpaMicTests.php b/test/Integration/Gateways/Terminals/UPA/UpaMicTests.php new file mode 100644 index 00000000..5d1b6424 --- /dev/null +++ b/test/Integration/Gateways/Terminals/UPA/UpaMicTests.php @@ -0,0 +1,77 @@ +device = DeviceService::create($this->getConfig()); + } + + public function tearDown() : void + { + sleep(3); + BaseGpApiTestConfig::resetGpApiConfig(); + } + + protected function getConfig() : ConnectionConfig + { + $config = new ConnectionConfig(); + $config->deviceType = DeviceType::UPA_DEVICE; + $config->connectionMode = ConnectionModes::MIC; + BaseGpApiTestConfig::$appId = BaseGpApiTestConfig::UPA_MIC_DEVICE_APP_ID; + BaseGpApiTestConfig::$appKey = BaseGpApiTestConfig::UPA_MIC_DEVICE_APP_KEY; + $gpApiConfig = BaseGpApiTestConfig::gpApiSetupConfig(Channel::CardPresent); + $gpApiConfig->environment = Environment::QA; + $gpApiConfig->country = 'US'; + $gpApiConfig->deviceCurrency = 'USD'; + $accessTokenInfo = new AccessTokenInfo(); + $accessTokenInfo->transactionProcessingAccountName = "DublinTransAccount_Nucleus01"; + $accessTokenInfo->transactionProcessingAccountID = 'TRA_4dca2d890e914f7da0790a70947b98c8'; + $gpApiConfig->accessTokenInfo = $accessTokenInfo; + $config->gatewayConfig = $gpApiConfig; + $config->requestIdProvider = new RequestIdProvider(); + $config->logManagementProvider = new LogManagement(); + + return $config; + } + + public function testCreditSale() + { + /** @var TerminalResponse $response */ + $response = $this->device->sale(10) + ->withEcrId(13) + ->withTerminalRefNumber('1234') + ->execute(); + + $this->assertNotNull($response); + $this->assertEquals('00', $response->deviceResponseCode); + $this->assertEquals('INITIATED', $response->deviceResponseText); + } + + public function testLineItem() + { + $response = $this->device->lineItem("Line Item #1", "10.00"); + $this->assertNotNull($response); + $this->assertEquals('00', $response->deviceResponseCode); + $this->assertEquals('INITIATED', $response->deviceResponseText); + } +} \ No newline at end of file diff --git a/test/Integration/Gateways/TransactionApiConnector/TransactionApiAchTest.php b/test/Integration/Gateways/TransactionApiConnector/TransactionApiAchTest.php index c9975633..3255166c 100644 --- a/test/Integration/Gateways/TransactionApiConnector/TransactionApiAchTest.php +++ b/test/Integration/Gateways/TransactionApiConnector/TransactionApiAchTest.php @@ -1,10 +1,7 @@ customer = new Customer(); $this->customer->title = "Mr."; $this->customer->firstName = "Joe"; - $this->customer->middle_name = "Henry"; $this->customer->lastName = "Doe"; $this->eCheck->customer = $this->customer; } @@ -75,7 +71,7 @@ public function test001USCheckSale() { ServicesContainer::configureService($this->setUpConfigUS()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'US', TransactionLanguage::EN_US, CountryUtils::getNumericCodeByCountry('US') @@ -86,7 +82,7 @@ public function test001USCheckSale() $response = $this->eCheck->charge(11) ->withCurrency('840') - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withEntryClass("PPD") ->withCustomerData($this->customer) ->execute(); @@ -99,7 +95,7 @@ public function test002USCheckRefund() { ServicesContainer::configureService($this->setUpConfigUS()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'US', TransactionLanguage::EN_US, CountryUtils::getNumericCodeByCountry('US') @@ -110,7 +106,7 @@ public function test002USCheckRefund() $response = $this->eCheck->refund(11) ->withCurrency('840') - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withEntryClass("PPD") ->withCustomerData($this->customer) ->execute(); @@ -123,7 +119,7 @@ public function test003USByCheckRefundId() { ServicesContainer::configureService($this->setUpConfigUS()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'US', TransactionLanguage::EN_US, CountryUtils::getNumericCodeByCountry('US') @@ -135,14 +131,14 @@ public function test003USByCheckRefundId() $response = $this->eCheck->charge(11) ->withCurrency('840') ->withEntryClass("PPD") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); - $checkSaleId = $response->checkSaleId; + $checkSaleId = $response->transactionId; $transaction = Transaction::fromId($checkSaleId, null, PaymentMethodType::ACH); - $this->eCheck->account_type = "Checking"; + $this->eCheck->accountType = AccountType::CHECKING; $response = $transaction->refund(5) ->withCurrency('840') @@ -158,7 +154,7 @@ public function test004USByReferenceIdCheckRefund() { ServicesContainer::configureService($this->setUpConfigUS()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'US', TransactionLanguage::EN_US, CountryUtils::getNumericCodeByCountry('US') @@ -169,7 +165,7 @@ public function test004USByReferenceIdCheckRefund() $response = $this->eCheck->charge(11) ->withCurrency('840') - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withEntryClass("PPD") ->withCustomerData($this->customer) ->execute(); @@ -192,7 +188,7 @@ public function test005CACheckSale() { ServicesContainer::configureService($this->setUpConfigCA()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'CA', TransactionLanguage::EN_CA, CountryUtils::getNumericCodeByCountry('CA') @@ -204,7 +200,7 @@ public function test005CACheckSale() $response = $this->eCheck->charge(11) ->withCurrency('124') - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withPaymentPurposeCode("150") ->withCustomerData($this->customer) ->execute(); @@ -217,7 +213,7 @@ public function test006CACheckRefund() { ServicesContainer::configureService($this->setUpConfigCA()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'CA', TransactionLanguage::EN_CA, CountryUtils::getNumericCodeByCountry('CA') @@ -229,7 +225,7 @@ public function test006CACheckRefund() $response = $this->eCheck->refund(11) ->withCurrency('124') - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withPaymentPurposeCode("150") ->withCustomerData($this->customer) ->execute(); @@ -242,7 +238,7 @@ public function test007CAByCheckRefundId() { ServicesContainer::configureService($this->setUpConfigCA()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'CA', TransactionLanguage::EN_CA, CountryUtils::getNumericCodeByCountry('CA') @@ -255,11 +251,11 @@ public function test007CAByCheckRefundId() $response = $this->eCheck->charge(15) ->withCurrency('124') ->withPaymentPurposeCode("150") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); - $checkSaleId = $response->transactionReference->checkSaleId; + $checkSaleId = $response->transactionReference->transactionId; $transaction = Transaction::fromId($checkSaleId, null, PaymentMethodType::ACH); $this->eCheck->checkNumber = (string)rand(); @@ -278,7 +274,7 @@ public function test008CAByReferenceIdCheckRefund() { ServicesContainer::configureService($this->setUpConfigCA()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'CA', TransactionLanguage::EN_CA, CountryUtils::getNumericCodeByCountry('CA') @@ -291,7 +287,7 @@ public function test008CAByReferenceIdCheckRefund() $response = $this->eCheck->charge(15) ->withCurrency('124') ->withPaymentPurposeCode("150") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); @@ -318,7 +314,7 @@ public function test009WithTokenUSCheckSale() { ServicesContainer::configureService($this->setUpConfigUS()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'US', TransactionLanguage::EN_US, CountryUtils::getNumericCodeByCountry('US') @@ -329,7 +325,7 @@ public function test009WithTokenUSCheckSale() $response = $this->eCheck->charge(11) ->withCurrency('840') - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withEntryClass("PPD") ->withRequestMultiUseToken(true) ->withCustomerData($this->customer) @@ -343,7 +339,7 @@ public function test009WithTokenUSCheckSale() $response = $this->eCheck->charge(11) ->withCurrency('840') - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withEntryClass("PPD") ->withCustomerData($this->customer) ->execute(); @@ -356,7 +352,7 @@ public function test010WithTokenCACheckSale() { ServicesContainer::configureService($this->setUpConfigCA()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'CA', TransactionLanguage::EN_CA, CountryUtils::getNumericCodeByCountry('CA') @@ -370,7 +366,7 @@ public function test010WithTokenCACheckSale() ->withCurrency('124') ->withRequestMultiUseToken(true) ->withPaymentPurposeCode("150") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); @@ -382,7 +378,7 @@ public function test010WithTokenCACheckSale() $response = $this->eCheck->charge(11) ->withCurrency('124') - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withPaymentPurposeCode("150") ->withCustomerData($this->customer) ->execute(); @@ -395,7 +391,7 @@ public function test011USWithTokenCheckRefund() { ServicesContainer::configureService($this->setUpConfigUS()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'US', TransactionLanguage::EN_US, CountryUtils::getNumericCodeByCountry('US') @@ -406,7 +402,7 @@ public function test011USWithTokenCheckRefund() $response = $this->eCheck->charge(15) ->withCurrency('840') - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withEntryClass("PPD") ->withRequestMultiUseToken(true) ->withCustomerData($this->customer) @@ -420,7 +416,7 @@ public function test011USWithTokenCheckRefund() $response = $this->eCheck->refund(15) ->withCurrency('840') - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withEntryClass("PPD") ->withCustomerData($this->customer) ->execute(); @@ -433,7 +429,7 @@ public function test012CAWithTokenCheckRefund() { ServicesContainer::configureService($this->setUpConfigCA()); - $this->transData = $this->getTransactionData( + $transData = $this->getTransactionData( 'CA', TransactionLanguage::EN_CA, CountryUtils::getNumericCodeByCountry('CA') @@ -447,7 +443,7 @@ public function test012CAWithTokenCheckRefund() ->withCurrency('124') ->withRequestMultiUseToken(true) ->withPaymentPurposeCode("150") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); @@ -460,7 +456,7 @@ public function test012CAWithTokenCheckRefund() $response = $this->eCheck->refund(15) ->withCurrency('124') ->withPaymentPurposeCode("150") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withEntryClass("PPD") ->withCustomerData($this->customer) ->execute(); @@ -473,12 +469,12 @@ public function test012CAWithTokenCheckRefund() private function getTransactionData($region, $language, $countryCode) { - $this->transData = new TransactionApiData(); - $this->transData->countryCode = $countryCode; - $this->transData->language = $language; - $this->transData->region = $region; - $this->transData->checkVerify = false; + $transData = new TransactionApiData(); + $transData->countryCode = $countryCode; + $transData->language = $language; + $transData->region = $region; + $transData->checkVerify = false; - return $this->transData; + return $transData; } } diff --git a/test/Integration/Gateways/TransactionApiConnector/TransactionApiCAReportingTest.php b/test/Integration/Gateways/TransactionApiConnector/TransactionApiCAReportingTest.php index 0d4fd5e7..059f6bc9 100644 --- a/test/Integration/Gateways/TransactionApiConnector/TransactionApiCAReportingTest.php +++ b/test/Integration/Gateways/TransactionApiConnector/TransactionApiCAReportingTest.php @@ -27,6 +27,10 @@ class TransactionApiCAReportingTest extends TestCase private $config; + private CreditCardData $card; + + private Address $addressCa; + public function setup(): void { ServicesContainer::configureService($this->setUpConfig()); @@ -50,7 +54,6 @@ public function setup(): void $this->customer->id = "2e39a948-2a9e-4b4a-9c59-0b96765343b7"; $this->customer->title = "Mr."; $this->customer->firstName = "Joe"; - $this->customer->middleName = "Henry"; $this->customer->lastName = "Doe"; $this->customer->businessName = "ABC Company LLC"; $this->customer->email = "joe.doe@gmail.com"; @@ -67,36 +70,35 @@ public function setup(): void $this->customer = new Customer(); $this->customer->title = "Mr."; $this->customer->firstName = "Joe"; - $this->customer->middle_name = "Henry"; $this->customer->lastName = "Doe"; $this->eCheck->customer = $this->customer; } public function setUpConfigACH() { - $this->config = new TransactionApiConfig(); - $this->config->accountCredential = '800000052925:80039996:58xcGM3pbTtzcidVPY65XBqbB1EzWoD3'; - $this->config->apiSecret = 'lucQKkwz3W3RGzABkSWUVZj1Mb0Yx3E9chAA8ESUVAv'; - $this->config->apiKey = 'qeG6EWZOiAwk4jsiHzsh2BN8VkN2rdAs'; - $this->config->apiVersion = '2021-04-08'; - $this->config->apiPartnerName = 'mobile_sdk'; - $this->config->country = 'CA'; - $this->config->requestLogger = new SampleRequestLogger(new Logger("logs")); - - return $this->config; + $config = new TransactionApiConfig(); + $config->accountCredential = '800000052925:80039996:58xcGM3pbTtzcidVPY65XBqbB1EzWoD3'; + $config->apiSecret = 'lucQKkwz3W3RGzABkSWUVZj1Mb0Yx3E9chAA8ESUVAv'; + $config->apiKey = 'qeG6EWZOiAwk4jsiHzsh2BN8VkN2rdAs'; + $config->apiVersion = '2021-04-08'; + $config->apiPartnerName = 'mobile_sdk'; + $config->country = 'CA'; + $config->requestLogger = new SampleRequestLogger(new Logger("logs")); + + return $config; } public function setUpConfig() { - $this->config = new TransactionApiConfig(); - $this->config->accountCredential = '800000052925:80039923:eWcWNJhfxiJ7QyEHSHndWk4VHKbSmSue'; - $this->config->apiSecret = 'lucQKkwz3W3RGzABkSWUVZj1Mb0Yx3E9chAA8ESUVAv'; - $this->config->apiKey = 'qeG6EWZOiAwk4jsiHzsh2BN8VkN2rdAs'; - $this->config->apiVersion = '2021-04-08'; - $this->config->apiPartnerName = 'mobile_sdk'; - $this->config->country = 'CA'; - $this->config->requestLogger = new SampleRequestLogger(new Logger("logs")); - - return $this->config; + $config = new TransactionApiConfig(); + $config->accountCredential = '800000052925:80039923:eWcWNJhfxiJ7QyEHSHndWk4VHKbSmSue'; + $config->apiSecret = 'lucQKkwz3W3RGzABkSWUVZj1Mb0Yx3E9chAA8ESUVAv'; + $config->apiKey = 'qeG6EWZOiAwk4jsiHzsh2BN8VkN2rdAs'; + $config->apiVersion = '2021-04-08'; + $config->apiPartnerName = 'mobile_sdk'; + $config->country = 'CA'; + $config->requestLogger = new SampleRequestLogger(new Logger("logs")); + + return $config; } public function test001CreditSaleByCreditSaleId() @@ -215,7 +217,7 @@ public function test005CheckSaleById() ServicesContainer::configureService($this->setUpConfigACH()); ServicesContainer::configureService($this->setUpConfigACH()); - $this->transData = $this->getTransactionAchData( + $transData = $this->getTransactionAchData( 'CA', TransactionLanguage::EN_CA, CountryUtils::getNumericCodeByCountry('CA') @@ -228,13 +230,13 @@ public function test005CheckSaleById() $response = $this->eCheck->charge(11) ->withCurrency('124') ->withPaymentPurposeCode("150") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); - $this->assertNotNull($response->transactionReference->checkSaleId); + $this->assertNotNull($response->transactionReference->transactionId); - $checkSaleId = $response->transactionReference->checkSaleId; + $checkSaleId = $response->transactionReference->transactionId; $response = ReportingService::findTransactions($checkSaleId) ->where(SearchCriteria::PAYMENT_METHOD_TYPE, PaymentMethodType::ACH) @@ -249,7 +251,7 @@ public function test006CheckSaleByRefId() { ServicesContainer::configureService($this->setUpConfigACH()); - $this->transData = $this->getTransactionAchData( + $transData = $this->getTransactionAchData( 'CA', TransactionLanguage::EN_CA, CountryUtils::getNumericCodeByCountry('CA') @@ -262,7 +264,7 @@ public function test006CheckSaleByRefId() $response = $this->eCheck->charge(11) ->withCurrency('124') ->withPaymentPurposeCode("150") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); @@ -284,7 +286,7 @@ public function test007CheckRefundById() { ServicesContainer::configureService($this->setUpConfigACH()); - $this->transData = $this->getTransactionAchData( + $transData = $this->getTransactionAchData( 'CA', TransactionLanguage::EN_CA, CountryUtils::getNumericCodeByCountry('CA') @@ -297,13 +299,13 @@ public function test007CheckRefundById() $response = $this->eCheck->refund(11) ->withCurrency('124') ->withPaymentPurposeCode("150") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); - $this->assertNotNull($response->transactionReference->checkRefundId); + $this->assertNotNull($response->transactionReference->transactionId); - $checkRefundId = $response->transactionReference->checkRefundId; + $checkRefundId = $response->transactionReference->transactionId; $response = ReportingService::findTransactions($checkRefundId) ->where(SearchCriteria::PAYMENT_TYPE, PaymentType::REFUND) @@ -319,7 +321,7 @@ public function test008CheckRefundByRefId() { ServicesContainer::configureService($this->setUpConfigACH()); - $this->transData = $this->getTransactionAchData( + $transData = $this->getTransactionAchData( 'CA', TransactionLanguage::EN_CA, CountryUtils::getNumericCodeByCountry('CA') @@ -329,13 +331,13 @@ public function test008CheckRefundByRefId() $this->eCheck->branchTransitNumber = "12345"; $this->eCheck->financialInstitutionNumber = "999"; - $this->transData->paymentPurposeCode = "150"; - $this->transData->entryClass = "PPD"; + $transData->paymentPurposeCode = "150"; + $transData->entryClass = "PPD"; $response = $this->eCheck->refund(18) ->withCurrency('124') ->withPaymentPurposeCode("150") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); @@ -367,12 +369,12 @@ private function getTransactionData($region, $countryCode = null, $lang = null) private function getTransactionAchData($region, $language, $countryCode) { - $this->transData = new TransactionApiData(); - $this->transData->countryCode = $countryCode; - $this->transData->language = $language; - $this->transData->region = $region; - $this->transData->checkVerify = false; + $transData = new TransactionApiData(); + $transData->countryCode = $countryCode; + $transData->language = $language; + $transData->region = $region; + $transData->checkVerify = false; - return $this->transData; + return $transData; } } diff --git a/test/Integration/Gateways/TransactionApiConnector/TransactionApiCreditReturnTest.php b/test/Integration/Gateways/TransactionApiConnector/TransactionApiCreditReturnTest.php index 4d0290c4..27bda180 100644 --- a/test/Integration/Gateways/TransactionApiConnector/TransactionApiCreditReturnTest.php +++ b/test/Integration/Gateways/TransactionApiConnector/TransactionApiCreditReturnTest.php @@ -1,6 +1,6 @@ addressCa->state = "CA"; $this->addressCa->country = "Canada"; $this->addressCa->postalCode = "91765"; - - $this->customer = new Customer(); - $this->customer->id = "2e39a948-2a9e-4b4a-9c59-0b96765343b7"; - $this->customer->title = "Mr."; - $this->customer->firstName = "Joe"; - $this->customer->middleName = "Henry"; - $this->customer->lastName = "Doe"; - $this->customer->businessName = "ABC Company LLC"; - $this->customer->email = "joe.doe@gmail.com"; - $this->customer->dateOfBirth = "1980-01-01"; - $this->customer->mobilePhone = new PhoneNumber('+35', '312345678', PhoneNumberType::MOBILE); - $this->customer->homePhone = new PhoneNumber('+1', '12345899', PhoneNumberType::HOME); - } + } public function setUpConfig($country = "US") { - $this->config = new TransactionApiConfig(); - $this->config->accountCredential = '800000052925:80039923:eWcWNJhfxiJ7QyEHSHndWk4VHKbSmSue'; - $this->config->apiSecret = 'lucQKkwz3W3RGzABkSWUVZj1Mb0Yx3E9chAA8ESUVAv'; - $this->config->apiKey = 'qeG6EWZOiAwk4jsiHzsh2BN8VkN2rdAs'; - $this->config->apiVersion = '2021-04-08'; - $this->config->apiPartnerName = 'mobile_sdk'; - $this->config->country = $country; - $this->config->requestLogger = new SampleRequestLogger(new Logger("logs")); - - return $this->config; + $config = new TransactionApiConfig(); + $config->accountCredential = '800000052925:80039923:eWcWNJhfxiJ7QyEHSHndWk4VHKbSmSue'; + $config->apiSecret = 'lucQKkwz3W3RGzABkSWUVZj1Mb0Yx3E9chAA8ESUVAv'; + $config->apiKey = 'qeG6EWZOiAwk4jsiHzsh2BN8VkN2rdAs'; + $config->apiVersion = '2021-04-08'; + $config->apiPartnerName = 'mobile_sdk'; + $config->country = $country; + $config->requestLogger = new SampleRequestLogger(new Logger("logs")); + + return $config; } public function test01USCreditReturn() @@ -120,7 +107,8 @@ public function test02CACreditReturn() public function test03CACreditSaleCreditReturn() { - ServicesContainer::configureService($this->setUpConfig('CA')); + $config = $this->setUpConfig('CA'); + ServicesContainer::configureService($config); $transData = $this->getTransactionData( 'CA', @@ -138,7 +126,7 @@ public function test03CACreditSaleCreditReturn() $creditSaleId = $response->transactionId; - $this->config->country = 'US'; + $config->country = 'US'; $transaction = Transaction::fromId( $creditSaleId, diff --git a/test/Integration/Gateways/TransactionApiConnector/TransactionApiCreditTest.php b/test/Integration/Gateways/TransactionApiConnector/TransactionApiCreditTest.php index d4dddb43..f6f41f63 100644 --- a/test/Integration/Gateways/TransactionApiConnector/TransactionApiCreditTest.php +++ b/test/Integration/Gateways/TransactionApiConnector/TransactionApiCreditTest.php @@ -54,18 +54,6 @@ public function setup(): void $this->addressCa->state = "CA"; $this->addressCa->country = "Canada"; $this->addressCa->postalCode = "91765"; - - $this->customer = new Customer(); - $this->customer->id = "2e39a948-2a9e-4b4a-9c59-0b96765343b7"; - $this->customer->title = "Mr."; - $this->customer->firstName = "Joe"; - $this->customer->middleName = "Henry"; - $this->customer->lastName = "Doe"; - $this->customer->businessName = "ABC Company LLC"; - $this->customer->email = "joe.doe@gmail.com"; - $this->customer->dateOfBirth = "1980-01-01"; - $this->customer->mobilePhone = new PhoneNumber('+35', '312345678', PhoneNumberType::MOBILE); - $this->customer->homePhone = new PhoneNumber('+1', '12345899', PhoneNumberType::HOME); } public function setUpConfig($country = "US") diff --git a/test/Integration/Gateways/TransactionApiConnector/TransactionApiReportingTest.php b/test/Integration/Gateways/TransactionApiConnector/TransactionApiReportingTest.php index 90a01e34..533a818f 100644 --- a/test/Integration/Gateways/TransactionApiConnector/TransactionApiReportingTest.php +++ b/test/Integration/Gateways/TransactionApiConnector/TransactionApiReportingTest.php @@ -21,17 +21,18 @@ class TransactionApiReportingTest extends TestCase { - private $eCheck; + private ECheck $eCheck; - private $customer; + private Customer $customer; - public $config; - - private $currency = '840'; + private TransactionApiConfig $config; + private CreditCardData $card; + private Address $address; public function setup(): void { - ServicesContainer::configureService($this->setUpConfig()); + $this->setUpConfig(); + ServicesContainer::configureService($this->config); $this->eCheck = new ECheck(); $this->eCheck->accountNumber = '12121'; @@ -57,7 +58,6 @@ public function setup(): void $this->customer->id = "2e39a948-2a9e-4b4a-9c59-0b96765343b7"; $this->customer->title = "Mr."; $this->customer->firstName = "Joe"; - $this->customer->middleName = "Henry"; $this->customer->lastName = "Doe"; $this->customer->businessName = "ABC Company LLC"; $this->customer->email = "joe.doe@gmail.com"; @@ -76,8 +76,6 @@ public function setUpConfig() $this->config->apiPartnerName = 'mobile_sdk'; $this->config->country = 'US'; $this->config->requestLogger = new SampleRequestLogger(new Logger("logs")); - - return $this->config; } public function test001CreditSaleByCreditSaleId() @@ -184,7 +182,7 @@ public function test005CheckSaleById() ServicesContainer::configureService($this->setUpConfig()); $this->config->accountCredential = "800000052925:80039990:n7j9rGFUml1Du7rcRs7XGYdJdVMmZKzh"; - $this->transData = $this->getTransactionDataAch( + $transData = $this->getTransactionDataAch( 'US', TransactionLanguage::EN_US, CountryUtils::getNumericCodeByCountry('US') @@ -200,13 +198,13 @@ public function test005CheckSaleById() $response = $this->eCheck->charge(11) ->withCurrency('840') ->withEntryClass("PPD") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); - $this->assertNotNull($response->transactionReference->checkSaleId); + $this->assertNotNull($response->transactionReference->transactionId); - $checkSaleId = $response->transactionReference->checkSaleId; + $checkSaleId = $response->transactionReference->transactionId; $response = ReportingService::findTransactions($checkSaleId) ->where(SearchCriteria::PAYMENT_METHOD_TYPE, PaymentMethodType::ACH) @@ -222,7 +220,7 @@ public function test006CheckSaleByRefId() ServicesContainer::configureService($this->setUpConfig()); $this->config->accountCredential = "800000052925:80039990:n7j9rGFUml1Du7rcRs7XGYdJdVMmZKzh"; - $this->transData = $this->getTransactionDataAch( + $transData = $this->getTransactionDataAch( 'US', TransactionLanguage::EN_US, CountryUtils::getNumericCodeByCountry('US') @@ -238,7 +236,7 @@ public function test006CheckSaleByRefId() $response = $this->eCheck->charge(11) ->withCurrency('840') ->withEntryClass("PPD") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); @@ -260,7 +258,7 @@ public function test007CheckRefundById() ServicesContainer::configureService($this->setUpConfig()); $this->config->accountCredential = "800000052925:80039990:n7j9rGFUml1Du7rcRs7XGYdJdVMmZKzh"; - $this->transData = $this->getTransactionDataAch( + $transData = $this->getTransactionDataAch( 'US', TransactionLanguage::EN_US, CountryUtils::getNumericCodeByCountry('US') @@ -276,11 +274,11 @@ public function test007CheckRefundById() $response = $this->eCheck->refund(13) ->withCurrency('840') ->withEntryClass("PPD") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); - $checkRefundId = $response->checkRefundId; + $checkRefundId = $response->transactionId; $response = ReportingService::findTransactions($checkRefundId) ->where(SearchCriteria::PAYMENT_TYPE, PaymentType::REFUND) @@ -297,7 +295,7 @@ public function test008CheckRefundByRefId() ServicesContainer::configureService($this->setUpConfig()); $this->config->accountCredential = "800000052925:80039990:n7j9rGFUml1Du7rcRs7XGYdJdVMmZKzh"; - $this->transData = $this->getTransactionDataAch( + $transData = $this->getTransactionDataAch( 'US', TransactionLanguage::EN_US, CountryUtils::getNumericCodeByCountry('US') @@ -313,7 +311,7 @@ public function test008CheckRefundByRefId() $response = $this->eCheck->refund(15) ->withCurrency('840') ->withEntryClass("PPD") - ->withTransactionData($this->transData) + ->withTransactionData($transData) ->withCustomerData($this->customer) ->execute(); @@ -343,12 +341,12 @@ private function getTransactionData($region, $countryCode = null, $lang = null) private function getTransactionDataAch($region, $language, $countryCode) { - $this->transData = new TransactionApiData(); - $this->transData->countryCode = $countryCode; - $this->transData->language = $language; - $this->transData->region = $region; - $this->transData->checkVerify = false; + $transData = new TransactionApiData(); + $transData->countryCode = $countryCode; + $transData->language = $language; + $transData->region = $region; + $transData->checkVerify = false; - return $this->transData; + return $transData; } }