title: Getting always INVALID_RESOURCE_ID when executing paypal payment through rest api
body: <p>Please Help!</p>
  
  <p>When executing paypal approved payment i am always getting below JSON response which is quite frustrating me :( </p>
  
  <pre><code>{
    "name": "INVALID_RESOURCE_ID",
    "message": "Requested resource ID was not found.",
    "information_link": "https://developer.paypal.com/webapps/developer/docs/api/#INVALID_RESOURCE_ID",
    "debug_id": "a09bc8e96fc48"
  }
  </code></pre>
  
  <p>Here's my code for papal api request which is same as paypal documentation</p>
  
  <pre><code>$curl = curl_init();
  curl_setopt_array($curl, array(
    CURLOPT_URL =&gt; "https://api.sandbox.paypal.com/v1/payments/payment/PAY-18X32451H0459092JKO7KFUI/execute",
    CURLOPT_RETURNTRANSFER =&gt; true,
    CURLOPT_ENCODING =&gt; "",
    CURLOPT_MAXREDIRS =&gt; 10,
    CURLOPT_TIMEOUT =&gt; 30,
    CURLOPT_HTTP_VERSION =&gt; CURL_HTTP_VERSION_1_1,
    CURLOPT_CUSTOMREQUEST =&gt; "POST",
    CURLOPT_POSTFIELDS =&gt; "{\"payer_id\": \"&lt;Some id here&gt;\"}",
    CURLOPT_HTTPHEADER =&gt; array(
      "authorization: Bearer A101.gMSMRy4uGwjHLcnY4mbzRXLkm9ct0wfPl2M5sV82B3rO01L_ipJHyA65kbIg8kz9.2_AHXRp5zZaZSEfqz-P3x8eai9y",
      "cache-control: no-cache",
      "content-type: application/json"
    ),
  ));
  
  $response = curl_exec($curl);
  $err = curl_error($curl);
  
  curl_close($curl);
  
  if ($err) {
    echo "cURL Error #:" . $err;
  } else {
    echo $response;
  }
  </code></pre>
  
  <p>Please help.</p>