Magento 2 Order Cancel payment command override

740 Views Asked by At

I am having troubles implementing cancel payment in my Magento 2 module.

All payment methods I have created support capture, refund, authorize etc.. Each of these has their respective command and logic. But when I try to implement cancel (or maybe void) the Magento seems to ignore my commands. Are they called somehow else?

config.xml has can_cancel set to 1

di.xml has the command cancel bound to the command pool for the particular payment method

What is the command to call? Or how to implement cancel so that it cancels the payment at the payment service provider as well?

0

There are 0 best solutions below