#Aly Salem
1 messages ยท Page 1 of 1 (latest)
hi, the checkout session Id is now expired
Can you create a new Checkout Session with this issue?
And also can you explain how you are doing the redirect between your website and the Checkout Session?
unfortunately, I don't have a clear steps to regenerate the issue either that it occurs with first time users. Regarding the redirection , I used the stripe.js file in my angular application then I invoked the redirectToCheckout function using the generated sessionId received from the API
Hello ๐
Stepping in here, redirectToCheckout function has been deprecated.
Can you try setting the Checkout URL as window.location.href instead ?
protected payOnline(): Observable<any> {
if (this.paymentInfo.paymentGateway === PaymentGateway.stripe) {
console.log('this.cartPackages', this.cartPackages);
return this.paymentMethodsService
.payOnlineStripe({
paymentMethod: PaymentMethod.Online,
paymentGateway: PaymentGateway.stripe,
gatewayTransactionId: null,
attachmentId: null,
collectionDate: null,
collectionContactPhone: null,
items: this.paymobAndStripeItems(),
})
.pipe(
tap((res) => {
window.location.href = res.sessionUrl;
})
);
}
}
here is my first code that introduced the issue.
thanks to advice me with the incorrectness in the previous code
Did that fix the issue?
unfortunately, no
What error are you seeing now?
Could you please check these screen shots that I just captured few minutes ago.
Can you share the request ID where you're creating checkout session?
https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
yes sure, here is the request Id req_e6vlY4TD4N0PbT
Hmm I can load the checkout session just fine
Can you try going to the URL directly and see if that works?
https://checkout.stripe.com/c/pay/cs_test_a1lD3O7ASLQrGhb3mkx1niY3cibU9EscKPcpYrRJb7MGa5NFUEyhh9bAwF#fidkdWxOYHwnPyd1blpxYHZxWjA0SGBja2BEYGFiXEBObVJKa09HYVBRTEBRMjZDQHVSQ39tV2h3ajxXdzZOYXRnSTZAUnR3cW8wYzBvYTBXaTFobnVJUF93UXB8NDBDdGE8fXJsZ1NcV0QzNTVgZmRtQW5TXCcpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPyd2bGtiaWBabHFgaCcpJ2BrZGdpYFVpZGZgbWppYWB3dic%2FcXdwYHgl
yes, that's true however the issue takes place for users who tries to pay with stripe for the first time. and if the user tried to refresh the page every thing will work fine
Hey we are still looking in to this. Do you know if this is something that happens for all of your users the first time they get to your page or just some?
Also if you reload your page without a cache and try this again, does it consistently give you this error?
currently we are in the testing phase, so on about 80% of the PCs the issue occurs, however on mobile devices and on other PCs the issue doesn't occur which introduces a new thought that this issue may occur only on the PCs within our organization
Thanks for the info. Still trying to think on what this might be or how to look further
๐ hows this going @tranquil maple ?