Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: order_id #1

Open
agrohs opened this issue Apr 10, 2019 · 1 comment
Open

Question: order_id #1

agrohs opened this issue Apr 10, 2019 · 1 comment

Comments

@agrohs
Copy link

agrohs commented Apr 10, 2019

@notrab, is this example working? How is the extra.order_id getting populated on the Shippo Shipment object?

It seemed according to the Shippo docs (https://goshippo.com/docs/reference#shipments-extras) that there are a fixed set of fields that can be sent into the extra property.

Also, if this does work to send in a custom order_id field into the Shipment.create call, how does that flow work from moltin as you'd seemingly need to call Shipment.create to get back rates before a cart becomes an order - whereby you wouldn't yet have an order_id available 🤔.

Not saying this doesn't work, just need some more details to see how to get it all set up!

@agrohs
Copy link
Author

agrohs commented Apr 11, 2019

Just following up that I did get a fake extra.order_idpassed in successfully via:

 this.shippo.shipment
      .create({
        address_from: shipFromAddress,
        address_to: shipToAddress,
        parcels: shipParcels,
        extra: { order_id },
        async: false
})

so disregard the first portion of the question, BUT I'm still wondering how we would have an order_id to be able to pass in to the shipment.create call if that needs to be made to get back shipping rates as wouldn't that happen while you still have a cart, not yet an order??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant