Asp.net Paypal错误:处理请求超时
我正在使用Paypal_base.dll在我的asp.net网站中处理Paypal交易,但我遇到了错误。我的代码如下所示:Asp.net Paypal错误:处理请求超时,asp.net,paypal,runtime-error,Asp.net,Paypal,Runtime Error,我正在使用Paypal_base.dll在我的asp.net网站中处理Paypal交易,但我遇到了错误。我的代码如下所示: string Response; const string paymentAction = "Sale"; const string currency = "USD"; var caller = new NVPCallerServices(); IAPIProfile profile = ProfileFactory.createSign
string Response;
const string paymentAction = "Sale";
const string currency = "USD";
var caller = new NVPCallerServices();
IAPIProfile profile = ProfileFactory.createSignatureAPIProfile();
profile.APIUsername = ConfigurationManager.AppSettings["APIUsername"];
profile.APIPassword = ConfigurationManager.AppSettings["APIPassword"];
profile.APISignature = ConfigurationManager.AppSettings["token"];
profile.Environment= "SandBox";
caller.APIProfile = profile;
var encoder = new NVPCodec();
encoder["VERSION"] = "58.0";
encoder["METHOD"] = "DoDirectPayment";
encoder["PAYMENTACTION"] = paymentAction;
encoder["AMT"] = amount;
encoder["CREDITCARDTYPE"] = creditCardType;
encoder["ACCT"] = creditCardNumber;
encoder["EXPDATE"] = expdateMonth;
// encoder["CVV2"] = cvv2Number;
// encoder["FIRSTNAME"] = firstName;
// encoder["LASTNAME"] = lastName;
// encoder["STREET"] = city + ", " + state + ", " + countryCode;
// encoder["CITY"] = city;
// encoder["STATE"] = state;
// encoder["ZIP"] = zip;
encoder["COUNTRYCODE"] = countryCode;
encoder["CURRENCYCODE"] = currency;
// Execute the API operation and obtain the response.
string pStrrequestforNvp = encoder.Encode();
string pStresponsenvp = caller.Call(pStrrequestforNvp);
var decoder = new NVPCodec();
decoder.Decode(pStresponsenvp);
Response = decoder["L_LONGMESSAGE0"];
if (decoder["ACK"] == "Success")
{
}
return decoder["ACK"];
价值在
响应=解码器[“L_LONGMESSAGE0”];
是“超时处理请求”
解码器[“ACK”]给出“Failure”消息
caller.Call(pStrrequestforNvp)具有以下值:
时间戳=2013%2d10%2d02T22%3a40%3a04Z&CORRELATIONID=fa19cc06164da&ACK=Failure&L_ERRORCODE0=10001&L_SHORTMESSAGE0=Internal%20Error&L_LONGMESSAGE0=Timeout%20处理%20请求FWIW,
ACK
也可以SuccessWithWarning
。。。错误代码是什么?L_ERRORCODE0?解码器[“L_ERRORCODE0”]为“10001”