私はWordPressでソフトタッチAPIを使用し、curlでAPIにデータを投稿しています。curl_exec()引数最後の2桁の数字を削除します
しかし、私は関数で大きな整数値を送信できません。私はそのデータ型の範囲の問題やカールになっていないよ。私はそれ11449701010101
を通過したとして、それはproduct_uid
の最後の2桁を削除しcurl_exec()
機能にデータを送信する
//create reservation
$prod_items = array();
$single_item = array('product_uid'=>11449701010101);
$prod_items[] = $single_item;
$res_params = array(
'customer_id' => 1111,
'payment_type' => '',
'invoice_address_id' => 123,
'delivery_address_id' => 142,
'giftlist_id' => '',
'store_id' => '',
'items' => $prod_items
);
$res_url = $base_url . 'reservations';
$res_content = json_encode($res_params);
$res_curl = curl_init();
curl_setopt($res_curl, CURLOPT_HTTPHEADER, array('Authorization: ' . $authToken, 'Content-Type: application/json'));
curl_setopt($res_curl, CURLOPT_POST, true);
curl_setopt($res_curl, CURLOPT_POSTFIELDS, $res_content);
curl_setopt($res_curl, CURLOPT_URL, $res_url);
curl_setopt($res_curl, CURLOPT_RETURNTRANSFER, true);
$res_response = curl_exec($res_curl);
if ($res_response === FALSE)
die(curl_error($res_curl));
curl_close($res_curl);
$res_array = json_decode($res_response);
ものの、それは114497010101
として送信:
以下は私のコードです。
整数範囲の問題やカール関数に問題がありますか?