我正在开发一种机制,将资金一次转移到贝宝的多个账户中。它通过以下代码使用对 MassPay API 的调用(凭证被加扰)。
public static string TestMassPay()
{
//X509Certificate x509 = new X509Certificate("Certifcate Description");
X509Certificate x509 = null;
HttpWebRequest objRequest = (HttpWebRequest)WebRequest.Create(URL);
string postData = "METHOD=MassPay&EMAILSUBJECT=You+have+money!&RECEIVERTYPE=EmailAddress&CURRENCYCODE=USD&L_EMAIL0=mr.kaleemullah%40gmail.com&L_Amt0=1.00&L_UNIQUEID0=&L_NOTE0=&USER=ali_api1.sevdotcom.ae&PWD=TLPPC43GDDM9DKZ9&SIGNATURE=Are9-8DOFiZXJtjX-8nkuOpzmTl2AQTy0kHQ5oey6i4QxuaeJ0z-Amhk&VERSION=1&SOURCE=1";
objRequest.Timeout = TimeOut;
objRequest.Method = "POST";
objRequest.ContentLength = postData.Length;
if (null != x509)
{
objRequest.ClientCertificates.Add(x509);
}
using (StreamWriter myWriter = new StreamWriter(objRequest.GetRequestStream()))
{
myWriter.Write(postData);
}
using (WebResponse response = objRequest.GetResponse())
{
using (StreamReader sr = new StreamReader(response.GetResponseStream()))
{
string strResponse = sr.ReadToEnd();
NameValueCollection qscoll = HttpUtility.ParseQueryString(strResponse);
return strResponse;
}
}
}
它给了我以下错误
&L_LONGMESSAGE0=Security%20header%20is%20not%20valid
我也搜索了该错误,但一无所获。
我认为我需要提供有关我在文档中找不到任何内容的安全证书的详细信息。谢谢