So here is my problem, i have been following the github readme for app engine users in order to implement stripe into my app but the thing is that i can’t make it work as it seems that the http.DefaultTransport and http.DefaultClient are not available in App Engine.
I have seen that in the readme you show us how to initialize the Stripe client with app engine but i cannot find any charge card example so this is why i have come to this implementation.
I am used to this problem, since i have been working with app engine for a long time but for some reason i still get this akward error :
cannot use stripe.BackendConfiguration literal (type stripe.BackendConfiguration) as type stripe.Backend in assignment: stripe.BackendConfiguration does not implement stripe.Backend (Call method has pointer receiver)
Here is the code :
func setStripeChargeClient(context context.Context, key string) *charge.Client {
c := &charge.Client{}
var b stripe.Backend
b = stripe.BackendConfiguration{
stripe.APIBackend,
"https://api.stripe.com/v1",
urlfetch.Client(context),
}
c.Key = key
c.B = b
return c
}
Getting the error on that b assignation …
What i can’t figure it out is why this example seems to work all around the web and does not work in my app, if you could please enlighten me on this one, i would be in your debt hahaha
and then calling it this way
stripeClient := setStripeChargeClient(context, "sk_live_key »)