Answer the question
In order to leave comments, you need to log in
Why does the VKPay button in the bot not work?
The essence of the problem itself is that it is not possible to send money to a group through a button like vkpay. If I just send it through attachments, then everything will work out.
Through the button on the computer, a payment window opens, a pin code is requested, and then the message "Unable to complete the operation. Please try again later." When you click on the button from mobile devices, an endless download occurs.
In the request, the array with buttons looks like this:
array('keyboard' => json_encode(array(
'one_time' => true,
'buttons' => [array (
[
'action' => array(
'type' => 'vkpay',
'hash' => "action=pay-to-group&amount{$summ}&description=Тема&group_id=2097****9&aid=2097****9",
),
]
),
array(
[
'action' => array(
'type' => 'callback',
'label' => ' Позвать оператора',
'payload' => "{\"button\": \"confirm\"}",
),
'color' => 'secondary',
]
),
array(
[
'action' => array(
'type' => 'callback',
'label' => ' Списать '.$bonus.' бонусов',
'payload' => "{\"button\": \"bonus\", \"ord\": \"".$id."\"}",
),
'color' => 'positive',
]
),
],
), JSON_UNESCAPED_UNICODE))
https://vk.com/vkpay#{hash}
then it will take me to the payment form which will workhttps://vk.com/im?sel=-2097****9&w=app6217559_-0%2523action%253Dpay-to-group%2526amount%253D12%2526description%253D%25253F4%25253F%25253F4%25253F%25253F4%25253F%25253F6%25253F%2526group_id%253D2097****9%2526aid%253D2097****9
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