Answer the question
In order to leave comments, you need to log in
How to make Yandex.Checkout SMS confirmation in Cordova?
I receive it from my server confirmation_url
and open it in a new webview of the application, confirm it with a code, and then I get 404 because the required url was not found on the Yandex checkout side. How to immediately close the webview when entering the SMS code? Or should it be done in a different way?
YaMoneyHelp
Answer the question
In order to leave comments, you need to log in
For those who have encountered this problem - along with the payment token in Yandex cash register, I give a link to my server "www.server.com/api/payment/success". After filling in the data from sms for 3Ds in the cordova webview, I look for redirects like this
const ref = window.cordova.InAppBrowser.open(data.ConfirmURL, '_blank', 'location=yes')
ref.addEventListener('loadstart', function (event) {
const urlSuccessPage = 'www.server.com/api/payment/success'
if (event.url === urlSuccessPage) {
ref.close()
this.status = this.statuses.paySuccess
}
})
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question