#bojack420
1 messages · Page 1 of 1 (latest)
Hi there, you mean to display a loader while it's being loaded?
yeah
legend thank you~
Happy to help
I seem to be having trouble to get it to work
const options = {
amount: parseInt(this.total * 100),
loader: 'always',
mode: 'payment',
currency: 'aud',
setup_future_usage: 'off_session',
};
const elements = this.stripe.elements(options);
did i implement this correctly?
What problem are you facing?
its not loading the skeleton at all
have you checked browser console? Any error there?
nope no errors
besides some content security policy directives but that occured way before hand
Is there a public URL that I can visit and see your integration?
umm not currently, are you able to send a screenshot of what the skeleton is meant to look like?
I don't have but you can visit https://stripe.com/docs/elements/express-checkout-element#try-demo to see demo
yeah mine isnt showing that little loading animation
just confirming this seems to look correct?
loader: 'always',
amount: parseInt(this.total * 100),
mode: 'payment',
currency: 'aud',
setup_future_usage: 'off_session',
};
const elements = this.stripe.elements(options);
this.elements = elements
const expressCheckoutOptions = {
wallets: {
applePay: 'always',
googlePay: 'always',
}
};
const expressCheckoutElement = elements.create("expressCheckout", expressCheckoutOptions);
expressCheckoutElement.mount("#express-checkout-element");```
my html is just
<div id="express-checkout-element"></div>
It doesn't have any css attached to it either
It should be setupFutureUsage instead of setup_future_usage
i've just updated that. seems to not have made a difference haha
If you can upload your work somewhere public, I can take a look and help you troubleshoot
The ExpressCheckout Element is displaying for me
yeah but prior to loading it doesnt display anything
like a skeleton or anything
Display skeleton loader UI while waiting for Elements to be fully loaded doesnt seem to work
Ah, the loader is only supported for for the Payment Element, the Link Authentication Element, and the Address Element.
It doesn't support ExpressCheckout Element yet
ah ok yeah that makes sense
so i'll just need to add a custom loader for now im assuming
Yup you can do that