#pastyghost_best-practices
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1328371148777459722
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- pastyghost_best-practices, 3 days ago, 51 messages
Customer can only choose one shipping option for the entire session/cart currently
I guess you need logic to calculate the applicable shipping option(s) for all items on session/cart
You can probably leverage custom text on the session to communicate that the digital downloads will be delivered digitally or whatever
I already handle that via a post-payment hook.
Not sure what you're asking me then
I guess just if there was a cleaner way to some logic, but I can refile that as a code ticket.
The UI only permits selection of one shipping option currently so you can't charge for multiple shipping options/per item yet
Right. I'm not trying to do that, really.
Maybe I misunderstood what you're asking me then
I'm trying to say "If Bob is buying some PDFs and a physical copy, charge him international shipping. If he's buying some PDFs and a physical copy and he lives in the US, charge him domestic shipping. If he's just buying PDFs, charge him no shipping." I guess I just thought that there was a cleaner way to write that logic than what I had already written.
Yeah the onus for that logic falls on your to calculate based on the line items on the session. You'd listen for the shipping address change event, check the session items and calculate options accordingly
Gotcha. So is there a way to do that without using the dynamic shipping options because that's in beta?
There is not no. That's the functionality we're unlocking with the beta
Let us know if we can help with anything specific
So I've received an email that I'm in the private beta for those features, but when I try to use that version of the API, it fails.
go get -u github.com/stripe/stripe-go/v81.2.0-beta.1
go: module github.com/stripe/stripe-go@upgrade found (v70.15.0+incompatible), but does not contain package github.com/stripe/stripe-go/v81.2.0-beta.1
I assume that was in the instructions from the beta email? Looking in to this
That was from here: https://docs.stripe.com/payments/checkout/custom-shipping-options
I am not finding much on this but I don't know Go that well, reaching out to a colleague
Looks like the proper syntax is
go get -u github.com/stripe/stripe-go/v81.2.0-beta.1
That's still getting me the same error.
Looking in to that with my colleague
And just double checking, run exactly as pasted above?
Yes.
My apologies, I repasted the command that you used. My colleague suggested using
go get -u github.com/stripe/stripe-go/v81@v81.2.0-beta.1
I was comparing to see the difference and then mixed things up when bringing it here. Server is a bit busy ๐
No prob! That worked!