#pastyghost_best-practices

1 messages ยท Page 1 of 1 (latest)

hollow compassBOT
#

๐Ÿ‘‹ 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.

safe wind
#

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

faint orchid
#

I already handle that via a post-payment hook.

safe wind
#

Not sure what you're asking me then

faint orchid
#

I guess just if there was a cleaner way to some logic, but I can refile that as a code ticket.

safe wind
#

The UI only permits selection of one shipping option currently so you can't charge for multiple shipping options/per item yet

faint orchid
#

Right. I'm not trying to do that, really.

safe wind
#

Maybe I misunderstood what you're asking me then

faint orchid
#

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.

hollow compassBOT
safe wind
#

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

faint orchid
#

Gotcha. So is there a way to do that without using the dynamic shipping options because that's in beta?

safe wind
#

There is not no. That's the functionality we're unlocking with the beta

faint orchid
#

Gotcha. Okay.

#

I'll have to keep poking at all that, then! Thank you much!

safe wind
#

Let us know if we can help with anything specific

faint orchid
#

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
dense barn
#

I assume that was in the instructions from the beta email? Looking in to this

faint orchid
dense barn
#

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

faint orchid
#

That's still getting me the same error.

dense barn
#

Looking in to that with my colleague

#

And just double checking, run exactly as pasted above?

faint orchid
#

Yes.

dense barn
#

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 ๐Ÿ˜…

faint orchid
#

No prob! That worked!