public static JdWithdrawRequest BuildJdWithdrawRequest(string customerNo, string sha256SignKey, JdWithdrawBaseReq req) { var srcSignData = JdHelper.GetSignData(req); var jdReq = new JdWithdrawRequest(customerNo) { SignData = JdHelper.ComputeSha256(srcSignData + sha256SignKey), EncryptData = JdHelper.SignEnvelop(srcSignData) }; return(jdReq); }
public static async Task <T> GetWithdrawRspAsync <T>(string url, JdWithdrawRequest req) where T : class { url.NotNull("请求地址"); var reqBody = new Dictionary <string, string>(); reqBody.Add("encrypt_type", req.EncryptType); reqBody.Add("customer_no", req.CustomerNo); reqBody.Add("sign_data", req.SignData); reqBody.Add("encrypt_data", req.EncryptData); reqBody.Add("sign_type", req.SignTye); var httpReqModel = new HttpReqModel() { Url = url, Method = "post", ReqBody = reqBody }; return(await HttpHelper.GetResultAsync <T>(httpReqModel)); }