В
Size: a a a
В
VV
function validate(validationURL) {
return new Promise(function (resolve, reject) {
var xhr = new XMLHttpRequest();
xhr.onload = function () {
let responce = this.responseText;
var data = JSON.parse(responce);
resolve(data);
};
xhr.onerror = reject;
xhr.open('POST', '*тут ссылка*', true);
xhr.setRequestHeader('Content-Type', 'application/json;charset=utf-8');
xhr.send(JSON.stringify(*контент*));
});
}
var promise = validate(event.validationURL);
promise.then(function (merchantSession) {
*действия после промиса*
});
VV
В
j
В
j
И
ДС
ДС
В
es
Н
МА
И
И
МА
И