Skip to content

Commit

Permalink
Release 1.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
sbossert committed Nov 21, 2018
1 parent 8df5181 commit fc3a215
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 11 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ This repository contains the OpenCart PostFinance Checkout payment module that

## Documentation

* [English](https://plugin-documentation.postfinance-checkout.ch/pfpayments/opencart-2.1/1.0.5/docs/en/documentation.html)
* [English](https://plugin-documentation.postfinance-checkout.ch/pfpayments/opencart-2.1/1.0.6/docs/en/documentation.html)

## License

Please see the [license file](https://github.com/pfpayments/opencart-2.1/blob/1.0.5/LICENSE) for more information.
Please see the [license file](https://github.com/pfpayments/opencart-2.1/blob/1.0.6/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 @@ -21,7 +21,7 @@ <h2>Documentation</h2> </div>
</a>
</li>
<li>
<a href="https://github.com/pfpayments/opencart-2.1/releases/tag/1.0.5/">
<a href="https://github.com/pfpayments/opencart-2.1/releases/tag/1.0.6/">
Source
</a>
</li>
Expand All @@ -48,7 +48,7 @@ <h1>
<div class="olist arabic">
<ol class="arabic">
<li>
<p><a href="https://github.com/pfpayments/opencart-2.1/releases/tag/1.0.5/">Download</a> the extension.</p>
<p><a href="https://github.com/pfpayments/opencart-2.1/releases/tag/1.0.6/">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
18 changes: 11 additions & 7 deletions upload/system/library/postfinancecheckout/service/transaction.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,19 @@ class Transaction extends AbstractService {

public function getPaymentMethods(array $order_info){
$cart_id = \PostFinanceCheckoutVersionHelper::getCurrentCartId($this->registry);
if (!$cart_id || !isset(self::$possible_payment_method_cache[$cart_id])) {
if (!$cart_id || !array_key_exists($cart_id, self::$possible_payment_method_cache)) {
$transaction = $this->update($order_info, false);
$payment_methods = $this->getTransactionService()->fetchPossiblePaymentMethods($transaction->getLinkedSpaceId(), $transaction->getId());

foreach ($payment_methods as $payment_method) {
MethodConfiguration::instance($this->registry)->updateData($payment_method);
try{
$payment_methods = $this->getTransactionService()->fetchPossiblePaymentMethods($transaction->getLinkedSpaceId(), $transaction->getId());
foreach ($payment_methods as $payment_method) {
MethodConfiguration::instance($this->registry)->updateData($payment_method);
}
self::$possible_payment_method_cache[$cart_id] = $payment_methods;
}
catch(\Exception $e) {
self::$possible_payment_method_cache[$cart_id] = array();
throw $e;
}

self::$possible_payment_method_cache[$cart_id] = $payment_methods;
}
return self::$possible_payment_method_cache[$cart_id];
}
Expand Down

0 comments on commit fc3a215

Please sign in to comment.