maksuturva / magento2_payment_module

Svea Payment module for Magento 2
Other
4 stars 13 forks source link

Fix/maksu 42 cancel action fix #8

Closed miikavai closed 4 years ago

miikavai commented 4 years ago

MAKSU-42

PROBLEM: When user cancels order and is returned back to cancel action, cancellation always fails. Order is not canceled and user is redirected to cart via error action.

EXPECTED RESULT: When user cancels order and is returned back to cancel action, cancellation is successful: order is cancelled and user is returned to shopping cart with proper error message

CHANGES INTRODUCED:

miikavai commented 4 years ago

There seems to be also helper method used in the module to unserialize payment additional data, json_decode($payment->getAdditionalData(), true) could be changed to that: $this->getHelper()->getPaymentAdditionData($payment)