#Ritesh Gupta

1 messages · Page 1 of 1 (latest)

elfin widgetBOT
tribal valley
#

Can you share your code for the checkout page?

gloomy mango
#

I'm using the same code as in this video https://www.youtube.com/watch?v=e-whXipfRvg&t=188s

In this episode, you’ll learn how to accept payments with the Payment Element using React Stripe.js. We’ll also see how to leverage many types of payment methods with one single integration using automatic payment methods.

Presenter

Matthew Ling - Developer Advocate at Stripe - https://twitter.com/mattling_dev

Table of contents

00:00...

▶ Play video
tribal valley
#

Can you either upload it as a file or share a github link?

gloomy mango
tribal valley
#

Ok. Can you share the code where you set the CSP?

#

That entire file?

gloomy mango
tribal valley
#

Hm ok. And when do those errors appear in the console?

#

On page load?

#

Or is this after you attempt to submit payment details

gloomy mango
#

when i click pay now button, i'm getting that error

tribal valley
#

Ok

#

What happens if you remove the CSP entirely?

#

Does it work?

gloomy mango
#

It was not working thats why i have added the CSP, but it didn't do anything

tribal valley
#

I see ok. What version of react-stripe-js are you using?

gloomy mango
#

"@stripe/react-stripe-js": "^2.1.0",

#

"stripe": "^12.6.0"

analog scroll
#

Hey there, first of all can you confirm this is not blocking payments?

#

It looks like the URL is the redirect after payment intent success, so i think it's not

#

but want to make sure

gloomy mango
#

do i have to check on dashboard?

analog scroll
#

Or you can share one of those payment intent IDs

#

but you can also check the network tab in the dev tools

#

you should see a successful request to /confirm the PI

#

I'm curious whether the CSP error and the "unexpected error occured" are separate issues

gloomy mango
#

pi_3NBwl0SGCrfwtjy71sfXJuQx

#

pi_3NBvtXSGCrfwtjy71o20kur0

#

all are incomplete payment

gloomy mango
analog scroll
gloomy mango
#

Even after adding the description getting the same error const paymentIntent = await stripeInstance.paymentIntents.create({ description: "Software development services", shipping: { name: "Jenny Rosen", address: { line1: "510 Townsend St", postal_code: "98140", city: "San Francisco", state: "CA", country: "US", }, }, amount: 2000, currency: "usd", automatic_payment_methods: { enabled: true }, });

analog scroll
#

Can you share the new payment intent id? or is it the same one?

gloomy mango
#

pi_3NBwu6SGCrfwtjy708a2uDdk

analog scroll
#

You've not set a description on the payment intent yet

#

So the same error seems expected

gloomy mango
#

i did

analog scroll
#

You need to set that, and will also need to provide the required customer details in the docs

#

The payment intent you shared has no description. Can you share the request you made to update the payment intent to set it?

gloomy mango
#

maybe its not passing to stripe gateway

analog scroll
#

How are you trying to set it?

gloomy mango
#

Succeded this payment intent pi_3NC6NrSGCrfwtjy70EUFoRTe

#

thank you