diff --git a/README.md b/README.md
index f7d85de..b952b26 100644
--- a/README.md
+++ b/README.md
@@ -1,26 +1,34 @@
# PrestaShop 8 WeArePlanet Integration
This repository contains the PrestaShop WeArePlanet payment module that enables the shop to process payments with [WeArePlanet](https://www.weareplanet.com/).
-## To install module manually by dragging up zip file, please download [.zip archive](https://plugin-documentation.weareplanet.com/weareplanet/prestashop-8/1.0.8/weareplanet.zip) of module with correct structure required by Prestashop installation
+To install module manually by dragging up zip file, please download [.zip archive](https://plugin-documentation.weareplanet.com/weareplanet/prestashop-8/1.0.9/weareplanet.zip) of module with correct structure required by Prestashop installation
##### To use this extension, a [WeArePlanet](https://www.weareplanet.com/contact/sales) account is required.
## Requirements
* [PrestaShop](https://www.prestashop.com/) 8
-* [PHP](http://php.net/) 8.1 or later
+* [PHP](http://php.net/) 8.1 (minimum PHP version supported by Prestashop 8 version)
## Documentation
-* [English](https://plugin-documentation.weareplanet.com/weareplanet/prestashop-8/1.0.8/docs/en/documentation.html)
+* [English](https://plugin-documentation.weareplanet.com/weareplanet/prestashop-8/1.0.9/docs/en/documentation.html)
## Support
Support queries can be issued on the [WeArePlanet support site](https://paymentshub.weareplanet.com/space/select?target=/support).
+## Supported versions
+
+____________________________________________________________________________
+| Prestashop 8 version | Plugin major version | Supported until |
+|------------------------|------------------------|------------------------|
+| 8.0.x - 8.2.x | 1.x | Further notice |
+----------------------------------------------------------------------------
+
## License
-Please see the [license file](https://github.com/weareplanet/prestashop-8/blob/1.0.8/LICENSE) for more information.
+Please see the [license file](https://github.com/weareplanet/prestashop-8/blob/1.0.9/LICENSE) for more information.
## Other PrestaShop Versions
diff --git a/docs/en/documentation.html b/docs/en/documentation.html
index ea69ea2..b3eeef1 100644
--- a/docs/en/documentation.html
+++ b/docs/en/documentation.html
@@ -23,7 +23,7 @@
Documentation
-
+
Source
@@ -50,7 +50,7 @@
-
-
Download the module.
+Download the module.
-
Login to the backend of your PrestsShop store.
diff --git a/docs/en/resource/method.png b/docs/en/resource/method.png
deleted file mode 100644
index 1c17ac0..0000000
Binary files a/docs/en/resource/method.png and /dev/null differ
diff --git a/docs/en/resource/settings.png b/docs/en/resource/settings.png
deleted file mode 100644
index c6c8bf2..0000000
Binary files a/docs/en/resource/settings.png and /dev/null differ
diff --git a/inc/Helper.php b/inc/Helper.php
index b773a46..819c1dc 100644
--- a/inc/Helper.php
+++ b/inc/Helper.php
@@ -81,7 +81,11 @@ public static function commitDBTransaction()
if ($dbLink instanceof mysqli) {
$dbLink->commit();
} elseif ($dbLink instanceof PDO) {
- $dbLink->commit();
+ try {
+ $dbLink->commit();
+ } catch (Exception $e) {
+ // catch exception
+ }
}
}
diff --git a/views/templates/admin/admin_help_buttons.tpl b/views/templates/admin/admin_help_buttons.tpl
index 3e8ac6d..9cc037d 100644
--- a/views/templates/admin/admin_help_buttons.tpl
+++ b/views/templates/admin/admin_help_buttons.tpl
@@ -10,5 +10,5 @@
\ No newline at end of file
diff --git a/weareplanet-sdk/composer.json b/weareplanet-sdk/composer.json
index e21942b..d8975f3 100644
--- a/weareplanet-sdk/composer.json
+++ b/weareplanet-sdk/composer.json
@@ -1,6 +1,6 @@
{
"name": "weareplanet/sdk",
- "version": "4.4.0",
+ "version": "4.6.0",
"description": "WeArePlanet SDK for PHP",
"keywords": [
"weareplanet",
diff --git a/weareplanet-sdk/lib/ApiClient.php b/weareplanet-sdk/lib/ApiClient.php
index 92fc3ed..61c3367 100644
--- a/weareplanet-sdk/lib/ApiClient.php
+++ b/weareplanet-sdk/lib/ApiClient.php
@@ -48,7 +48,7 @@ final class ApiClient {
* @var array
*/
private $defaultHeaders = [
- 'x-meta-sdk-version' => "4.4.0",
+ 'x-meta-sdk-version' => "4.6.0",
'x-meta-sdk-language' => 'php',
'x-meta-sdk-provider' => "WeArePlanet",
];
@@ -58,7 +58,7 @@ final class ApiClient {
*
* @var string
*/
- private $userAgent = 'PHP-Client/4.4.0/php';
+ private $userAgent = 'PHP-Client/4.6.0/php';
/**
* The path to the certificate authority file.
diff --git a/weareplanet-sdk/lib/Configuration.php b/weareplanet-sdk/lib/Configuration.php
index 853a44d..a6759fa 100644
--- a/weareplanet-sdk/lib/Configuration.php
+++ b/weareplanet-sdk/lib/Configuration.php
@@ -80,7 +80,7 @@ class Configuration
*
* @var string
*/
- protected $userAgent = 'WeArePlanet\Sdk/4.4.0/php';
+ protected $userAgent = 'WeArePlanet\Sdk/4.6.0/php';
/**
* Debug switch (default set to false)
@@ -388,8 +388,8 @@ public static function toDebugReport()
$report = 'PHP SDK (WeArePlanet\Sdk) Debug Report:' . PHP_EOL;
$report .= ' OS: ' . php_uname() . PHP_EOL;
$report .= ' PHP Version: ' . PHP_VERSION . PHP_EOL;
- $report .= ' OpenAPI Spec Version: 4.4.0' . PHP_EOL;
- $report .= ' SDK Package Version: 4.4.0' . PHP_EOL;
+ $report .= ' OpenAPI Spec Version: 4.6.0' . PHP_EOL;
+ $report .= ' SDK Package Version: 4.6.0' . PHP_EOL;
$report .= ' Temp Folder Path: ' . self::getDefaultConfiguration()->getTempFolderPath() . PHP_EOL;
return $report;
diff --git a/weareplanet-sdk/lib/Http/CurlHttpClient.php b/weareplanet-sdk/lib/Http/CurlHttpClient.php
index 670836d..7f51581 100644
--- a/weareplanet-sdk/lib/Http/CurlHttpClient.php
+++ b/weareplanet-sdk/lib/Http/CurlHttpClient.php
@@ -183,7 +183,12 @@ public function send(ApiClient $apiClient, HttpRequest $request): HttpResponse {
* @return HttpResponse
* @throws ConnectionException
*/
- private function handleResponse(ApiClient $apiClient, HttpRequest $request, \CurlHandle $curl, string|bool $curlResponse, string $url): HttpResponse {
+ private function handleResponse(ApiClient $apiClient, HttpRequest $request, $curl, $curlResponse, string $url): HttpResponse {
+ // Remove this check once PHP 7.4 is not supported anymore and this can be set in the arguments:
+ if (!is_string($curlResponse) && !is_bool($curlResponse)) {
+ throw new ConnectionException($url, $request->getLogToken(), "API call response was not bool or string.");
+ }
+
$httpHeaderSize = curl_getinfo($curl, CURLINFO_HEADER_SIZE);
// Handle the case where $curlResponse is false (indicating an error)
diff --git a/weareplanet-sdk/lib/Service/ChargeFlowService.php b/weareplanet-sdk/lib/Service/ChargeFlowService.php
index 09260c6..de46b4c 100644
--- a/weareplanet-sdk/lib/Service/ChargeFlowService.php
+++ b/weareplanet-sdk/lib/Service/ChargeFlowService.php
@@ -443,7 +443,7 @@ public function fetchChargeFlowPaymentPageUrlWithHttpInfo($space_id, $id) {
}
// header params
$headerParams = [];
- $headerAccept = $this->apiClient->selectHeaderAccept(['text/plain;charset=utf-8', 'application/json']);
+ $headerAccept = $this->apiClient->selectHeaderAccept(['application/json', 'text/plain;charset=utf-8']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
diff --git a/weareplanet-sdk/lib/Service/HumanUserService.php b/weareplanet-sdk/lib/Service/HumanUserService.php
index d317972..afc85f0 100644
--- a/weareplanet-sdk/lib/Service/HumanUserService.php
+++ b/weareplanet-sdk/lib/Service/HumanUserService.php
@@ -414,7 +414,7 @@ public function exportWithHttpInfo($request) {
}
// header params
$headerParams = [];
- $headerAccept = $this->apiClient->selectHeaderAccept(['text/csv', 'application/json;charset=utf-8']);
+ $headerAccept = $this->apiClient->selectHeaderAccept(['application/json;charset=utf-8', 'text/csv']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
diff --git a/weareplanet-sdk/lib/Service/TokenService.php b/weareplanet-sdk/lib/Service/TokenService.php
index b465276..9c67c1a 100644
--- a/weareplanet-sdk/lib/Service/TokenService.php
+++ b/weareplanet-sdk/lib/Service/TokenService.php
@@ -521,7 +521,7 @@ public function createTokenWithHttpInfo($space_id, $transaction_id) {
/**
* Operation createTokenBasedOnTransaction
*
- * Create Token Based On Transaction
+ * Create Token Based On Transaction And Fill It With Stored Payment Information
*
* @param int $space_id (required)
* @param int $transaction_id The id of the transaction for which we want to create the token. (required)
@@ -537,7 +537,7 @@ public function createTokenBasedOnTransaction($space_id, $transaction_id) {
/**
* Operation createTokenBasedOnTransactionWithHttpInfo
*
- * Create Token Based On Transaction
+ * Create Token Based On Transaction And Fill It With Stored Payment Information
*
* @param int $space_id (required)
diff --git a/weareplanet-sdk/lib/Service/TransactionIframeService.php b/weareplanet-sdk/lib/Service/TransactionIframeService.php
index 0c7eb9d..c415f90 100644
--- a/weareplanet-sdk/lib/Service/TransactionIframeService.php
+++ b/weareplanet-sdk/lib/Service/TransactionIframeService.php
@@ -106,7 +106,7 @@ public function javascriptUrlWithHttpInfo($space_id, $id) {
}
// header params
$headerParams = [];
- $headerAccept = $this->apiClient->selectHeaderAccept(['text/plain;charset=utf-8', 'application/json']);
+ $headerAccept = $this->apiClient->selectHeaderAccept(['application/json', 'text/plain;charset=utf-8']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
diff --git a/weareplanet-sdk/lib/Service/TransactionLightboxService.php b/weareplanet-sdk/lib/Service/TransactionLightboxService.php
index 44e20dd..2b1373e 100644
--- a/weareplanet-sdk/lib/Service/TransactionLightboxService.php
+++ b/weareplanet-sdk/lib/Service/TransactionLightboxService.php
@@ -106,7 +106,7 @@ public function javascriptUrlWithHttpInfo($space_id, $id) {
}
// header params
$headerParams = [];
- $headerAccept = $this->apiClient->selectHeaderAccept(['text/plain;charset=utf-8', 'application/json']);
+ $headerAccept = $this->apiClient->selectHeaderAccept(['application/json', 'text/plain;charset=utf-8']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
diff --git a/weareplanet-sdk/lib/Service/TransactionPaymentPageService.php b/weareplanet-sdk/lib/Service/TransactionPaymentPageService.php
index c97b6b4..7a17182 100644
--- a/weareplanet-sdk/lib/Service/TransactionPaymentPageService.php
+++ b/weareplanet-sdk/lib/Service/TransactionPaymentPageService.php
@@ -106,7 +106,7 @@ public function paymentPageUrlWithHttpInfo($space_id, $id) {
}
// header params
$headerParams = [];
- $headerAccept = $this->apiClient->selectHeaderAccept(['text/plain;charset=utf-8', 'application/json']);
+ $headerAccept = $this->apiClient->selectHeaderAccept(['application/json', 'text/plain;charset=utf-8']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
diff --git a/weareplanet-sdk/lib/Service/TransactionService.php b/weareplanet-sdk/lib/Service/TransactionService.php
index f71047b..5e536c0 100644
--- a/weareplanet-sdk/lib/Service/TransactionService.php
+++ b/weareplanet-sdk/lib/Service/TransactionService.php
@@ -673,7 +673,7 @@ public function exportWithHttpInfo($space_id, $request) {
}
// header params
$headerParams = [];
- $headerAccept = $this->apiClient->selectHeaderAccept(['text/csv', 'application/json;charset=utf-8']);
+ $headerAccept = $this->apiClient->selectHeaderAccept(['application/json;charset=utf-8', 'text/csv']);
if (!is_null($headerAccept)) {
$headerParams[HttpRequest::HEADER_KEY_ACCEPT] = $headerAccept;
}
diff --git a/weareplanet.php b/weareplanet.php
index 45aaa24..67195ae 100644
--- a/weareplanet.php
+++ b/weareplanet.php
@@ -32,7 +32,7 @@ public function __construct()
$this->author = 'wallee AG';
$this->bootstrap = true;
$this->need_instance = 0;
- $this->version = '1.0.8';
+ $this->version = '1.0.9';
$this->displayName = 'WeArePlanet';
$this->description = $this->l('This PrestaShop module enables to process payments with %s.');
$this->description = sprintf($this->description, 'WeArePlanet');
diff --git a/weareplanet.zip b/weareplanet.zip
index f8a8c60..9210d08 100644
Binary files a/weareplanet.zip and b/weareplanet.zip differ