Подключаю к сайту Оплату частями от приват банка. Вот документация:
ссылка$url = 'https://payparts2.privatbank.ua/ipp/v2/payment/create';
$params = array(
'storeId' => '36E137A157014AC297DD',
'orderId' => '123456789',
'amount' => '1000',
'partsCount' => '1',
'merchantType' => 'pp',
'scheme' => 'pp',
'products' => array(
'name' => 'televizor',
'count' => 1,
'price' => 1000
),
'signature' => 'b47f80a7fbb34db084bb35527f84ed4a'
);
$result = file_get_contents($url, false, stream_context_create(array(
'http' => array(
'method' => 'POST',
'header' => 'Accept:application/json;Accept-Encoding:UTF-8;Content-Type:application/json',
'content' => json_encode($params)
)
)));
Вот выводит ошибку: {"state":"FAIL","errorMessage":"Content type 'application/x-www-form-urlencoded;charset=UTF-8' not supported","locale":"ru_RU"}
Так как я понимаю это ошибка кодировки, может я не правильно кодировку отправил?