Skip to content

Commit

Permalink
Release 1.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewrowanwallee committed Dec 10, 2024
1 parent 7da9a2f commit d0e99f4
Show file tree
Hide file tree
Showing 19 changed files with 41 additions and 24 deletions.
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down
4 changes: 2 additions & 2 deletions docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/weareplanet/prestashop-8/releases/tag/1.0.8/">
<a href="https://github.com/weareplanet/prestashop-8/releases/tag/1.0.9/">
Source
</a>
</li>
Expand All @@ -50,7 +50,7 @@ <h1>
<div class="olist arabic">
<ol class="arabic">
<li>
<p><a href="https://github.com/weareplanet/prestashop-8/releases/tag/1.0.8/">Download</a> the module.</p>
<p><a href="https://github.com/weareplanet/prestashop-8/releases/tag/1.0.9/">Download</a> the module.</p>
</li>
<li>
<p>Login to the backend of your PrestsShop store.</p>
Expand Down
Binary file removed docs/en/resource/method.png
Binary file not shown.
Binary file removed docs/en/resource/settings.png
Binary file not shown.
6 changes: 5 additions & 1 deletion inc/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
}
}

Expand Down
2 changes: 1 addition & 1 deletion views/templates/admin/admin_help_buttons.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,5 @@
<div class="alert alert-info">
<img src="../modules/weareplanet/logo.png" style="float:left; margin-right:15px;" height="50">
<p><strong>{l s='This module requires an %s account.' sprintf='WeArePlanet' mod='weareplanet'}</strong></p>
<p><a class="btn btn-default" href="https://www.weareplanet.com/contact/sales" target="_blank">{l s='Sign Up' mod='weareplanet'}</a> <a class="btn btn-default" href="https://plugin-documentation.weareplanet.com/weareplanet/prestashop-8/1.0.8/docs/en/documentation.html" target="_blank">{l s='Documentation' mod='weareplanet'}</a></p>
<p><a class="btn btn-default" href="https://www.weareplanet.com/contact/sales" target="_blank">{l s='Sign Up' mod='weareplanet'}</a> <a class="btn btn-default" href="https://plugin-documentation.weareplanet.com/weareplanet/prestashop-8/1.0.9/docs/en/documentation.html" target="_blank">{l s='Documentation' mod='weareplanet'}</a></p>
</div>
2 changes: 1 addition & 1 deletion weareplanet-sdk/composer.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "weareplanet/sdk",
"version": "4.4.0",
"version": "4.6.0",
"description": "WeArePlanet SDK for PHP",
"keywords": [
"weareplanet",
Expand Down
4 changes: 2 additions & 2 deletions weareplanet-sdk/lib/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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",
];
Expand All @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions weareplanet-sdk/lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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;
Expand Down
7 changes: 6 additions & 1 deletion weareplanet-sdk/lib/Http/CurlHttpClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion weareplanet-sdk/lib/Service/ChargeFlowService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion weareplanet-sdk/lib/Service/HumanUserService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
4 changes: 2 additions & 2 deletions weareplanet-sdk/lib/Service/TokenService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion weareplanet-sdk/lib/Service/TransactionIframeService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion weareplanet-sdk/lib/Service/TransactionLightboxService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion weareplanet-sdk/lib/Service/TransactionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion weareplanet.php
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down
Binary file modified weareplanet.zip
Binary file not shown.

0 comments on commit d0e99f4

Please sign in to comment.