2

I have created the Payment gateway and it's ok, already sending payments, etc. Now I want to all the orders that were created through this gateway to have a Custom Refund (Credit Memo) button in the System Admin panel.

This refund will send to my custom API that does the refund of my payment (in the same system, but different API endpoint).

1

Well after struggle a lot with the system I discovered how...

First we need to have an invoice and a transaction for that invoice. So probably you will want your gateway payment to have authorize or authorize and capture.

Having an invoice, and after paid itself, you can go to invoice and you will have a Refund button, instead the Refund Offline only. So you will implement the method refund() in your extended Payment Model object and voit la.

If you need further details of the code please ask me and will be happy to explain! :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.