I am trying to integrate razorpay and trying to fetch paymentId via OrderId But i am getting following error "description":"id is/are not required and should not be sent"
Here is my code,Where i am wrong ?
<?php
$fields = array();
$fields["id"] = "order_xxxxxxxxxxx";
$payment_id="order_F7ebrxPQMOTksa";
$url = 'https://api.razorpay.com/v1/orders/';
$key_id = "xxxxxxxxxxxxxxxxxxx";
$key_secret = "xxxxxxxxxxxxxxxxxxx";
$params = http_build_query($data);
//cURL Request
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_USERPWD, $key_id . ':' . $key_secret);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($fields));
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
$headers = array();
$headers[] = 'Accept: application/json';
$headers[] = 'Content-Type: application/json';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$data = curl_exec($ch);
echo "<pre>";print_r($data);
?>