From f3ea6bde337f3f39402bb2ea18b4c1e1d81d5a77 Mon Sep 17 00:00:00 2001 From: Cosmin B Date: Wed, 8 May 2019 23:01:03 +0300 Subject: [PATCH 1/8] Update composer.json --- composer.json | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/composer.json b/composer.json index 5be0c83..8ac796f 100644 --- a/composer.json +++ b/composer.json @@ -19,11 +19,12 @@ } ], "require": { - "php": ">=5.4.0", - "omnipay/common": "~2.0" + "php": "^7.1", + "omnipay/common": "^3@beta", + "php-http/guzzle6-adapter" : "^1.1" }, "require-dev": { - "omnipay/tests": "~2.0" + "omnipay/tests": "~3.0" }, "autoload": { "psr-4": { From 5e52998c3fbfd4e6855cf4a7891b6e328d1513f4 Mon Sep 17 00:00:00 2001 From: Cosmin B Date: Fri, 10 May 2019 19:08:43 +0300 Subject: [PATCH 2/8] Integrated support for token --- .../Mobilpay/Api/Request/Notify.php | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/BusinessMastery/Mobilpay/Api/Request/Notify.php b/src/BusinessMastery/Mobilpay/Api/Request/Notify.php index 1cd2c07..856ffe5 100644 --- a/src/BusinessMastery/Mobilpay/Api/Request/Notify.php +++ b/src/BusinessMastery/Mobilpay/Api/Request/Notify.php @@ -84,6 +84,15 @@ public function loadFromXml(DOMElement $elem) if ($elems->length == 1) { $this->current_payment_count = $elems->item(0)->nodeValue; } + + $elems = $elem->getElementsByTagName('token_id'); + if ($elems->length == 1) { + $this->token_id = $elems->item(0)->nodeValue; + } + $elems = $elem->getElementsByTagName('token_expiration_date'); + if ($elems->length == 1) { + $this->token_expiration_date = $elems->item(0)->nodeValue; + } $elems = $elem->getElementsByTagName('error'); if ($elems->length == 1) { @@ -115,6 +124,20 @@ public function _loadFromQueryString($queryString) $this->errorCode = isset($reqParams['mobilpay_refference_error_code']) ? $reqParams['mobilpay_refference_error_code'] : null; $this->errorMessage = isset($reqParams['mobilpay_refference_error_message']) ? $reqParams['mobilpay_refference_error_message'] : null; $this->timestamp = isset($reqParams['mobilpay_refference_timestamp']) ? $reqParams['mobilpay_refference_timestamp'] : null; + $this->purchaseId = isset($reqParams['mobilpay_refference_id']) ? $reqParams['mobilpay_refference_id'] : null; + $this->action = isset($reqParams['mobilpay_refference_action']) ? $reqParams['mobilpay_refference_action'] : null; + $this->originalAmount = isset($reqParams['mobilpay_refference_original_amount']) ? $reqParams['mobilpay_refference_original_amount'] : null; + $this->processedAmount = isset($reqParams['mobilpay_refference_processed_amount']) ? $reqParams['mobilpay_refference_processed_amount'] : null; + $this->promotionAmount = isset($reqParams['mobilpay_refference_promotion_amount']) ? $reqParams['mobilpay_refference_promotion_amount'] : null; + $this->current_payment_count = isset($reqParams['mobilpay_refference_current_payment_count']) ? $reqParams['mobilpay_refference_current_payment_count'] : null; + $this->pan_masked = isset($reqParams['mobilpay_refference_pan_masked']) ? $reqParams['mobilpay_refference_pan_masked'] : null; + $this->token_id = isset($reqParams['mobilpay_refference_token_id']) ? $reqParams['mobilpay_refference_token_id'] : null; + $this->token_expiration_date = isset($reqParams['mobilpay_refference_token_expiration_date']) ? $reqParams['mobilpay_refference_token_expiration_date'] : null; + $this->customer_id = isset($reqParams['mobilpay_refference_customer_id']) ? $reqParams['mobilpay_refference_customer_id'] : null; + $this->customer_type = isset($reqParams['mobilpay_refference_customer_type']) ? $reqParams['mobilpay_refference_customer_type'] : null; + $this->errorCode = isset($reqParams['mobilpay_refference_error_code']) ? $reqParams['mobilpay_refference_error_code'] : null; + $this->errorMessage = isset($reqParams['mobilpay_refference_error_message']) ? $reqParams['mobilpay_refference_error_message'] : null; + $this->timestamp = isset($reqParams['mobilpay_refference_timestamp']) ? $reqParams['mobilpay_refference_timestamp'] : null; } public function createXmlElement(DOMDocument $xmlDoc) From 7d6c989c196ca4ee11ac19ad8849b00132efad30 Mon Sep 17 00:00:00 2001 From: Cosmin B Date: Fri, 10 May 2019 19:17:43 +0300 Subject: [PATCH 3/8] Integrated support for token Now the response contains the token_id and token_expiration_date params for future cardless payments --- src/BusinessMastery/Mobilpay/Api/Request/Notify.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/BusinessMastery/Mobilpay/Api/Request/Notify.php b/src/BusinessMastery/Mobilpay/Api/Request/Notify.php index 856ffe5..dcb044b 100644 --- a/src/BusinessMastery/Mobilpay/Api/Request/Notify.php +++ b/src/BusinessMastery/Mobilpay/Api/Request/Notify.php @@ -29,6 +29,8 @@ class Notify public $current_payment_count = 1; public $customer = null; public $issuer = null; + public $token_id = null; + public $token_expiration_date = null; private $_crc = null; From 6553af7ae8e179d3823a97cfbdf54fcc8c98b973 Mon Sep 17 00:00:00 2001 From: Cosmin B Date: Sun, 27 Mar 2022 20:19:22 +0300 Subject: [PATCH 4/8] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 8ac796f..6bc3625 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "require": { "php": "^7.1", "omnipay/common": "^3@beta", - "php-http/guzzle6-adapter" : "^1.1" + "php-http/guzzle6-adapter" : "^2.0" }, "require-dev": { "omnipay/tests": "~3.0" From 02469fdd3d7722e91f4426fff3582e8905f383b6 Mon Sep 17 00:00:00 2001 From: Cosmin B Date: Sat, 26 Nov 2022 15:03:23 +0200 Subject: [PATCH 5/8] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index 6bc3625..c5b2bf9 100644 --- a/composer.json +++ b/composer.json @@ -19,7 +19,7 @@ } ], "require": { - "php": "^7.1", + "php": ">=7.1", "omnipay/common": "^3@beta", "php-http/guzzle6-adapter" : "^2.0" }, From 18140976bb2a38fe4d23e6cf8e3980e851e40d60 Mon Sep 17 00:00:00 2001 From: Cosmin B Date: Sat, 26 Nov 2022 15:19:29 +0200 Subject: [PATCH 6/8] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index c5b2bf9..fb6ea34 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "require": { "php": ">=7.1", "omnipay/common": "^3@beta", - "php-http/guzzle6-adapter" : "^2.0" + "php-http/guzzle7-adapter" : "^2.0" }, "require-dev": { "omnipay/tests": "~3.0" From c8a2d480d05c0170a760813cd831b495a5cf3dc8 Mon Sep 17 00:00:00 2001 From: Cosmin B Date: Sat, 26 Nov 2022 15:20:15 +0200 Subject: [PATCH 7/8] Update composer.json --- composer.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/composer.json b/composer.json index fb6ea34..ca5e786 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "require": { "php": ">=7.1", "omnipay/common": "^3@beta", - "php-http/guzzle7-adapter" : "^2.0" + "php-http/guzzle7-adapter" : "^1.0" }, "require-dev": { "omnipay/tests": "~3.0" From e16c05531ce94e6a3c7f42b024ba18ef1bd5182c Mon Sep 17 00:00:00 2001 From: Cosmin B Date: Sat, 26 Nov 2022 15:30:15 +0200 Subject: [PATCH 8/8] Update composer.json --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index ca5e786..6bc3625 100644 --- a/composer.json +++ b/composer.json @@ -19,9 +19,9 @@ } ], "require": { - "php": ">=7.1", + "php": "^7.1", "omnipay/common": "^3@beta", - "php-http/guzzle7-adapter" : "^1.0" + "php-http/guzzle6-adapter" : "^2.0" }, "require-dev": { "omnipay/tests": "~3.0"