Answer the question
In order to leave comments, you need to log in
Can't set up mobile payment?
What mistake did I make in the code? Throws on the page ok.ru/dk with the error "The page is temporarily unavailable."
I also tried to create a request manually, i.e. create a payment link, same result.
The function that calls the payment
if(my.mob==1) OKSDK.Payment.show("5 заряженных криссталов", 35, "1");
else FAPI.UI.showPayment("5 заряженных криссталов", "Купить 5 заряженных криссталов", 1, 35, null, null, "ok", "true");
smobAPI: function(){
var config = {
app_id: 1248896768,
app_key: 'CBAIKBHLEBABABABA'
};
OKSDK.init(config, function() {
OKSDK.Widgets.getBackButtonHtml(function (html) {
document.getElementById('backBtn').innerHTML = html;
});
okm.start();
}, function(error) {
alert('Если ошибка повторяется, напишите vk.com/g0xff\nOKSDK error' + OKSDK.Util.toString(error));
})
let args = OKSDK.Util.getRequestParameters(window.location.search);
if (args['custom_args'] && (args['custom_args'].search("payment") == 0)) {
let paymentResult = decodeURIComponent(args['custom_args']).split('=');
window.opener.postMessage(JSON.stringify({
type: 'payment',
result: paymentResult
}), "*");
window.close();
return;
}
},
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question