title: How t transfer money paypal to payment?
body: <p>I am new in paypal API. I am trying to transfer money from one paypal account to another paypal account but I am getting error. so please check my code and tell me what is wrong error.Your suggestions are welcome.</p>
  
  <p>This is the <strong>code</strong> I am trying :</p>
  
  <pre><code>$receiverList=array();
  $receiverList["receiver"][$counter]["amount"]=50;
  $receiverList["receiver"][$counter]["email"]='amandeep.singh@#######.com';
  $receiverList["receiver"][$counter]["paymentType"]="PAY";
  $receiverList["receiver"][$counter]["invoiceId"]=1548569;
  
  $payLoad["actionType"]="PAY";
  $payLoad["cancelUrl"]="";
  $payLoad["currencyCode"]="EUR";
  $payLoad["receiverList"]=$receiverList;
  $payLoad["feesPayer"]="SENDER ";
  $payLoad["sender"]["email"]='amandeep.singh@#######.com';
  
  //run the call
  $API_Endpoint = "https://svcs.sandbox.paypal.com/AdaptivePayments/Pay";
  
  
  $payLoad["requestEnvelope"]= array("errorLanguage"=&gt;urlencode("en_US"),"detailLevel"=&gt;urlencode("ReturnAll"));
  
  $ch = curl_init();
  curl_setopt($ch, CURLOPT_URL, $API_Endpoint);
  curl_setopt($ch, CURLOPT_VERBOSE, 1);
  curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
  curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
  curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
  curl_setopt($ch, CURLOPT_POST, 1);
  curl_setopt($ch, CURLOPT_HTTPHEADER,  array(
  'X-PAYPAL-REQUEST-DATA-FORMAT: JSON',
  'X-PAYPAL-RESPONSE-DATA-FORMAT: JSON',
  'X-PAYPAL-SECURITY-USERID: amandeep.singh-facilitator_api1.mobilyte.com',
  'X-PAYPAL-SECURITY-PASSWORD: AZVMY9FZK2J#####',
  'X-PAYPAL-SECURITY-SIGNATURE: AFcWxV21C7fd0v3bYYYRCpSSRl31AodeBybN3aK381NetHgWkUW1####',
  'X-PAYPAL-APPLICATION-ID: APP-80W28##########3'));  
  
  curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($payLoad));
  $response = curl_exec($ch);
  $response = json_decode($response, 1);
  </code></pre>
  
  <p>after call above curl, paypal return this <strong>error</strong>:-</p>
  
  <pre><code>Array ( [responseEnvelope] =&gt; Array ( [timestamp] =&gt; 2016-02-21T21:58:24.854-08:00 [ack] =&gt; Failure [correlationId] =&gt; 3693e36af347f [build] =&gt; 20367699 ) [error] =&gt; Array ( [0] =&gt; Array ( [errorId] =&gt; 560022 [domain] =&gt; PLATFORM [subdomain] =&gt; Application [severity] =&gt; Error [category] =&gt; Application [message] =&gt; The X-PAYPAL-APPLICATION-ID header contains an invalid value [parameter] =&gt; Array ( [0] =&gt; X-PAYPAL-APPLICATION-ID ) ) ) ) 
  </code></pre>