C# GetExpressCheckoutDetails返回asp.net中已过期的会话(10411错误)(仅在某些计算机上)
我把Paypal集成到我的asp.net网站中,它在一些计算机上运行得很好,而在其他计算机上则没有 编辑:发现问题但正在寻找解决方案 问题在于: 事情似乎进展顺利,我可以用paypal支付,然后当它调用GetExpressCheckoutDetails时返回10411错误“此快速结账会话已过期” 我使用以下代码调用GetExpressCheckoutDetails:C# GetExpressCheckoutDetails返回asp.net中已过期的会话(10411错误)(仅在某些计算机上),c#,asp.net,paypal,checkout,C#,Asp.net,Paypal,Checkout,我把Paypal集成到我的asp.net网站中,它在一些计算机上运行得很好,而在其他计算机上则没有 编辑:发现问题但正在寻找解决方案 问题在于: 事情似乎进展顺利,我可以用paypal支付,然后当它调用GetExpressCheckoutDetails时返回10411错误“此快速结账会话已过期” 我使用以下代码调用GetExpressCheckoutDetails: public bool GetDetails(string token, ref NVPCodec decoder, ref st
public bool GetDetails(string token, ref NVPCodec decoder, ref string retMsg)
{
if (bSandbox)
{
pendpointurl = pendpointurl_SB;
host = host_SB;
SetCredentials(APIUsername_SB, APIPassword_SB, APISignature_SB);
}
NVPCodec encoder = new NVPCodec();
encoder["METHOD"] = "GetExpressCheckoutDetails";
encoder["TOKEN"] = token;
string pStrrequestforNvp = encoder.Encode();
string pStresponsenvp = HttpCall(pStrrequestforNvp);
decoder = new NVPCodec();
decoder.Decode(pStresponsenvp);
string strAck = decoder["ACK"].ToLower();
if (strAck != null && (strAck == "success" || strAck == "successwithwarning"))
{
return true;
}
else
{
retMsg = "ErrorCode=" + decoder["L_ERRORCODE0"] + "&" +
"Desc=" + decoder["L_SHORTMESSAGE0"] + "&" +
"Desc2=" + decoder["L_LONGMESSAGE0"];
return false;
}
}
这只发生在一些计算机上。。。而且它会立即发生,而不是会话还不应该过期
知道我做错了什么吗?有谁能帮忙吗
非常感谢 尝试从查询而不是从会话获取令牌:
use the function: Request.QueryString["token"];
谢谢,切拉里你在使用沙箱模式吗?我怀疑这是导致问题的原因,而实际操作中不应该出现这种情况。令牌不是问题所在。。我发现了这个问题并编辑了这个问题。它在沙盒和实际操作中都会发生,但同样只在某些计算机上发生。您能提供返回错误的API响应的副本吗?我在找一个相关ID