Google Checkout 错误,“构建因异常而失败”

发布于 2024-08-14 15:58:40 字数 315 浏览 5 评论 0原文

我想在我的 PHP 项目(在 Apache 上运行)中实现 Google Checkout。我将回调 URL 放入我的商家中心帐户中。我的结帐处于沙盒模式。下订单时,我在商家中心收到以下错误消息:

We encountered an error trying to access your server at myurl.org -- the error we got is 

 Send failed with code: 401. 
 Response body was: Failed to Get Basic Authentication Headers

I want to implement Google Checkout in my PHP project (running on Apache). I put the callback URL in my merchant center account. My Checkout is in sandbox mode. When placing an order I get the following error message in my merchant center:

We encountered an error trying to access your server at myurl.org -- the error we got is 

 Send failed with code: 401. 
 Response body was: Failed to Get Basic Authentication Headers

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

耳钉梦 2024-08-21 15:58:40

由于这个问题的两个版本都没有得到解决,我想我会在我编辑的版本中添加一些建议:

我一点也不熟悉 Google Checkout 及其 API,但是快速维基百科搜索 HTTP 错误告诉我, 401错误是因为身份验证失败。请注意,这与身份验证被拒绝(错误 403:禁止)不同,而是实际的身份验证尝试失败。一个很好的类比可能是想象一下,走到一扇门前,被要求提供秘密密码(我们会说是 Fedelio),而不是说“Applesauce”并因非法侵入而受到殴打(错误 403) )而不是用“嗯?”来回应。看门人只是站在那里想知道你是否知道他所说的密码是什么意思。

同一篇 wiki 文章引用了与此错误相关的基本身份验证。我也强烈建议您对此进行研究。

长话短说,您的用户在请求 URL 时需要进行身份验证,但听起来您正在尝试请求站点服务器端或通过某种重定向,因此服务器返回 401 错误而不是返回登录提示。

Since neither version of this question has been addressed, I figure I'll add some advice to the one I edited:

I'm not at all familiar with Google Checkout and its API, but a quick Wikipedia search for HTTP error informs me that a 401 error is because authentication has failed. Note, this is not the same as the authentication being rejected (error 403: Forbidden) but rather that the actual attempt to authenticate failed. A good analogy might be to imagine going to a door, being asked for the secret password (which we'll say is Fedelio) and instead of saying "Applesauce" and getting beat up for trespassing (error 403) instead you respond with "Huh?" and the gate keeper simply stands there wondering if you even know what he meant by password.

The same wiki article refers to Basic Authentication in relationship to this error. I highly reccommend taking a look into that as well.

Long story short, your users need to authenticate when the URL is requested, but it sounds like you are trying to request the site server-side or through some kind of redirect, so the server is returning the 401 error instead of returning a login prompt.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文