From e058392c04ddd978e6afeace7888abfa593b0f0e Mon Sep 17 00:00:00 2001 From: peter279k Date: Wed, 1 Jul 2020 18:41:09 +0800 Subject: [PATCH] Resolves issue #8 --- .travis.yml | 1 + composer.json | 1 + src/Factory/ResponseFactory.php | 3 +-- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 9790cba..3681cad 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,6 +10,7 @@ before_script: - travis_retry composer install --no-interaction --prefer-source script: + - vendor/bin/phpcs --standard=PSR2 src tests - vendor/bin/phpunit --coverage-clover=coverage.xml - vendor/bin/infection -s --threads=4 diff --git a/composer.json b/composer.json index c169b5c..bf4c9da 100644 --- a/composer.json +++ b/composer.json @@ -14,6 +14,7 @@ }, "require-dev": { "infection/infection": "^0.15.3", + "squizlabs/php_codesniffer": "^3.5", "phpunit/phpunit": "^8.0" }, "autoload": { diff --git a/src/Factory/ResponseFactory.php b/src/Factory/ResponseFactory.php index 2b2e756..f7894f2 100644 --- a/src/Factory/ResponseFactory.php +++ b/src/Factory/ResponseFactory.php @@ -44,8 +44,7 @@ public static function createFromRefundResponse(ResponseInterface $response): Re { $xml = self::responseToXML($response); - if ( - !$xml->xpath('transaction_id') || + if (!$xml->xpath('transaction_id') || !$xml->xpath('mb_amount') || !$xml->xpath('mb_currency') || !$xml->xpath('status')