English 中文(简体)
工资明快报退款——安全头盔不有效
原标题:PayPal Express Checkout returns - Security header is not valid

This has probably been asked a thousand times... But i m sure i have all the endpoints and credentials right. It was working yesterday.

Security error:
Error no: 10002
Error message: Security header is not valid

Right now i m testing against the sandbox server.

www.un.org/Depts/DGACM/index_spanish.htm 每当在我的浏览器中尝试测试URL时,就会发现ACK=Success,但当它通过该代码运行时,会发现“安全头盔”错误。

几个小时前,它一直在工作,但出于某种原因,现在却继续犯同样的错误。

利用用户/纸浆和沙箱账户的签名

https://api-3t.sandbox.paypal.com/nvp
USER=xxxxxxxxxxxxxxxxxxxx
PWD=XXXXXXXXXXXXX
SIGNATURE=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I have the following test code:

        String testURL = "https://api-3t.sandbox.paypal.com/nvp?USER=xxxxxxxxxxxxxxxxxxxx&PWD=XXXXXXXXXXXXX&SIGNATURE=XXXXXXXXXXXXXXXXXXXXXXXXXXXXX&VERSION=84.0-2276209&PAYMENTREQUEST_0_PAYMENTACTION=Sale&PAYMENTREQUEST_0_AMT=15&RETURNURL=https%3a%2f%2fdomain.com%2fCheckout.aspx&CANCELURL=https%3a%2f%2fdomain.com%2fCheckout.aspx&METHOD=SetExpressCheckout";

        HttpWebRequest req = (HttpWebRequest)WebRequest.Create(testURL);
        req.Method = "POST";
        req.ContentType = "application/x-www-form-urlencoded";


        //Send the request to PayPal and get the response
        StreamWriter streamOut = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII);
        streamOut.Write(testURL);
        streamOut.Close();
        // get resposne
        StreamReader streamIn = new StreamReader(req.GetResponse().GetResponseStream());
        string strResponse = HttpUtility.UrlDecode(streamIn.ReadToEnd());
        streamIn.Close();

HTTPREsponse when code sends it

TIMESTAMP=2011-11-22T23:25:34Z&CORRELATIONID=392047cb78388&ACK=Failure&VERSION=84.000000&BUILD=2271164&L_ERRORCODE0=10002&L_SHORTMESSAGE0=Security error&L_LONGMESSAGE0=Security header is not valid&L_SEVERITYCODE0=Error

HttpResponse if i just copy paste the testURL in the browser

TOKEN=EC%2d4JW15968AV8121546&TIMESTAMP=2011%2d11%2d22T22%3a59%3a27Z&CORRELATIONID=c790299fd9ac7&ACK=Success&VERSION=84%2e000000&BUILD=2271164

I ve tried not to UrlEncode the variables in the test url... same problem

预先感谢

最佳回答

这可能是在佩帕尔一侧的ug。

如果一经修改试验 乌尔都语

String testURL = “https://api-3t.sand Box. Paypal.com/nvp?USER=XXX&PWD=YYY&SentA=ZZZZZ&VERSION= &METHOD=SetExCheckout”;

纽约总部

String testURL = "https://api-3t.sandbox.paypal.com/nvp?&x=y&USER=XXX&PWD=YYY&SIGNATURE=ZZZ&VERSION=.......&METHOD=SetExpressCheckout";

它的工作

See the bolded part with random first querystring variable. PayPal seems 纽约总部 ignore the first querystring parameter when it s sent from codebehind (which would be user=xxx if there wasn’t x=y before it).

问题回答

暂无回答




相关问题
Anyone feel like passing it forward?

I m the only developer in my company, and am getting along well as an autodidact, but I know I m missing out on the education one gets from working with and having code reviewed by more senior devs. ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Transaction handling with TransactionScope

I am implementing Transaction using TransactionScope with the help this MSDN article http://msdn.microsoft.com/en-us/library/system.transactions.transactionscope.aspx I just want to confirm that is ...

System.Web.Mvc.Controller Initialize

i have the following base controller... public class BaseController : Controller { protected override void Initialize(System.Web.Routing.RequestContext requestContext) { if (...

Microsoft.Contracts namespace

For what it is necessary Microsoft.Contracts namespace in asp.net? I mean, in what cases I could write using Microsoft.Contracts;?

Separator line in ASP.NET

I d like to add a simple separator line in an aspx web form. Does anyone know how? It sounds easy enough, but still I can t manage to find how to do it.. 10x!

热门标签