Jump to content

Integration of refund in heartland payment gateway


Recommended Posts

Hi,

 

I want to know how the refund works with heartland payment gateway. I had integrated heartland payment gateway module in prestashop 1.6, refund is there in prestashop backoffice. My question is that should I have to make changes in the existing module to add refund feature.

 

Anyone who had worked with heartland payment gateway please help regarding this issue.

Link to comment
Share on other sites

@slogsdon-heartland Thank you for your reply. Yes, I understand the module has no support but there are APIs available in heartland website so that we can built refund module. Right now I am out of idea how I can do, what will be the workflow? The problem I am not understand regarding how prestashop refund in backend can be related to this>?

Link to comment
Share on other sites

The module would need to be updated to provide the functionality of calling their refund API, if you are not familiar with PHP coding and Prestashop modular design, then you likely are going to have to hire someone, or wait until the module author includes this functionality.

 

You might consider posting in the paid jobs forum.  I would anticipate 2-3 hours of development and testing to implement this.

Link to comment
Share on other sites

You can build your module if you want, or you can update the existing module.  There are pros and cons of either approach, I'll let you determine that.

 

Most modules use the hook system of Prestashop, which allows you to react to certain events.  However I do not see a refund hook.  So 2 possible options

1) You can review the Paypal module code and try to replicate how they do it.  The Paypal module uses the ActionOrderStatusUpdate hook, and then checks if the order status was changed to Refund.  If so, the module then uses the Paypal API to refund

 

2) You can use the DisplayAdminOrder hook, which would allow you to add your own custom functions to the Order Details page in the back office.  This way you can add your own Refund button and when pressed you can execute your own code in your module to call the heartland API.  This is the way I add refund functionality to my payment modules.

 

There are likely other ways too

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...

@bellini13

1) You can review the Paypal module code and try to replicate how they do it.  The Paypal module uses the ActionOrderStatusUpdate hook, and then checks if the order status was changed to Refund.  If so, the module then uses the Paypal API to refund

 

I had checked the paypal module and it seems it has no refund option in free module, so I am unable to replicate the module.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...