#karnthis

1 messages ยท Page 1 of 1 (latest)

inland galleonBOT
wintry sleet
#

Can you quote your full code around the place?

inland galleonBOT
vale comet
#

sure thing. this is the full function: ```go
func(w http.ResponseWriter, req bunrouter.Request) error {
id := req.Param("id")
if len(id) == 0 {
warning := "Failed to get Session ID"
return jutils.ProcessCustomHttpError("checkoutSession", warning, 404, w)
}
sessionID := req.URL.Query().Get("sessionId")
sesh, err := session.Get(sessionID, nil)
utils.WriteJSON(w, sesh, err)
return nil
}


the critical logic was pulled directly from the docs. if it is helpful, the sessionId I am getting every time is `xyz`. I am assuming that is because I am in test mode?
wintry sleet
#

Like exactly xyz? That's not a valid value for checkout session id

#

it should be cs_test_xxx

vale comet
#

yes exactly xyz

#

that is what I get appended to the success url ?session_id=xyz

wintry sleet
#

That's weird

vale comet
#

lol glad it isn't just me then

wintry sleet
#

I think the issue is the statge before

vale comet
#

sure let me grab that code

wintry sleet
#

why do you receive session_id=xyz all the time

vale comet
#

I have no idea ๐Ÿ˜…

#

oh....... oh wow I am an idiot

#

so sorry to have wasted your time, I just noticed I have a little block tucked awayt that hard codes the session_id

#

I have no idea why I do, but I do

fleet zinc
#

no worries, glad that you managed to figure things out

vale comet
#

thanks so much for your attention

fleet zinc
#

@vale comet reopened!

vale comet
#

thanks so much! just a note, it was not clear to me that the ``session_id={CHECKOUT_SESSION_ID}` in the docs is NOT an example value but a literal that the stripe package replaces directly

#

this whole time I was operating under the impression I needed to capture and include that data myself

fleet zinc
#

ah i see, i'll pass on that feedback!

vale comet
#

it could simply be my lack of experience with stripe