Jump to content

Need to redirect to another website when Payment is accepted


Recommended Posts

Once the payment is accepted, I need to send a request for an ebook to another website.  I have a module that will do this within my main website wherein my store resides.  Need help to determine where in PrestaShop I would put the call to a module that would call outside the store.

 

Link to comment
Share on other sites

You would likely want to use the actionvalidateorder hook.  This hook will be triggered once for each new order created.  You can then send a remote request.

 

Just bear in mind that if your remote request fails, or takes a long time, then the Order creation may fail, and the customer will see an error.  So make sure you design/program to deal with those types of errors.

Link to comment
Share on other sites

Since I only want to do this if the order status is payment accepted, would I use actionPaymentConfirmation?

Also, where would I put this hook?

 

You can use any hook you want to use.  You put the hook in your module.  There is a complete developers guide in the Learn > Documentation menu above

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...