gpt4 book ai didi

php - "errorId": "560022", "message": "The X-PAYPAL-APPLICATION-ID header contains an invalid value", "parameter":[ "X-PAYPAL-APPLICATION-ID"]

转载 作者:太空宇宙 更新时间:2023-11-03 16:10:00 24 4
gpt4 key购买 nike

我没有使用沙盒端点(我也尝试过使用沙盒应用程序 ID,但这会给我错误的凭据错误)并尝试验证付款。

我在 PHP 中使用以下函数:

function verify_paypal($payKey)
{
global $payPalUser_Is, $payPalPassword, $payPalSig, $appID;
$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:JSON',
'X-PAYPAL-APPLICATION-ID:'.$appID
);
echo "$headerArray, $appID";
$url="https://svcs.paypal.com/AdaptivePayments/PaymentDetails?payKey={$payKey}&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);

echo $adaptiveResponse;
//return true or false, still got to handle the response
};

但它给出了app-id不正确的错误。我使用相同的 ID 来处理来自 android-app 的付款没有问题。有人知道我应该使用哪个 ID 吗?

最佳答案

REQUEST-DATA 应该是 NV:

$headerArray = array(
'X-PAYPAL-SECURITY-USERID:'.$payPalUser_Id,
'X-PAYPAL-SECURITY-PASSWORD:'.$payPalPassword,
'X-PAYPAL-SECURITY-SIGNATURE:'.$payPalSig,
'X-PAYPAL-REQUEST-DATA-FORMAT:NV',
'X-PAYPAL-RESPONSE-DATA-FORMAT:JSON',
'X-PAYPAL-APPLICATION-ID:'.$appID
);

关于php - "errorId": "560022", "message": "The X-PAYPAL-APPLICATION-ID header contains an invalid value", "parameter":[ "X-PAYPAL-APPLICATION-ID"],我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20232847/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com