title: 580001 Invalid request: {0} PayPal (PHP)
body: <p>I'm sending userid and password from this page: <a href="https://www.paypal.com/us/cgi-bin/webscr?cmd=_profile-api-signature" rel="nofollow">https://www.paypal.com/us/cgi-bin/webscr?cmd=_profile-api-signature</a></p>
  
  <p>And the AppId is the ID I use in my android app to create payments: <a href="https://apps.paypal.com/user/my-account/applications" rel="nofollow">https://apps.paypal.com/user/my-account/applications</a></p>
  
  <p>I'm using the follow function:</p>
  
  <pre><code>function verify_paypal($payKey, $appID)
  {
    global $payPalUser_Id, $payPalPassword, $payPalSig;
  $headerArray = array(
  'X-PAYPAL-SECURITY-USERID:'.$payPalUser_Id,
  'X-PAYPAL-SECURITY-PASSWORD:'.$payPalPassword,
  'X-PAYPAL-SECURITY-SIGNATURE:'.$payPalSig,
  'X-PAYPAL-REQUEST-DATA-FORMAT:JSON',
  'X-PAYPAL-RESPONSE-DATA-FORMAT:XML',
  'X-PAYPAL-APPLICATION-ID:'.$appID
  );
  
  $url="https://svcs.paypal.com/AdaptivePayments/PaymentDetails?payKey={$payKey}&amp;requestEnvelope.errorLanguage=en_US";
  $ch = curl_init($url);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($ch, CURLOPT_HTTPHEADER, $headerArray);
  $adaptiveResponse = curl_exec($ch);
  curl_close($ch);
  return $adaptiveResponse;
  }
  </code></pre>
  
  <p>But it gives this error:</p>
  
  <pre><code>&lt;?xml version='1.0' encoding='UTF-8'?&gt;
  &lt;ns3:FaultMessage xmlns:ns3="http://svcs.paypal.com/types/common" xmlns:ns2="http://svcs.paypal.com/types/ap"&gt;
  &lt;responseEnvelope&gt;
  &lt;timestamp&gt;2013-11-27T14:58:07.463-08:00&lt;/timestamp&gt;
  &lt;ack&gt;Failure&lt;/ack&gt;
  &lt;correlationId&gt;d97c635f935b3&lt;/correlationId&gt;
  &lt;build&gt;7935900&lt;/build&gt;
  &lt;/responseEnvelope&gt;
  &lt;error&gt;
  &lt;errorId&gt;580001&lt;/errorId&gt;
  &lt;domain&gt;PLATFORM&lt;/domain&gt;
  &lt;subdomain&gt;Application&lt;/subdomain&gt;
  &lt;severity&gt;Error&lt;/severity&gt;
  &lt;category&gt;Application&lt;/category&gt;
  &lt;message&gt;Invalid request: {0}&lt;/message&gt;
  &lt;/error&gt;
  &lt;/ns3:FaultMessage&gt;
  </code></pre>