#martingaibisso
1 messages · Page 1 of 1 (latest)
Happy to help, what is the error?
Thanks for the prompt response
getting No type or elements provided
I'm following this doc: https://stripe.com/docs/elements/express-checkout-element/accept-a-payment?client=html#create-pm
Can you send me the specific snippet of code that you are calling when you get that error?
here you go
So one thing I am noticing is that where the tutorial is using elements: elements.submit(), stripe.createPaymentMethod({elements ..., your code is using element. Can you try using elements.submit?
it's just a variable name
you can see right there I define the name
before the paymentMethodCreate i do the submit and thats working just fine
So that this.elementBySourceId thing gets you the original Stripe elements instance that youc created?
correct
const elements = this.stripe.elements(options);
self.elementBySource[definedSource.source] = elements;
Gotcha, it looks like something about that process is confusing Stripe.js
Is there a way you can temporarily get rid of that indirection and just pass the exact same original elements variable that you instantiated?
sure
getting another error now: Uncaught (in promise) IntegrationError: Could not find a mounted element to create a payment method from.
not sure if related to my code, let me check
Any luck looking in to this error?
striped my code to bare minimum and was able tp create a PM. so there must be something my end causing the error