You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which does compile but stripe throws a runtime error (IntegrationError: Invalid value for createPaymentMethod: type should be string. You specified: undefined.).
Any ideas on where to go from here?
The text was updated successfully, but these errors were encountered:
I don't think that private fields are exported into JS, so if you're passing this to an API that expects to be able to access a type property then that won't work? You'll need to probably make an impl with methods that work as accessors?
Okay I've finally figured out what is going on, internally stripe elements is accessing using bracket notation which is where the issue has cropped up from.
vari=r[o]
Where r is the object and o is a string with a field name, is there a way to expose fields for this or would I need to write a small translation layer?
Ah that makes sense! I'm unfortunately not enough of a JS-wizard to know what the options available to wasm-bindgen are to solve that. I'd probably have a small layer for now to translate.
I am trying to map across the stripe.CreatePaymentMethod function, but I am running into a bit of a blocker.
Because
type
is a keyboard it cannot be used as an attribute name thankfully #2360 was pulled in and I've ended up with the following:card
is a JS type andBillingDetails
is a struct.However, the following results in the following from the compiler:
error: expected an inert attribute, found an attribute macro
I have also tried:
Which does compile but stripe throws a runtime error (
IntegrationError: Invalid value for createPaymentMethod: type should be string. You specified: undefined.
).Any ideas on where to go from here?
The text was updated successfully, but these errors were encountered: