Last active
January 3, 2018 18:39
-
-
Save mootrichard/596f12165f22f853be3cf6247bc2b0b1 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cardNonceResponseReceived: function(errors, nonce, cardData) { | |
if (errors) { | |
// Log errors from nonce generation to the Javascript console | |
console.log("Encountered errors:"); | |
errors.forEach(function(error) { | |
console.log(" " + error.message); | |
}); | |
return; | |
} | |
console.log(cardData); | |
console.log("nonce: %s", nonce); | |
// Assign the nonce value to the hidden form field | |
$("#card-nonce").val(nonce); | |
$("#square-payment-form").submit(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment