#riptired-issuing-go
1 messages · Page 1 of 1 (latest)
Hi, here is an example code on how you can create an Issuing Card in Go: https://stripe.com/docs/api/issuing/cards/create?lang=go. However, I do not understand 'I don't know how to import IssuingCardParams in golang'. Can you add more details? Are you seeing errors?
So I imported the libraries like this
"github.com/stripe/stripe-go/v74"
"github.com/stripe/stripe-go/v74/client"
in my imports at the top, but if I try to do stripe.IssuingCardParams, I get an error from go that says IssuingCardParams is not a type
Have you signed up to use Issuing? https://stripe.com/docs/issuing
yes
this is a problem with importing, not related to actually having access to using issuing
Like what do I need to import in order to use this snippet from the docs
stripe.Key = ""
params := &stripe.IssuingCardParams{
Cardholder: stripe.String(""),
Currency: stripe.String(string(stripe.CurrencyUSD)),
Type: stripe.String("virtual"),
}
c, _ := card.New(params)
this is unrelated to authenticating
i am just getting these warnings as compilation errors
So are you good now?
Can you share where you're exactly seeing this error?
yeah its just when I paste the code from the example
I think there might be issue with the version of the library, further digging
appreciate it
Can you redo your import by following these steps https://github.com/stripe/stripe-go?
yeah let me try that
main.go:29:2: no required module provides package github.com/stripe/stripe-go/card; to add it:
go get github.com/stripe/stripe-go/card
main.go:30:2: no required module provides package github.com/stripe/stripe-go/charge; to add it:
go get github.com/stripe/stripe-go/charge
main.go:31:2: no required module provides package github.com/stripe/stripe-go/client; to add it:
go get github.com/stripe/stripe-go/client
it says I need to go line by line and add these imports which doesn't seem to make sense, is that what I am supposed to do and is there a specific import for issuing
Let me pull in a colleague who knows Go
👋 Can you share your exact code including the exact imports you are using?
riptired-issuing-go
import "fmt"
import "github.com/stripe/stripe-go/v74"
import "github.com/stripe/stripe-go/v74/issuing/card"
func main() {
stripe.Key = "sk_test_123"
params := &stripe.IssuingCardParams{
Cardholder: stripe.String("ich_123"),
Currency: stripe.String(string(stripe.CurrencyUSD)),
Type: stripe.String(string(stripe.IssuingCardholderTypeIndividual)),
}
ic, err := card.New(params)
fmt.Printf("Got: \n", ic, err)
}``` this works for me for example
@signal yarrow any luck?