From 3e80091bae06841419587b9c8e0589268818ae07 Mon Sep 17 00:00:00 2001 From: Thibaut GODET Date: Mon, 31 Jul 2023 09:01:33 +0000 Subject: [PATCH 1/4] =?UTF-8?q?[EC-3369][SDK=20PHP]=20R=C3=A9cup=C3=A9rati?= =?UTF-8?q?on=20du=20basket?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 3 +++ lib/HiPay/Fullservice/Gateway/Client/GatewayClient.php | 10 +++++++++- .../Tests/Fullservice/HTTP/SimpleHTTPClientTest.php | 2 +- 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 27af4dea..0fab5723 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,8 @@ # Changelog +## Version 2.13.0 +- [fix]: Fixed `basket` element in `transaction` object + ## Version 2.12.4 - [fix]: Fixed `reference_to_pay` field in `Transaction` class diff --git a/lib/HiPay/Fullservice/Gateway/Client/GatewayClient.php b/lib/HiPay/Fullservice/Gateway/Client/GatewayClient.php index 07bd89b5..0321754d 100644 --- a/lib/HiPay/Fullservice/Gateway/Client/GatewayClient.php +++ b/lib/HiPay/Fullservice/Gateway/Client/GatewayClient.php @@ -277,7 +277,15 @@ public function requestTransactionInformation($transactionReference) return null; } - $transactionMapper = new TransactionMapper($data['transaction']); + $res = $data["transaction"]; + + if(isset($data['basket'])) { + $res["basket"] = $data["basket"]; + } else { + $res["basket"] = null; + } + + $transactionMapper = new TransactionMapper($res); /** @var Transaction $transaction */ $transaction = $transactionMapper->getModelObjectMapped(); diff --git a/tests/Unit/HiPay/Tests/Fullservice/HTTP/SimpleHTTPClientTest.php b/tests/Unit/HiPay/Tests/Fullservice/HTTP/SimpleHTTPClientTest.php index 7b5bd702..c5a70755 100755 --- a/tests/Unit/HiPay/Tests/Fullservice/HTTP/SimpleHTTPClientTest.php +++ b/tests/Unit/HiPay/Tests/Fullservice/HTTP/SimpleHTTPClientTest.php @@ -196,7 +196,7 @@ public function testRequestCanBeExecutedWithProxy(ClientProvider $client) $client->setConfiguration($conf); $this->expectException(CurlException::class); - $this->expectExceptionMessage('Failed to connect to 127.0.0.1 port 25565: Connection refused'); + $this->expectExceptionMessage('Failed to connect to 127.0.0.1 port 25565'); $client->request('GET', "/"); } From fcf83f21fa07b4198516db08496a2cd58656b02a Mon Sep 17 00:00:00 2001 From: Thibaut GODET Date: Mon, 31 Jul 2023 15:25:53 +0000 Subject: [PATCH 2/4] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0fab5723..9f77a7ce 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ ## Version 2.13.0 - [fix]: Fixed `basket` element in `transaction` object +- [add]: Add Hosted Page to demo page ## Version 2.12.4 From b2c207c962210ce7162fd99d30008d15961517d8 Mon Sep 17 00:00:00 2001 From: Thibaut GODET Date: Mon, 31 Jul 2023 15:31:32 +0000 Subject: [PATCH 3/4] =?UTF-8?q?[EC-3348]=20Ajouter=20Hosted=20Page=20?= =?UTF-8?q?=C3=A0=20la=20page=20de=20demo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Gateway/Request/Order/HostedPaymentPageRequest.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lib/HiPay/Fullservice/Gateway/Request/Order/HostedPaymentPageRequest.php b/lib/HiPay/Fullservice/Gateway/Request/Order/HostedPaymentPageRequest.php index 44278ef9..87d42ec0 100644 --- a/lib/HiPay/Fullservice/Gateway/Request/Order/HostedPaymentPageRequest.php +++ b/lib/HiPay/Fullservice/Gateway/Request/Order/HostedPaymentPageRequest.php @@ -83,6 +83,11 @@ class HostedPaymentPageRequest extends OrderRequest */ public $multi_use; + /** + * @var string The theme code. + */ + public $theme_code; + /** * @return void */ From 47faf826229c5042d69f8f391fcae4d8105f1a44 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste LOUVET-DANIEL Date: Mon, 31 Jul 2023 17:33:05 +0200 Subject: [PATCH 4/4] 2.13.0 - Bump version --- CHANGELOG.md | 1 + composer.json | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9f77a7ce..21d8653d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ # Changelog ## Version 2.13.0 + - [fix]: Fixed `basket` element in `transaction` object - [add]: Add Hosted Page to demo page diff --git a/composer.json b/composer.json index 56688129..cb5ad36d 100644 --- a/composer.json +++ b/composer.json @@ -13,7 +13,7 @@ "lint": "phpcs -p --standard=PHPCompatibility lib/ tests/" }, "homepage": "https://hipay.com/product-enterprise/", - "version": "2.12.4", + "version": "2.13.0", "license": "Apache-2.0", "authors": [ {