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

Commit

Permalink
Release 1.0.41
Browse files Browse the repository at this point in the history
  • Loading branch information
alejandrososa committed Nov 30, 2022
1 parent 60620aa commit 61afe2a
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 9 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# OXID 4.10

v1.0.40, 2022-11
v1.0.41, 2022-11

This repository contains the OXID wallee payment module that enables the shop to process payments with [wallee](https://www.wallee.com).

Expand All @@ -19,8 +19,8 @@ Support queries can be issued on the [wallee support site](https://app-wallee.co

## Documentation

* [English](https://plugin-documentation.wallee.com/wallee-payment/oxid-4.10/1.0.40/docs/en/documentation.html)
* [English](https://plugin-documentation.wallee.com/wallee-payment/oxid-4.10/1.0.41/docs/en/documentation.html)

## License

Please see the [license file](https://github.com/wallee-payment/oxid-4.10/blob/1.0.40/LICENSE) for more information.
Please see the [license file](https://github.com/wallee-payment/oxid-4.10/blob/1.0.41/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/oxid-4.10/releases/tag/1.0.40/">
<a href="https://github.com/wallee-payment/oxid-4.10/releases/tag/1.0.41/">
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/oxid-4.10/releases/tag/1.0.40/">Download</a> the extension.</p>
<p><a href="https://github.com/wallee-payment/oxid-4.10/releases/tag/1.0.41/">Download</a> the extension.</p>
</li>
<li>
<p>Extract the files and upload them to the <code>modules</code> directory of your store using FTP/SSH.</p>
Expand Down
22 changes: 22 additions & 0 deletions wle/Wallee/Core/WalleeModule.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Wallee\Sdk\Model\TransactionState;
use Wle\Wallee\Core\Provider\Language as LanguageProvider;
use Wle\Wallee\Application\Model\Transaction;
use OxidEsales\EshopCommunity\Core\ShopVersion;

/**
* Class WalleeModule
Expand All @@ -28,6 +29,9 @@
*/
class WalleeModule extends \oxmodule
{
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';
const PAYMENT_PREFIX = 'oxidwle';
/**
Expand Down Expand Up @@ -309,6 +313,9 @@ public function getApiClient($refresh = false)
if ($this->apiClient === null || $refresh) {
$this->apiClient = new ApiClient($this->getSettings()->getUserId(), $this->getSettings()->getAppKey());
$this->apiClient->setBasePath($this->getSettings()->getBaseUrl() . '/api');
foreach (self::getDefaultHeaderData() as $key => $value) {
$this->apiClient->addDefaultHeader($key, $value);
}
if ($this->getSettings()->isLogCommunications()) {
self::log(Logger::DEBUG, 'Enabling logging on ApiClient.');
$this->apiClient->enableDebugging();
Expand Down Expand Up @@ -531,4 +538,19 @@ public static function rollback()
WalleeModule::log(Logger::ERROR, "UNABLE TO ROLLBACK: {$e->getMessage()} - {$e->getTraceAsString()}.");
}
}


/**
* @return array
*/
protected static function getDefaultHeaderData()
{
$shop_version = ShopVersion::getVersion();
[$major_version, $minor_version, $_] = explode('.', $shop_version, 3);
return [
self::SHOP_SYSTEM => 'oxid',
self::SHOP_SYSTEM_VERSION => $shop_version,
self::SHOP_SYSTEM_AND_VERSION => 'oxid-' . $major_version . '.' . $minor_version,
];
}
}
6 changes: 3 additions & 3 deletions wle/Wallee/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# OXID 4.10

v1.0.40, 2022-11
v1.0.41, 2022-11

This repository contains the OXID wallee payment module that enables the shop to process payments with [wallee](https://www.wallee.com).

Expand All @@ -19,8 +19,8 @@ Support queries can be issued on the [wallee support site](https://app-wallee.co

## Documentation

* [English](https://plugin-documentation.wallee.com/wallee-payment/oxid-4.10/1.0.40/docs/en/documentation.html)
* [English](https://plugin-documentation.wallee.com/wallee-payment/oxid-4.10/1.0.41/docs/en/documentation.html)

## License

Please see the [license file](https://github.com/wallee-payment/oxid-4.10/blob/1.0.40/LICENSE) for more information.
Please see the [license file](https://github.com/wallee-payment/oxid-4.10/blob/1.0.41/LICENSE) for more information.
2 changes: 1 addition & 1 deletion wle/Wallee/metadata.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
'en' => 'WLE Wallee Module'
),
'thumbnail' => 'out/pictures/picture.png',
'version' => '1.0.40',
'version' => '1.0.41',
'author' => 'customweb GmbH',
'url' => 'https://www.customweb.com',
'email' => 'info@customweb.com',
Expand Down

0 comments on commit 61afe2a

Please sign in to comment.