[英]PayPal Express returns 4011 error message in Sandbox mode
I am using PayPal express in Sandbox mode in my PHP script (curl + SOAP).我在我的 PHP 脚本(curl + SOAP)中以沙盒模式使用 PayPal express。 I have a simple purchase form with 1 "buy" button.
我有一个带有 1 个“购买”按钮的简单购买表格。 When it's clicked I send initial SetExpressCheckout request and get successful response from paypal with Ack=success and a fresh token
当它被点击时,我发送初始 SetExpressCheckout 请求并通过 Ack=success 和一个新的令牌从贝宝获得成功的响应
<Ack xmlns="urn:ebay:apis:eBLBaseComponents">Success</Ack>
<Token xsi:type="ebl:ExpressCheckoutTokenType">EC-4GV76670YM092205U</Token></SetExpressCheckoutResponse>
Next I am trying to redirect script to PayPal with this new token:接下来,我尝试使用这个新令牌将脚本重定向到 PayPal:
header("Location: https://www.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=".$result[Token]."&address_override=1");
but as a result PayPal displays a page with error message:但结果 PayPal 显示了一个带有错误消息的页面:
We are sorry, we are experiencing temporary difficulties.很抱歉,我们遇到了暂时的困难。 Please try again later.
请稍后再试。 If this error occurred while making a payment, avoid duplicate payments by checking your Account Overview before resending a payment.
如果在付款时发生此错误,请在重新付款前检查您的帐户概览,以避免重复付款。 Message 4011
消息 4011
What can have caused this error?什么可能导致此错误? I am using a plain US/USD Sandbox account, the only thing that might look suspicious is that in paypal response xml username and password fields are empty.
我使用的是普通的 US/USD Sandbox 帐户,唯一可能看起来可疑的是在 paypal 响应中 xml 用户名和密码字段为空。
This error was cause by using SandBox credentials, while redirecting to non-sandbox URL.此错误是由使用 SandBox 凭据导致的,同时重定向到非沙箱 URL。 It should've been
header("Location: https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=".$result[Token]."&address_override=1")
;它应该是
header("Location: https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_express-checkout&token=".$result[Token]."&address_override=1")
;
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.