A
A
Alex Mustdie2014-06-27 11:22:58
PHP
Alex Mustdie, 2014-06-27 11:22:58

VK Payment API - Why an error?

Good day!
The question will be more understandable to those who have already encountered this topic, the updated payment api from VKontakte.
The page has a button + js.

script type="text/javascript">
  function order() {
    var params = {
      type: 'item',
      item: 'item1'
    };
    VK.callMethod('showOrderBox', params);
  }

  var callbacksResults = document.getElementById('callbacks');

  VK.addCallback('onOrderSuccess', function(order_id) {
    callbacksResults.innerHTML += '<br />onOrderSuccess '+order_id;
  });
  VK.addCallback('onOrderFail', function() {
    callbacksResults.innerHTML += '<br />onOrderFail';
  });
  VK.addCallback('onOrderCancel', function() {
    callbacksResults.innerHTML += '<br />onOrderCancel';
  });
</script>
<input value="1!" type="button"  onclick="order()" />

In the application settings, the callback address is php code, which is taken from here - vk.cc/2JKzIG
Naturally, with the secret key of my application.
When you click on the button, first "Waiting for information about the product .." pops out, and then "Your request was not processed. Please try again later.". Although in the "Payment notification log" in the "Payments" tab when managing the application, everything seems to be in order.
Request: app_id=443****&item=item1〈=ru_RU¬ification_type=get_item_test&order_id=554250&receiver_id=21335****&user_id=21335****
Response:
{"response":{"item_id":125,"title":null,"photo_url":"http:\/\/cs608817.vk.me\/v608817064\/c18b\/vT4MrpS****.jpg","price":5}}

Where is the mistake, sir?
Many thanks in advance!

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question