Gerard G. Posted June 26, 2015 Share Posted June 26, 2015 (edited) Greetings, Iam writing a mobile app using prestashop websevice. I am able to createorders by doing the following: -requesting orders/?scheme=blank -filling all the required fields in the blank scheme - sending POST request with the order The orders are created successfully and are shown in the back office and the api. However,they always get a state of 12 (payment approved) which is not right,because for this store that process has to be done manually. <current_state xlink:href="http://store.sofusd.com/api/order_states/12" notFilterable="true">12</current_state> I am trying to set the state to other values before sending the order, newOrder=string.gsub(newOrder, "<current_state.-></current_state>", "<current_state>".. state .."</current_state>") but the response to the POST reuest always contains no state <current_state xlink:href="http://store.sofusd.com/api/order_states/" notFilterable="true"></current_state> (No matter what I send it continues showing a state of 12 in the back office) I appreciate any help, thanks a lot. Edit: I am able to change the current_state afterwards through a PUT request, however the user has already received an e-mail with the subject "Payment confirmed", so I still need to solve this. Edited June 26, 2015 by Gerard G. (see edit history) 1 Link to comment Share on other sites More sharing options...
anapinto Posted May 2, 2016 Share Posted May 2, 2016 Hello. do you found a solution? I have the same problem. Thanks Greetings, Iam writing a mobile app using prestashop websevice. I am able to createorders by doing the following: -requesting orders/?scheme=blank -filling all the required fields in the blank scheme - sending POST request with the order The orders are created successfully and are shown in the back office and the api. However,they always get a state of 12 (payment approved) which is not right,because for this store that process has to be done manually. <current_state xlink:href="http://store.sofusd.com/api/order_states/12" notFilterable="true">12</current_state> I am trying to set the state to other values before sending the order, newOrder=string.gsub(newOrder, "<current_state.-></current_state>", "<current_state>".. state .."</current_state>") but the response to the POST reuest always contains no state <current_state xlink:href="http://store.sofusd.com/api/order_states/" notFilterable="true"></current_state> (No matter what I send it continues showing a state of 12 in the back office) I appreciate any help, thanks a lot. Edit: I am able to change the current_state afterwards through a PUT request, however the user has already received an e-mail with the subject "Payment confirmed", so I still need to solve this. Link to comment Share on other sites More sharing options...
Gerard G. Posted May 2, 2016 Author Share Posted May 2, 2016 (edited) Hello. do you found a solution? I have the same problem. Thanks I'm sorry, I never found why this was happening, and have since stopped working on it. Edited May 2, 2016 by Gerard G. (see edit history) 1 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