#ak_code
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1262819569320329287
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Are any of your webpages working? Sorry, I'm having trouble understanding what's actually happening with your integration
Yes, All of my webpages are working fine. Just the not able to open the Form on server : http://127.0.0.1:4242/
Are you getting any other errors in the console?
One sec
Can you send a screenshot of the page with the developer tools console open?
Sounds like your route isn't setup properly. You server doesn't know to look for checkout.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>Accept a payment</title>
<meta name="description" content="A demo of a payment on Stripe" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link rel="stylesheet" href="style.css" />
<script src="https://js.stripe.com/v3/"></script>
<script src="checkout.js" defer></script>
</head>
<body>
<!-- Display a payment form -->
<div id="checkout">
<!-- Checkout will insert the payment form here -->
</div>
</body>
</html>
This isn't really a Stripe issue, unfortunately, so we can't really assist much other than to say: your sever doesn't know where to look for checkout.html
2min
I there any way to, Because I have correctly directed to file path
To all the files
Okay, Let tell me one thing
Will that be a problem if node_modules folder are multiple in Project_Stripe Folder and Also, Where can I get my index.html file from stripe dashboard
Because, Brother I did get the desired results earlier, I did open the stripe Embedded Form
I'm not really understanding the question. I don't know what Project_Stripe folder is supposed to contain for you. And you don't need to point to index.html in the Stripe Dashboard
This is my file path : /Users/amaankhan/Desktop/Project_Stripe
โ
โโโ public
โ โโโ checkout.html
โ โโโ return.html
โ โโโ style.css
โ โโโ checkout.js
โ โโโ return.js
โ โโโ checkout.php
โ โโโ status.php
โ โโโ secrets.php
โ โโโ index.html
โ โโโ package.json
โ โโโ node_modules
โ
โโโ vendor
โ โโโ autoload.php
โ
โโโ .env
โโโ composer.json
โโโ composer.lock
โโโ node_modules
โโโ package.json
โโโ package-lock.json
Tell me one thing - Are the all the required files present for creating an embedded form
Where are you running your server from? What directory?
I don't know, because I don't know what's in each file
The server is running from the public folder.
I am running my server from the /Users/amaankhan/Desktop/Project_Stripe/public directory.
What command are you running to start the server?
php -S 127.0.0.1:4242 -t public
Got it. Yeah, there's not really a way for me to know what's misconfigured in your code then. I would need to see every file on there and have time to look through all the code myself. Unfortunately we don't really have the bandwidth to do that in this channel. We tend to expect the developers we talk to to be able to troubleshoot basic server calls on their own.
All the codes are from here : https://docs.stripe.com/checkout/embedded/quickstart
And just the packages I have installed separately are npm, composer, stripe, brew
Right, but this is a misconfiguration on your server's side and likely you need more code than what's in those snippets, since you're using PHP and JS.
I'd recommend stepping through the code and familiarizing yourself with what each line does so you understand where things might be going wrong
You are right
I am going through It
Okay, Brother i have fixed everything here
There's just one erro now
It says
"You may test your Stripe.js integration over HTTP. However, live Stripe.js integrations must use HTTPS."
The error message indicates a "401 Unauthorized" response when attempting to initialize a Stripe payment page (init endpoint). This typically means that the API key being used in your Stripe.js configuration (pk_test_51MXeRzSEhVjYU2Ojj5TI8VMVcISVACgGneviEGo9CJrZqH7ABgOWxZev8uGNwMpXggNtwjLgKxTuVwKyYWxrGAW500lggMebMm) is either incorrect, expired, or not authorized to perform the requested action.
Should i be rolling the key again or what to do ?
Go here and grab the most up to date one: https://dashboard.stripe.com/apikeys
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
I did add the latest API keys in .env file and updated accordinly in checkout.js but coudn't opne the form
Hello, you'd want to make sure you copied the correct keys and your code is using the right one.