The following code returns "Internal server error. Please check the server logs for details1" The number "1" is response?
I would like to know what is wrong and why I can't get proper response. Also how to format request to get proper response. Thanks!
$url = 'https://svcs.sandbox.paypal.com/AdaptivePayments/Pay&actionType=PAY_PRIMARY&clientDetails.applicationId=APP-80W284485P519543T&clientDetails.ipAddress=127.0.0.1¤cyCode=USD&feesPayer=EACHRECEIVER&memo=Example&requestEnvelope.errorLanguage=en_US&returnUrl=http://www.yourdomain.com/success.html&cancelUrl=http://www.yourdomain.com/cancel.html&receiverList.receiver(0).amount=25.00&receiverList.receiver(0)[email protected]&receiverList.receiver(0).primary=true&receiverList.receiver(1).amount=5.00&receiverList.receiver(1)[email protected]&receiverList.receiver(1).primary=false&requestEnvelope.errorLanguage=en_US';
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_HTTPHEADER,array(
"X-PAYPAL-SECURITY-USERID: vorhegmindehd_api1.gmail.com",
"X-PAYPAL-SECURITY-PASSWORD: 5VV5B8M8CAH9ZHEZ",
"X-PAYPAL-SECURITY-SIGNATURE: AiPC9BikCyDFQXbSkoZcgqH3hpacA3-z5-u8OUawhrQsZCBMbprk73z7",
"X-PAYPAL-REQUEST-DATA-FORMAT: NV",
"X-PAYPAL-RESPONSE-DATA-FORMAT: NV",
"X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T"
));
//execute post
$result = curl_exec($ch);
$resArr = json_decode($result);
print_r($result);
//close connection
curl_close($ch);
After many hours of investigation, this is the right format of the call (code below)
Thanks to all who tried to help. If any suggestion about the new error, please reply. Thanks.
UPDATE
Headers were fromatted in a wrong way, also data type was wrong, the code below executes normal