I receive no callback from $tokenize method of Braintree $hostedFieldsInstance when open in browser on Android device.
I have a simple HTML document with some JS code in it. The purpose is tokenize user's credit card using Braintree Hosted Fields SDK. Main part of code has been taken exactly from Braintree documentation.
The problem is that when I open this HTML inside any Android browser and call tokenize
method there is no any callback from it. Neither payload nor error is returned.
form.addEventListener('submit', function (event) {
event.preventDefault();
var zipValue = zip.value;
console.log(zipValue);
hostedFieldsInstance.tokenize(function (tokenizeErr, payload) {
console.log(payload);
if (tokenizeErr) {
console.error(tokenizeErr);
return;
}
// If this was a real integration, this is where you would
// send the nonce to your server.
const response = {nonce: payload.nonce, details: payload.details, zipValue: zipValue}
});
}, true);
Nothing, just like it was some crash on the Braintree backend. However the same HTML works properly inside desktop and iOS browsers.