PayPal Checkout.js:由于无效的身份验证凭据或缺少授权头,身份验证失败



我们已经在几个客户账户上成功运行PayPal Checkout.js支付了大约5年,但从昨天开始,我们注意到客户在他们的客户点击"使用PayPal支付"时收到以下错误(在控制台中);结帐按钮:

"Authentication failed due to invalid authentication credentials or a missing Authorization header"

仔细检查他们的实时客户端ID和沙箱客户端ID凭证,一切看起来正确。这个错误在沙箱模式下不会显示,只有在实时模式下才会显示。

作为参考,控制台中整个日志为:

checkout.js:6484 Uncaught Error: Request to post https://www.paypal.com/v1/payment-experience/web-profiles failed with 401 error. Correlation id: f5501848d84a8
{
"name": "AUTHENTICATION_FAILURE",
"debug_id": "f5501848d84a8",
"message": "Authentication failed due to invalid authentication credentials or a missing Authorization header",
"information_link": "https://developer.paypal.com/docs/api/payment-experience/#errors",
"details": []
}
有趣的是,如果我们将Live Client ID更改为不正确的内容,则返回的错误将更改为:
checkout.js:7123 Uncaught Error: Error: Request to post https://www.paypal.com/v1/oauth2/token failed with 401 error. Correlation id: f633416cb9298
{
"error": "invalid_client",
"error_description": "Client Authentication failed"
}

这将提示错误在于"缺少授权头";正如在原始错误中所指出的,但据我所知,paypal.Button.renderJS调用不允许直接编辑或传递头,只发送"客户端";

因为这是工作良好的几天前,我们正在使用相同的代码和凭证,当它工作时,我猜是外部的东西导致这一点。会不会是最近PayPal按钮API发生了变化,而我们没有注意到?任何帮助将非常感激!

谢谢,迈克尔

这最终是供应商的问题,两天后由PayPal修复。关于这个问题和修复的完整线程位于这里:https://www.paypal-community.com/t5/Sandbox-Environment/Authentication-failed-due-to-invalid-authentication-credentials/m-p/2954476

最新更新