Jump to content

How To Create Capture And Refund Button In A Order Transaction


Recommended Posts

Posted

You'd have to change the core to add that functionality as you've shown in the screenshot. Alternatively, you could create a plugin and do it from a separate location.

Posted

You'd have to change the core to add that functionality as you've shown in the screenshot. Alternatively, you could create a plugin and do it from a separate location.

if we change transaction to refund , it does not execute the refund function in gateway ?

Posted

if we change transaction to refund , it does not execute the refund function in gateway ?

 

If the payment was charged using a gateway, and the gateway supports refunds, then you'll have a checkbox option available that will refund it using the gateway. For example, it might say, "Process this status change with the payment gateway (Stripe)".

Posted

Hi Tyson,

 

So, how can i create a plugin to integrate both capture and refund button in a order?

 

Can you help me create a example plugin to i can follow it?

 

Thanks,

Phong

Posted

I can't create you an example plugin of a capture/refund. This is something you will need to create using your skills as a developer. And how best to do that is up to you.

 

I would suggest making use of the Payments::authorizePayment and Payments::capturePayment model methods which will call your merchant gateway's authorizeCc and captureCc methods.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...