G
G
g0xff2016-12-16 09:36:53
API
g0xff, 2016-12-16 09:36:53

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.
32ecf38d5f0b44e684d9d2765d405839.jpgThe 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");

Start function, starts as the application has loaded.
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

1 answer(s)
G
g0xff, 2016-12-17
@g0xff

found a mistake, he did not like Russian letters, they must be converted to the correct url format immediately.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question