jeudi 9 février 2017

Shopify API - Draft Orders, Mark as Payment Pending

Vote count: 0

I'm creating draft orders using the Shopify API, the API documentation says " the draft order can be paid, set to pending, or paid by credit card; in each case, the draft order is set to completed and an order is created. "

I've been trying alllllll day to set the draft as pending so that Shopify creates a real order and I can do something with that.

If I try and set the status directly I just get this

[12] pry(main)> order.status
=> "open"
[13] pry(main)> order.status = 'pending'
=> "pending"
[14] pry(main)> order.status
=> "pending"
[15] pry(main)> order.save
=> true
[16] pry(main)> order.status
=> "open"
[17] pry(main)> order.taxes_included
=> true
[18] pry(main)> order.taxes_included = false
=> false
[19] pry(main)> order.save
=> true
[20] pry(main)> order.taxes_included
=> true

I've tried creating a transaction for the DraftOrder but the transaction method doesn't take draft_order_id, only order_id which isn't right.

Please can someone give some me advice???

Thanks for your time.

asked 16 secs ago

Let's block ads! (Why?)



Shopify API - Draft Orders, Mark as Payment Pending

Aucun commentaire:

Enregistrer un commentaire