Ovi*_*Ovi 6 c# asp.net paypal checkout
我在我的asp.net网站上集成了Paypal,它在某些计算机上完美运行,而其他计算机则不然.
编辑:发现问题,但寻找解决方案
问题是如下:
事情似乎工作正常,我可以用paypal支付,然后当它调用GetExpressCheckoutDetails时,它返回10411错误 ' 此快速结账会话已过期'
我用以下代码调用GetExpressCheckoutDetails:
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;
}
}
Run Code Online (Sandbox Code Playgroud)
这只发生在某些计算机上 ......它会立即发生,而不是会话不会过期.
知道我做错了什么吗?可以请任何人请帮忙???
非常非常感谢你!
小智 1
尝试从查询中获取令牌,而不是从会话中获取:
\n\nuse the function: Request.QueryString["token"];\nRun Code Online (Sandbox Code Playgroud)\n\n谢谢,\xc3\x87a\xc4\x9flar
\n| 归档时间: |
|
| 查看次数: |
1112 次 |
| 最近记录: |