Paypal 延迟链式付款返回 "Internal server error. Please check the server logs for details1"

标签 paypal response delay payment chained

以下代码返回“内部服务器错误。请检查服务器日志以获取详细信息1” 数字“1”是响应?

我想知道哪里出了问题以及为什么我得不到正确的回应。 还有如何格式化请求以获得正确的响应。 谢谢!

$url = 'https://svcs.sandbox.paypal.com/AdaptivePayments/Pay&actionType=PAY_PRIMARY&clientDetails.applicationId=APP-80W284485P519543T&clientDetails.ipAddress=127.0.0.1&currencyCode=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=vorgminded@gmail.com&receiverList.receiver(0).primary=true&receiverList.receiver(1).amount=5.00&receiverList.receiver(1).email=v_corp@live.com&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);

最佳答案

经过几个小时的调查,这是调用的正确格式(代码如下)

  • 但是现在我得到了:

"2015-06-11T06:33:51.784-07:00Failure305229b402fe815743565520003PLATFORMApplicationErrorAuthentication failed. API credentials are incorrect."

感谢所有试图提供帮助的人。如果对新错误有任何建议,请回复。谢谢。

$url = 'https://svcs.sandbox.paypal.com/AdaptivePayments/PaymentDetails';


$parameters = 'actionType=PAY&clientDetails.applicationId=APP-80W284485P519543T&clientDetails.ipAddress=127.0.0.1&currencyCode=USD&feesPayer=EACHRECEIVER&memo=Example&returnUrl=http://www.yourdomain.com/success.html&cancelUrl=http://www.yourdomain.com/cancel.html&receiverList.receiver(0).amount=25.00&receiverList.receiver(0).email=vorgminded@gmail.com&receiverList.receiver(0).primary=true&receiverList.receiver(1).amount=5.00&receiverList.receiver(1).email=v_corp@live.com&receiverList.receiver(1).primary=false&requestEnvelope.errorLanguage=en_US';

$ch = curl_init();

curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POSTFIELDS, $parameters);
curl_setopt($ch,CURLOPT_HTTPHEADER,array(
'X-PAYPAL-SECURITY-USERID' => 'quxxxxxxxxxxator_api1.gmail.com',
'X-PAYPAL-SECURITY-PASSWORD' => 'QSH6xxxxxx2CXMW',
'X-PAYPAL-SECURITY-SIGNATURE' => 'Al.b0WCW1xxxxxxxxxxxxxxrApDew5IUXWrEqJehMdG.PVMtaC7u',
'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);

更新

  • 对于所有其他有相同问题的人:

header格式错误,数据类型错误,下面的代码正常执行

$url = 'https://svcs.sandbox.paypal.com/AdaptivePayments/Pay';


$parameters = 'actionType=PAY_PRIMARY&clientDetails.applicationId=APP-80W284485P519543T&clientDetails.ipAddress=143.95.39.52&currencyCode=USD&feesPayer=EACHRECEIVER&memo=Example&receiverList.receiver(0).amount=25.00&receiverList.receiver(0).email=v_corp-facilitator@live.com&receiverList.receiver(0).primary=true&receiverList.receiver(1).amount=5.00&receiverList.receiver(1).email=v_corp-buyer@live.com&receiverList.receiver(1).primary=false&requestEnvelope.errorLanguage=en_US&returnUrl=http://www.google.com&cancelUrl=http://www.net.hr';

$ch = curl_init();

curl_setopt($ch,CURLOPT_URL, $url);
curl_setopt($ch,CURLOPT_POSTFIELDS, $parameters);
$headers = array(
'X-PAYPAL-SECURITY-USERID: v_corp-facilitator_api1.live.com',
'X-PAYPAL-SECURITY-PASSWORD: MVDUDLUZTHUHFE23',
'X-PAYPAL-SECURITY-SIGNATURE: AmoptyIrmh6lUZc78BeJ.pp5-B1qAG6-LkYRukL6PdAXE1igG0TXwyNh',
'X-PAYPAL-REQUEST-DATA-FORMAT: NV',
'X-PAYPAL-RESPONSE-DATA-FORMAT: JSON',
'X-PAYPAL-APPLICATION-ID: APP-80W284485P519543T'
);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);





//execute post
$result = curl_exec($ch);

$resArr = json_decode($result);
print_r($result);

//close connection
curl_close($ch);

关于 Paypal 延迟链式付款返回 "Internal server error. Please check the server logs for details1",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30777899/

相关文章:

php - Paypal IPN : log for manual investigation

paypal - 此商家沙盒帐户已禁用 DPRP

paypal - paypal平行支付和链式支付的区别

methods - 如何在 Strongloop 上为自定义远程方法设置自定义架构

jquery - 为什么我不能使用 jQuery 延迟删除调用

jquery - 带有延迟和CSS动画的淡入效果jquery

android - 区分 PayPalConfiguration CONFIG_ENVIRONMENT

来自 rest 端点的 PHP 模拟数据

java - Spring Boot 如何在 POST 后返回响应

performance - CSS3 PIE : rounded corners slow down IE9, 即使它本身支持它们