From da3d17521c772fcb45fdbcbb8bdb8d4dcf66c60c Mon Sep 17 00:00:00 2001 From: Frankie Date: Mon, 25 Mar 2024 15:46:12 +0100 Subject: [PATCH] Auto stash before merge of "master" and "origin/master" --- CHANGELOG.md | 3 +++ Controller/Redirect/Index.php | 5 +++-- composer.json | 2 +- etc/module.xml | 2 +- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85858cb..07ea802 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,9 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/). +## 2.2.1 +- Improved order management flow for 'PENDING' and 'CANCELLED' payments + ## 2.2.0 - Change flow for PENDING payments coming from Satispay API - diff --git a/Controller/Redirect/Index.php b/Controller/Redirect/Index.php index 3360a9b..578d616 100644 --- a/Controller/Redirect/Index.php +++ b/Controller/Redirect/Index.php @@ -40,12 +40,13 @@ public function execute() $this->_redirect('checkout/onepage/success'); return; } - if ($satispayPayment->status == 'PENDING') { + + if ($satispayPayment->status == 'PENDING') { $satispayCancel = \SatispayGBusiness\Payment::update($paymentId, [ 'action' => 'CANCEL', ]); - + if ($satispayCancel->status === 'CANCELED') { $order->registerCancellation(__('Payment has been cancelled.')); diff --git a/composer.json b/composer.json index c94f946..7e0b0ce 100644 --- a/composer.json +++ b/composer.json @@ -3,7 +3,7 @@ "description": "Satispay Magento2 Plugin", "type": "magento2-module", "license": "MIT", - "version": "2.2.0", + "version": "2.2.1", "keywords": [ "satispay", diff --git a/etc/module.xml b/etc/module.xml index 485c7bb..a1fbe43 100644 --- a/etc/module.xml +++ b/etc/module.xml @@ -1,6 +1,6 @@ - +