#ak_code

1 messages ยท Page 1 of 1 (latest)

novel mossBOT
#

๐Ÿ‘‹ 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.

uneven hearth
#

Are any of your webpages working? Sorry, I'm having trouble understanding what's actually happening with your integration

coral latch
#

Yes, All of my webpages are working fine. Just the not able to open the Form on server : http://127.0.0.1:4242/

uneven hearth
#

Are you getting any other errors in the console?

coral latch
#

One sec

uneven hearth
#

Can you send a screenshot of the page with the developer tools console open?

coral latch
#

Sure

uneven hearth
#

Sounds like your route isn't setup properly. You server doesn't know to look for checkout.html

coral latch
#

<!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>

uneven hearth
#

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

coral latch
#

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

uneven hearth
#

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

coral latch
#

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

uneven hearth
#

Where are you running your server from? What directory?

uneven hearth
coral latch
#

The server is running from the public folder.

#

I am running my server from the /Users/amaankhan/Desktop/Project_Stripe/public directory.

uneven hearth
#

What command are you running to start the server?

coral latch
#

php -S 127.0.0.1:4242 -t public

uneven hearth
#

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.

coral latch
#

And just the packages I have installed separately are npm, composer, stripe, brew

uneven hearth
#

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

coral latch
#

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 ?

uneven hearth
novel mossBOT
coral latch
#

I did add the latest API keys in .env file and updated accordinly in checkout.js but coudn't opne the form

sharp salmon
#

Hello, you'd want to make sure you copied the correct keys and your code is using the right one.

coral latch
#

Yes I am using the right Keys

#

Oh Finally I have opended teh form

#

๐Ÿ˜Ž