Closed jmauzyk closed 1 year ago
@samuelbirch I see you resolved some of these issues with your latest commit, thanks for that. However, the call to addEventListener()
remains the same as before. As written, the form does not generate a nonce via JS on submit, but instead directly POSTs the payment form in the browser. This then redirects to the payment page with the error Cannot determine payment method.
Are you still working on a solution for this?
New version released with fixes for this.
I encountered several JS errors with the Drop-in UI that I've addressed here.
querySelector('button[type="submit"]')
could result in errors if aninput
element was used to submit the form instead of abutton
. Updated the selectors to address this.addEventListener()
is not a direct replacement for jQueryon()
, and because the parameters weren't formatted correctly, the event wasn't triggering. BecauseaddEventListener()
doesn't pass data the wayon()
does, it's necessary to pass the data another way. One way is using currying, which I implemented on line 127, seen informSubmit()
.val()
with.value
on line 168.