Create Refund And Capture Function In Payment Gateway Addon

I'm currenly create a new payment gateway and i want to add refund and capture funtions to my addon.

My purpose is create button capture and refund in order which was created by my payment gateway and submit it with ajax.

I can't find much document so i 'm glad if you give me some help to create these function.

Thank you in advance!

Actually there is no universal solution as each payment gateway has its own api, way of integration, documentation, e.t.c.

We suggest you to examine the integration manual of the necessary payment gateway at first. Then check the following docs: