I'm using an angular reactive form and trying to get a token from Recurly.js.
I've used the recurly suggested name for the input and added the data-recurly="number"
for the cc number and so on.
On submit first I call recurly.configure()
and then I take the value from the reactive form and pass it to recurly.token()
in this way:
recurly.token(this.form.value, function (err, token) {
if (err) {
// handle error using err.code and err.fields
console.log("Recurly token error: " + err);
} else {
// handle success using token.id
console.log("Recurly token success: " + token.id);
}
});
this.form.value
contains the correct field names and values but I always get the following validation error:
Am I missing something?
Thanks, Dem