Skip to content

Commit

Permalink
Redirect failed orders to cart details page (#28)
Browse files Browse the repository at this point in the history
  • Loading branch information
BushraAsif authored Nov 10, 2020
1 parent 6326559 commit 89579c3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Controller/Index/Fail.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public function execute()
$msg = $e->getMessage();
}

if ($status == 'failed' || $status == 'error') {
if ($status == 'failed' || $status == 'error' || $status == 'cancelled') {
$resultRedirect = $this->prepareRedirect('checkout/cart', [], $msg);
} else {
$resultRedirect = $this->prepareRedirect('checkout', ['_fragment' => 'payment'], $msg);
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ web shop.

== Change log ==

** Version 2.0.1

* Improvements:
- Redirect failed orders to cart details page

** Version 2.0.0

* Improvements:
Expand Down
2 changes: 1 addition & 1 deletion etc/module.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
-->

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="SDM_Altapay" setup_version="2.0.0">
<module name="SDM_Altapay" setup_version="2.0.1">
</module>
</config>

0 comments on commit 89579c3

Please sign in to comment.