#martingaibisso

1 messages · Page 1 of 1 (latest)

pallid bayBOT
wind glade
#

Happy to help, what is the error?

hushed stream
#

Thanks for the prompt response

#

getting No type or elements provided

wind glade
#

Can you send me the specific snippet of code that you are calling when you get that error?

hushed stream
#

here you go

wind glade
#

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?

hushed stream
#

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

wind glade
#

So that this.elementBySourceId thing gets you the original Stripe elements instance that youc created?

hushed stream
#

correct

#

const elements = this.stripe.elements(options);
self.elementBySource[definedSource.source] = elements;

wind glade
#

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?

hushed stream
#

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

wind glade
#

Any luck looking in to this error?

pallid bayBOT
hushed stream
#

striped my code to bare minimum and was able tp create a PM. so there must be something my end causing the error