Closed MuhammadMuzammilSharif closed 5 years ago
We currently don't support manual payments (such as cash on delivery) in the Storefront API. The .checkoutCompleteFree mutation is used only for completing a checkout that doesn't cost anything - it must be free.
We are tracking this issue in our backlog. Sorry for the inconvenience.
We are also in same situation. We have this feature available in desktop and Mobile web and not able to achieve it in Mobile app. It would be great If you get this feature nearby.
Do you have any plan to expose this feature in mobile SDK. When can we expect the same.
We definitely have plans to expose this functionality, although I don't have a timeline for you yet.
@rebeccajfriedman any followup on this?
Unfortunately, we haven't been able to add this functionality yet. Sorry for the delay!
@rebeccajfriedman Thank you for the response. Just to confirm, there is no way for programmatically create an order with manual payment method?
Not at this time using the Storefront API. You could use the Admin API to create a draft order. Draft orders can be paid with COD.
See mutations list for Admin API: https://help.shopify.com/en/api/graphql-admin-api/reference/mutation/draftordercreate
Many thanks for the direction, appreciate it! Just the last followup question: when you say "Draft orders can be paid with COD", can you point to the mutation that works with that? I shuffled through draftOrderComplete
and a few others, but none mentions manual payments as an option.
I ahven't tried this programmatically, but I would suggest sending paymentPending: false
Hey 👋, it seems like using the Admin API from a user-land app is terribly unsafe. Even if we restrict the API key to only mess with orders, if someone ever gets that API key, he'll be free to create/delete/update any order.
Aren't there any solutions/safer workarounds?
Yes, you should never use admin API in the frontend. And yes there is a way.
You create your own backend that connects to Shopify. From your frontend, you talk to your backend for orders.
Terrible, I know. I just implemented this and it will take a lot of your time. :-)
On Fri, Sep 27, 2019, 12:20 AM Flavian Desverne notifications@github.com wrote:
Hey 👋, it seems like using the Admin API from a user-land app is terribly unsafe. Even if we restrict the API key to only mess with orders, if someone ever gets that API key, he'll be free to create/delete/update any order.
Aren't there any solutions/safer workarounds?
— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Shopify/mobile-buy-sdk-android/issues/581?email_source=notifications&email_token=ABCB4B2NTOIMYMUZK2NBEEDQLTONBA5CNFSM4GFKZII2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD7WEYXQ#issuecomment-535579742, or mute the thread https://github.com/notifications/unsubscribe-auth/ABCB4B42RGRQJW3DITW4BU3QLTONBANCNFSM4GFKZIIQ .
Does it fixed now? I am also having same issue in this mutation. checkoutCompleteFree error "Payment is required"
@rebeccajfriedman any update on this? Is there a way we can upvote it or track its availability in storefront API? In India Cash on Delivery is a major option and Shopify support it via an official app as well.
Any update on this? It is a much needed feature...
bump, also in italy COD is very popular and from what i'm understanding there is no way to create a legit order / checkout with cod payment ?
Not at this time using the Storefront API. You could use the Admin API to create a draft order. Draft orders can be paid with COD. You could use the Admin API to create a draft order. Draft orders can be paid with COD.
Actually, i tried this, and it is not feasible because we don't have a way to retrieve the payment gateway id from the shopify api! Works only for manual payments.
I am trying to buy products using Cash On Delivery payment method but when I try to implement code below it always throw an error that "Payment is required" while the Cash On Delivery Payment Method is enabled from admin side.