сделай вместо
$sendMoney = $api->sendMoneyToQiwi([
"id" => (string)(1000 * time()),
"sum" => [
"amount" => 1,
"currency" => "643"
],
"paymentMethod" => [
"type" => "Account",
"accountId" => "643"
],
"comment" => "Testing",
"fields" => [
"account" => "+79181111111"
]
]);
так $sendMoney = $api->sendMoneyToQiwi(json_encode([
"id" => (string)(1000 * time()),
"sum" => [
"amount" => 1,
"currency" => "643"
],
"paymentMethod" => [
"type" => "Account",
"accountId" => "643"
],
"comment" => "Testing",
"fields" => [
"account" => "+79181111111"
]
]));
$token = 'токен нельзя палить';
$paramGet = [
"id" => (string)(1000 * time()),
"sum" => [
"amount" => 8,
"currency" => "643"
],
"paymentMethod" => [
"type" => "Account",
"accountId" => "643"
],
"comment" => "Testing",
"fields" => [
"account" => "+79114353887"
]
];
$dataPostParam = json_encode($paramGet, JSON_UNESCAPED_UNICODE);
$ch = curl_init("https://edge.qiwi.com/sinap/api/v2/terms/__idPROVIVER__/payments");
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'Accept: application/json',
'Authorization: Bearer ' . $token
)
);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_POSTFIELDS, $dataPostParam);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$sResponse = curl_exec($ch);
print_r($sResponse);
["amount"] => "1.00"
или ["amount"] => 1.00