A
A
andreystrelkov2015-01-02 10:29:20
Yandex
andreystrelkov, 2015-01-02 10:29:20

What is the principle of operation of the Yandex Payments API?

Based on this documentation , when a payment occurs, I receive a POST request to a certain address, in which there is an operation_id parameter
. Using this parameter, I can find out additional data about the payment , namely, I am interested in a COMMENT on the payment, as they write , for this you need to send a POST request to the address https://money.yandex.ru/api/operations-details - such as
POST /api/request-payment HTTP/1.1
Host: money.yandex.ru
Content-Type: application/x-www-form-urlencoded
Authorization: Bearer 01234567890ABCDEF01234567890
param1=value1¶m2=value2¶m3=value3
In my case, I send only one pair of parameters, namely operation-id = 1234567890
In response, I will receive a response in which there will be a comment
. some kind, and actually a token after it, I read about getting a token, but I still didn’t understand how to get it, where to get it, where it came from at all
Who understands, chew the fool please! :(

Answer the question

In order to leave comments, you need to log in

1 answer(s)
X
xmoonlight, 2015-01-02
@xmoonlight

with curl add:

curl_setopt($ch,CURLOPT_HTTPHEADER,array('Authorization: Bearer '.$token));

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question