Jump to content

Create Order from Mobile API

Recommended Posts

Dear Prestashop team,


Kindly I want to know the best practice to create an order using the rest API to use on mobile. I have in my mind two solutions to do that:


1- Following the work flow of the saving of order and check which tables in the database are affected and then use these tables to add a new order

2- I have checked the core code of Prestashop and found that there is a function save for orders, is this function the exact function to add the whole procedure from add to cart till reaching the payment gateway url?


Please i appreciate if you can guide me to select the best practical solution in order to do so.


Thank you in advance,

Link to comment
Share on other sites

I would create something custom, following these steps:
1- create a cart with the products, using the parameters you send over

2- send over some identifier for the payment method

3- instantiate the payment module, and call ValidateOrder to create a new one

You would just need a bridge file that your mobile app can call using POST

Link to comment
Share on other sites

  • 4 months later...
  • 8 months later...

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