41 lines
1.6 KiB
C#
41 lines
1.6 KiB
C#
using System.Text;
|
|
using WX.CRM.BLL.Util;
|
|
using WX.CRM.Common;
|
|
using WX.CRM.IBLL.Util;
|
|
|
|
|
|
namespace WX.CRM.CRMServices.Level2
|
|
{
|
|
public class returnResult
|
|
{
|
|
public bool result { get; set; }
|
|
public int retcode { get; set; }
|
|
public int total { get; set; }
|
|
public string retMessage { get; set; }
|
|
public string retpwd { get; set; }
|
|
public returnResult getResult(string json, string url)
|
|
{
|
|
ISecurityHelper sHelper = new SecurityHelper();
|
|
string key = sHelper.createSignEncodingStr(json, SecurityHelper.OrderClientIdKey);
|
|
string response = Utility.PostData(url + "?" + key, Encoding.UTF8);
|
|
string _retmsg = sHelper.decyptData(SecurityHelper.OrderClientIdKey, response);
|
|
returnResult result = Utility.MAXJSONToObject<returnResult>(_retmsg);
|
|
return result;
|
|
}
|
|
}
|
|
public class PayOrderResult
|
|
{
|
|
public bool result { get; set; }
|
|
public int retcode { get; set; }
|
|
public string ApplyOrderId { get; set; }
|
|
public PayOrderResult getResule(string json, string url)
|
|
{
|
|
ISecurityHelper sHelper = new SecurityHelper();
|
|
string key = sHelper.createSignEncodingStr(json, SecurityHelper.OrderClientIdKey);
|
|
string response = Utility.PostData(url + "?" + key, Encoding.UTF8);
|
|
string _retmsg = sHelper.decyptData(SecurityHelper.OrderClientIdKey, response);
|
|
PayOrderResult result = Utility.JSONToObject<PayOrderResult>(_retmsg);
|
|
return result;
|
|
}
|
|
}
|
|
} |