#bart-terminal-go
1 messages · Page 1 of 1 (latest)
bart-terminal-go
Hey @earnest star! That's just a picture of code. What's incomplete and wrong? what's the problem?
The docs on stripe are always incomplete or just plain wrong, ive reported like 4 problems with the docs that are getting fixed and this is another one
Sure, let's focus on the issue and clearly explaining the problem instead of pictures
what is the bug?
which version of stripe-go are you on?
latest version
can you share which exact version you are on please?
github.com/stripe/stripe-go v70.15.0+incompatible h1:hNML7M1zx8RgtepEMlxyu/FpVPrP7KZm1gPFQquJQvM=
github.com/stripe/stripe-go v70.15.0+incompatible/go.mod h1:A1dQZmO/QypXmsL0T8axYZkSN/uA/T/A64pfKdBAMiY=
okay so you aren't on the latest at all right? that one is multiple years old
we released 74.0.0 just yesterday
and we switched to go modules at least 2 years ago
I'm trying locally though to see what's wrong with that code
yeah I just tried that exact code on v74 and it works fine
I think you might be hitting a problem because you're on such an old version of the library because it's before go modules and so most of the examples don't work for you
does that make sense @earnest star ?
I mean i dont really think thats the version im using
cuss it works now
i fixed the code
wait no i used a diffrent doc one sec
nvm you were right, when i pulled the github docs it pulled the old version
yeah it's because you're before go modules
so you're stuck before v72.0.0 when we switched to go modules
thank you i fixed it
but one more thing
how can i set the connected account id?
I'm sorry but I'll be a pain: do not send picture. You're a dev, I'm a dev, I want text here. Because then I can tweak the text and show you
But https://stripe.com/docs/connect/authentication#authentication-via-the-stripe-account-header has exactly what you need
its okay i understand
I figured it out, the docs are just incomplete or miss alot of stuff
testing rn
DisplayName: stripe.String("92805"),
Address: &stripe.AddressParams{
Line1: stripe.String("932 N East Wood"),
City: stripe.String("Fullerton"),
State: stripe.String("California"),
Country: stripe.String("US"),
PostalCode: stripe.String("92805"),
},
}
params.AddMetadata("connected_account", "123123123")
result, err := location.New(params)
if err != nil {
fmt.Println(err)
}
fmt.Println(result)```
i get returned &{{0xc000066480} 0xc000066420 false 92805 tml_E3NiVw3Ve7bcHf false map[connected_account:123123123] terminal.location}
Hi 👋
What is it you are trying to do here?
The Go snippet in this doc https://stripe.com/docs/connect/authentication#stripe-account-header clearly shows using the params.SetStripeAccount() to provide that information. Additionally that will have to be a valid Connect Account ID (acct_XXXXX)
oh got it the meta data one seemed similar thank you
Yeah, Metadata is used to attach data in key:value pairs to many Stripe objects but it's just data. It doesn't assign other Connect Accounts or anything