Common/Com/Alipay/Submit.cs
(开头部分) 7KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
namespace Com.Alipay
{
using System;
using System.Collections.Generic;
using System.IO;
using System.Net;
using System.Text;
using System.Xml;
public class Submit
{
private static string _input_charset = "";
private static string _key = "";
private static string _sign_type = "";
private static string GATEWAY_NEW = "https://mapi.alipay.com/gateway.do?";
static Submit()
{
_key = Config.Key.Trim();
_input_charset = Config.Input_charset.Trim().ToLower();
_sign_type = Config.Sign_type.Trim().ToUpper();
}
public static string BuildRequest(SortedDictionary<string, string> sParaTemp)
{
Encoding code = Encoding.GetEncoding(_input_charset);
string s = BuildRequestParaToString(sParaTemp, code);
byte[] bytes = code.GetBytes(s);
string requestUriString = GATEWAY_NEW + "_input_charset=" + _input_charset;
try
{
string str4;
HttpWebRequest request = (HttpWebRequest) WebRequest.Create(requestUriString);
request.Method = "post";
request.ContentType = "application/x-www-form-urlencoded";
request.ContentLength = bytes.Length;
Stream requestStream = request.GetRequestStream();
requestStream.Write(bytes, 0, bytes.Length);
requestStream.Close();
Stream responseStream = ((HttpWebResponse) request.GetResponse()).GetResponseStream();
StreamReader reader = new StreamReader(responseStream, code);
StringBuilder builder = new StringBuilder();
while ((str4 = reader.ReadLine()) != null)
{
builder.Append(str4);
}
responseStream.Close();
return builder.ToString();
}
catch (Exception exception)
{
return ("报错:" + exception.Message);
}
}
public static string BuildRequest(SortedDictionary<string, string> sParaTemp, string strMethod, string strButtonValue)
{
Dictionary<string, string> dictionary = new Dictionary<string, string>();
dictionary = BuildRequestPara(sParaTemp);
StringBuilder builder = new StringBuilder();
后面还有 104 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。
