· 7 years ago · May 24, 2018, 03:56 PM
1$answer = [
2 "version" => $_REQUEST["version"],
3 "data" => [
4 "header" => [
5 "ts" => time(),
6 "client_id" => $data['header']['client_id']
7 ],
8 "body" => [
9 "transaction_id" => $data["body"]["transaction_id"],
10 "notify_type" => "TRANSACTION_STATUS"
11 ]
12 ]
13];
14
15$answer["signature"] = sha1($answer["data"] . $secret_key);
16
17header("Content-type: application/json; charset=utf-8");
18file_put_contents("log_vk", print_r($answer, 1), FILE_APPEND);
19echo json_encode($answer);