#lkjhgfdsa
1 messages · Page 1 of 1 (latest)
Thanks, and are you getting the error when you mount the element?
https://stripe.com/docs/payments/accept-a-payment-deferred?platform=web&type=payment&client=html#web-collect-payment-details
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
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
Is it possible that you have an older version of Stripe.js cached on your server?
I did load it a while ago
Hi 👋
I'm stepping in as @jaunty grotto has to go. What is the error you are recieving?
I will reload to this version https://js.stripe.com/v3/
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.
Yes
In that case it does sound like you are using an outdated version of Stripe.js that does not have the deferred intent capability.
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 );
Okay, do you have a test front-end I could take a look at?
I can't do anything with screenshots
I mean like a URL that I could visit and inspect myself
hmm that requires login to our system and i can't do that
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?
I checked and there are no constrains. It looks like somethings blocks te content from being loaded
Do you have anything showing up in the logs?
No, there are no issues in logs
Okay what happens if you set the height directly of the element you mount the Payment ELement in?