afifjawhary Posted November 16, 2015 Share Posted November 16, 2015 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 More sharing options...
NemoPS Posted November 16, 2015 Share Posted November 16, 2015 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 oneYou would just need a bridge file that your mobile app can call using POST Link to comment Share on other sites More sharing options...
tinhyeuphonui Posted March 23, 2016 Share Posted March 23, 2016 Hi Nemo1, Can you give me an example ? Thanks advances ! Link to comment Share on other sites More sharing options...
astriti Posted December 19, 2016 Share Posted December 19, 2016 Yes can u give us an example plss Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now