#ebellotpu6
1 messages · Page 1 of 1 (latest)
Error: Uncaught (in promise): IntegrationError: Invalid value for stripe.confirmSetup(): elements should have a mounted Payment Element or Payment Button Element.
Hi,
Could you please give more details about your integration ?
You are having the error in this step:
https://stripe.com/docs/payments/save-and-reuse?platform=web#web-submit-payment-details
it looks like the Payment Element is not mounted, Did you check that this function is well exectued?
this.paymentElement.mount(this.paymentElementForm.nativeElement);
However, it looks like you mixing native Javascript and Angular calls, you can use this Angular community module for simpler integration I thinkg:
https://github.com/richnologies/ngx-stripe
https://stripe.com/docs/libraries/community
After checking you frontend code, you need to have a global variable in your component called stripe, you initialize it when the page is charged (you can use the function loadStripe()) and use it whenever you need. Don't import it from from 'stripe'.