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

Commit cf4f75d

Browse files
committed
Release 1.0.6
1 parent 238c038 commit cf4f75d

File tree

3 files changed

+15
-11
lines changed

3 files changed

+15
-11
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ This repository contains the OpenCart wallee payment module that enables the sh
1111

1212
## Documentation
1313

14-
* [English](https://plugin-documentation.wallee.com/wallee-payment/opencart-2.0/1.0.5/docs/en/documentation.html)
14+
* [English](https://plugin-documentation.wallee.com/wallee-payment/opencart-2.0/1.0.6/docs/en/documentation.html)
1515

1616
## License
1717

18-
Please see the [license file](https://github.com/wallee-payment/opencart-2.0/blob/1.0.5/LICENSE) for more information.
18+
Please see the [license file](https://github.com/wallee-payment/opencart-2.0/blob/1.0.6/LICENSE) for more information.

docs/en/documentation.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ <h2>Documentation</h2> </div>
2121
</a>
2222
</li>
2323
<li>
24-
<a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.5/">
24+
<a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.6/">
2525
Source
2626
</a>
2727
</li>
@@ -48,7 +48,7 @@ <h1>
4848
<div class="olist arabic">
4949
<ol class="arabic">
5050
<li>
51-
<p><a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.5/">Download</a> the extension.</p>
51+
<p><a href="https://github.com/wallee-payment/opencart-2.0/releases/tag/1.0.6/">Download</a> the extension.</p>
5252
</li>
5353
<li>
5454
<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>

upload/system/library/wallee/service/transaction.php

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ class Transaction extends AbstractService {
1818

1919
public function getPaymentMethods(array $order_info){
2020
$cart_id = \WalleeVersionHelper::getCurrentCartId($this->registry);
21-
if (!$cart_id || !isset(self::$possible_payment_method_cache[$cart_id])) {
21+
if (!$cart_id || !array_key_exists($cart_id, self::$possible_payment_method_cache)) {
2222
$transaction = $this->update($order_info, false);
23-
$payment_methods = $this->getTransactionService()->fetchPossiblePaymentMethods($transaction->getLinkedSpaceId(), $transaction->getId());
24-
25-
foreach ($payment_methods as $payment_method) {
26-
MethodConfiguration::instance($this->registry)->updateData($payment_method);
23+
try{
24+
$payment_methods = $this->getTransactionService()->fetchPossiblePaymentMethods($transaction->getLinkedSpaceId(), $transaction->getId());
25+
foreach ($payment_methods as $payment_method) {
26+
MethodConfiguration::instance($this->registry)->updateData($payment_method);
27+
}
28+
self::$possible_payment_method_cache[$cart_id] = $payment_methods;
29+
}
30+
catch(\Exception $e) {
31+
self::$possible_payment_method_cache[$cart_id] = array();
32+
throw $e;
2733
}
28-
29-
self::$possible_payment_method_cache[$cart_id] = $payment_methods;
3034
}
3135
return self::$possible_payment_method_cache[$cart_id];
3236
}

0 commit comments

Comments
 (0)