HTML Cannot Get Error

Question:
Trying to make a Stripe integrated checkout, but I get a “Cannot GET /cancel.html” error whenever I attempt to navigate to that page. The other two pages (index.html and success.html) both work, but why doesn’t cancel.html work?
Repl link/Link to where the bug appears:
Repl: https://replit.com/@crunchyeyemold/Drink-Dash-Stripe-Test?v=1#index.js
Website: https://drinkdashstripe.replit.app/ (click purchase and then exit out of the payment screen)

Hi @crunchyeyemold !
Try using return_url on line 20 of index.js instead of cancel_url.
Taken from:
https://stripe.com/docs/api/payment_intents/confirm#confirm_payment_intent-return_url

Hey @NateDhaliwal ! Thanks for the quick follow up. This doesn’t seem to be the issue here as the redirect works just fine and going to the link directly also works. The problem is that the actual file is not loading onto the webpage for some reason.

I see what you mean. Even https://drinkdashstripe.replit.app/cancel.html doesn’t work, though index.html and success.html do.

1 Like

@crunchyeyemold Please hide your key in Secrets on line 2. Please sensor it or store it in Secrets.

1 Like

Will do. I wasn’t super super concerned about it because it was only a test key, but I went ahead and hid it.

1 Like

It’s a very odd bug. Not sure why this happens.

1 Like

@crunchyeyemold I forked your Repl and put my own Stripe keys in, and it didn’t seem to have a problem with the cancel page. Maybe as simple as re-deploying?