#lkjhgfdsa

1 messages · Page 1 of 1 (latest)

merry sinewBOT
jaunty grotto
steady adder
#

I haven't got to the mount function (without referencing the Payment Intent Client Secret)
As I get an error on creating the payment element

jaunty grotto
#

That's interesting..

#

How exactly are you setting up Stripe.js?

merry sinewBOT
steady adder
#

We work on Salesforce Platform, and use it Lightning Web Components framework for developing
So we save Stripe.js as local file and then load it on page before calling the methods

jaunty grotto
#

Is it possible that you have an older version of Stripe.js cached on your server?

steady adder
#

I did load it a while ago

ocean nova
#

Hi 👋

I'm stepping in as @jaunty grotto has to go. What is the error you are recieving?

steady adder
#

I am trying to integrate Stripe "Payment Element" into our system.
And we are getting error when we trying to create the element in our code that "IntegrationError: In order to create a payment element, you must pass a valid PaymentIntent or SetupIntent client secret when creating the Elements group. e.g. stripe.elements({clientSecret: "{{CLIENT_SECRET}}"})"
However in your docs said that we can create the element without PaymentIntent.

ocean nova
#

Which doc are you following?

steady adder
#

Yes

ocean nova
#

In that case it does sound like you are using an outdated version of Stripe.js that does not have the deferred intent capability.

steady adder
#

Ok, now I do not get any issues, however I also don't see the actual Payment element.
But I see that some UI element were created
My code:
const stripe = Stripe(stripePublishableKey);
// const appearance = { /* appearance */ };

// without Payment Intent
const options = {
mode: 'payment',
amount: 1099,
currency: 'usd',
// Fully customizable with appearance API.
appearance: {/.../},
};

// Set up Stripe.js and Elements to use in checkout form
const elements = stripe.elements(options);

// Create and mount the Payment Element
const paymentElement = elements.create('payment');

let element = document.querySelector('.stripe-card-element')
paymentElement.mount( element );

ocean nova
#

Okay, do you have a test front-end I could take a look at?

steady adder
ocean nova
#

I can't do anything with screenshots

#

I mean like a URL that I could visit and inspect myself

steady adder
#

hmm that requires login to our system and i can't do that

ocean nova
#

Unfortunately there isn't a whole lot I can advise without being able to examine the UI. Is it possible you are loading the Payment Element in an outer element that is constrained in width or height?

steady adder
#

I checked and there are no constrains. It looks like somethings blocks te content from being loaded

ocean nova
#

Do you have anything showing up in the logs?

steady adder
#

No, there are no issues in logs

ocean nova
#

Okay what happens if you set the height directly of the element you mount the Payment ELement in?