Does anyone know how to get the validation error message from clover.createToken() function, while initiating the payment.
Please help me below is the code.
$("#clover-payment").on("submit",function(e){ event.preventDefault(); clover .createToken() .then(function(result) { if (result.errors) { Object.values(result.errors).forEach(function (value) { displayError.textContent = value; }); } else { cloverTokenHandler(result.token); } }).catch(function(e){ debugger console.log(e) }); })
I didn't get the error message, but the sdk print some error in console with the default field is required.