Files
anpdf/app/functions/ykassa.php

31 lines
703 B
PHP
Raw Permalink Normal View History

2021-06-13 08:51:38 +00:00
<?php
function ykassa(){
$headers = array(
'Content-Type: application/rss+xml',
'Authorization: OAuth '.YA_TURBO_TOKEN,
'Content-Encoding: gzip'
);
$ch = curl_init($path);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 60);
curl_setopt($ch, CURLOPT_TIMEOUT, 120);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_HEADER, false);
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
$res = curl_exec($ch);
curl_close($ch);
$res = json_decode($res, true);
print_r($res);
}