I'm trying to follow this example to submit credit card information and get back a CardNonce.
https://docs.connect.squareup.com/articles/adding-payment-form/
The form works. I can enter in all the information. I press the button and the function requestCardNonce() IS getting called because I inserted a debug statement to bring up a message box window.alert("IN requestCardNonce"); and it shows up after I click the button.
HOWEVER, I cannot seem to get cardNonceResponseReceived to work after I click the button. I put in windows.alert message boxes in that function and it never fires. The browser processes like it's connecting to the server and the text boxes reset but I can't seem to get the cardNonceResponseReceived() callback to fire.
What might I be missing? I copied the example almost verbatim with the exception of message box alerts. I inserted my applicationId from Square, and even if I didn't, I would still expect the callback to fire but populate errors.