Jump to content

Send purchase data via POST to an external CGI file (payment gateway)


Recommended Posts

I am integrating a new payment method in my shop, which should send some parameters via POST to a CGI file.
I have almost everything working, except the part where I send post parameters via the CGI file.
One of these parameters is the number of the order. The problem is that I understand that the order number is created when you press the button "Confirm my order" in the function postprocess () the file validation.php
Someone could give me an idea of ​​how to do? Any hook or function where you need to make the shipment of these parameters via POST.
In summary:
By clicking the button "Place my order" in the shopping cart, the purchase sends some parameters (such as the order number (to an external file in the CGI pasarelade payment.
After the whole process is done on that platform, receives a response that redirects to the confirmation page Prestashop (index.php?controller=order-confirmation, etc ....)
Any ideas or suggestions of how to send this data via POST to CGI file when clicking "Put my order"?



Edited by nachosarmiento (see edit history)
Link to comment
Share on other sites

I saw someone asking a similar question the other day here, basically they wanted to hook when the order was made. Order extends ObjectModel so it gets all the CRUD hooks by default. You should be able to add a hook for that:




The OP in that thread couldn't make use of the solution because he was using 1.3, as the OrderModel hooks are supported 1.5+ only




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