Skip to content
This repository has been archived by the owner on Jan 25, 2024. It is now read-only.

Commit

Permalink
Release 1.0.53
Browse files Browse the repository at this point in the history
  • Loading branch information
edgaraswallee committed Nov 29, 2022
1 parent d11f994 commit c2fe6f4
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 7 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ This repository contains the OpenCart wallee payment module that enables the sh

## Documentation

* [English](https://plugin-documentation.wallee.com/wallee-payment/opencart-2.1/1.0.52/docs/en/documentation.html)
* [English](https://plugin-documentation.wallee.com/wallee-payment/opencart-2.1/1.0.53/docs/en/documentation.html)

## Support

Support queries can be issued on the [wallee support site](https://app-wallee.com/space/select?target=/support).

## License

Please see the [license file](https://github.com/wallee-payment/opencart-2.1/blob/1.0.52/LICENSE) for more information.
Please see the [license file](https://github.com/wallee-payment/opencart-2.1/blob/1.0.53/LICENSE) for more information.
4 changes: 2 additions & 2 deletions docs/en/documentation.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/wallee-payment/opencart-2.1/releases/tag/1.0.52/">
<a href="https://github.com/wallee-payment/opencart-2.1/releases/tag/1.0.53/">
Source
</a>
</li>
Expand All @@ -49,7 +49,7 @@ <h1>
<div class="olist arabic">
<ol class="arabic">
<li>
<p><a href="https://github.com/wallee-payment/opencart-2.1/releases/tag/1.0.52/">Download</a> the extension.</p>
<p><a href="https://github.com/wallee-payment/opencart-2.1/releases/tag/1.0.53/">Download</a> the extension.</p>
</li>
<li>
<p>Extract the files and upload the content of the <code>Upload</code> directory into the root directory of your store using FTP/SSH.</p>
Expand Down
4 changes: 2 additions & 2 deletions upload/admin/view/template/payment/wallee.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -257,14 +257,14 @@
<div class="form-group">
<label class="col-sm-2 control-label"><?php echo $entry_version; ?></label>
<div class="col-sm-10">
<p class="form-control-static">1.0.52</p>
<p class="form-control-static">1.0.53</p>
</div>
</div>

<div class="form-group">
<label class="col-sm-2 control-label"><?php echo $entry_date; ?></label>
<div class="col-sm-10">
<p class="form-control-static">2022/10/24 14:51:52</p>
<p class="form-control-static">2022/11/29 17:27:42</p>
</div>
</div>
</fieldset>
Expand Down
26 changes: 25 additions & 1 deletion upload/system/library/wallee/helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
require_once DIR_SYSTEM . '/library/wallee/version_helper.php';

class WalleeHelper {


const SHOP_SYSTEM = 'x-meta-shop-system';
const SHOP_SYSTEM_VERSION = 'x-meta-shop-system-version';
const SHOP_SYSTEM_AND_VERSION = 'x-meta-shop-system-and-version';

const FALLBACK_LANGUAGE = 'en-US';
/**
*
Expand Down Expand Up @@ -455,8 +461,11 @@ public function getApiClient(){

public function refreshApiClient(){
$this->apiClient = new Wallee\Sdk\ApiClient($this->registry->get('config')->get('wallee_user_id'),
$this->registry->get('config')->get('wallee_application_key'));
$this->registry->get('config')->get('wallee_application_key'));
$this->apiClient->setBasePath(self::getBaseUrl() . "/api");
foreach (self::getDefaultHeaderData() as $key => $value) {
$this->apiClient->addDefaultHeader($key, $value);
}
if ($this->registry->get('config')->get('wallee_log_level') >= self::LOG_DEBUG) {
$this->apiClient->enableDebugging();
$this->apiClient->setDebugFile(DIR_LOGS . "wallee_communication.log");
Expand Down Expand Up @@ -770,4 +779,19 @@ public static function mergeArray(array $first, array $second){
}
return $result;
}


/**
* @return array
*/
protected static function getDefaultHeaderData()
{
$shop_version = VERSION;
[$major_version, $minor_version, $_] = explode('.', $shop_version, 3);
return [
self::SHOP_SYSTEM => 'opencart-3',
self::SHOP_SYSTEM_VERSION => $shop_version,
self::SHOP_SYSTEM_AND_VERSION => 'opencart-' . $major_version . '.' . $minor_version,
];
}
}

0 comments on commit c2fe6f4

Please sign in to comment.