binshops / prestashop-rest

PrestaShop REST API module to expose your PrestaShop website's REST endpoints
https://www.binshops.com/prestashop-api
Academic Free License v3.0
95 stars 33 forks source link

How to pass an order after checkout #29

Closed amirping closed 2 years ago

amirping commented 2 years ago

Hello there

we are using the pro version, and it is going well so far, but we can't find to validate a cart into order after setting a carrier & address.

samberrry commented 2 years ago

Hello there

we are using the pro version, and it is going well so far, but we can't find to validate a cart into order after setting a carrier & address.

Hello, thank you. Yes we do not have any a separate API for validateOrder, because it should happen within payment APIs and payment modules. However, if you just want to call API to place order, you can use bankwire or paybycheck endpoints.

amirping commented 2 years ago

Well let me explain the case, the current PrestaShop store doesn't have any online payment solution, all payments are made on delivery. we followed the documentation : 1- create a cart 2- set address 3- set carrier 4- how we can submit now? we see that there is an API under Admin API there is create order API, but I don't believe that's for users.

samberrry commented 2 years ago

Well let me explain the case, the current PrestaShop store doesn't have any online payment solution, all payments are made on delivery. we followed the documentation : 1- create a cart 2- set address 3- set carrier 4- how we can submit now? we see that there is an API under Admin API there is create order API, but I don't believe that's for users.

No you should not use the Admin API, that's for accepting orders from outside of the system, you are correct it's not for users. As I said it should be done through a payment module, you can simply have an API to to just call validateOrder method, or we can simply add support for COD module, so you can do your payments through COD module.

amirping commented 2 years ago

It will be awesome if we have COD support, in meantime, I will try to create some API to call validateOrder.

samberrry commented 2 years ago

It will be awesome if we have COD support, in meantime, I will try to create some API to call validateOrder.

I added COD support to v2.4.4 version. You can check it.

amirping commented 2 years ago

Thanks buddy 😚 is it included in the pro version?

samberrry commented 2 years ago

Thanks buddy 😚 is it included in the pro version?

welcome ;) We will add it soon.

samberrry commented 2 years ago

Pro version is also updated. So, I close this issue.