接口文件
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.0</TargetFramework>
|
||||
<Version>2.5.0.1</Version>
|
||||
<Authors>stulzq</Authors>
|
||||
<Description>支付宝(Alipay)服务端SDK,与官方SDK接口完全相同。完全可以按照官方文档进行开发。除了支持支付以外,官方SDK支持的功能本SDK全部支持,且用法几乎一样,代码都可参考官方文档代码。github:https://github.com/stulzq/Alipay.AopSdk.Core,访问github获取demo以及使用文档。</Description>
|
||||
<Copyright>Copyright 2017-2019 stulzq</Copyright>
|
||||
<PackageProjectUrl>https://github.com/stulzq/Alipay.AopSdk.Core</PackageProjectUrl>
|
||||
<PackageRequireLicenseAcceptance>true</PackageRequireLicenseAcceptance>
|
||||
<PackageTags>Alipay,AopSdk,支付宝服务端SDK,支付宝支付</PackageTags>
|
||||
<PackageReleaseNotes>添加 AlipayOpenAppMiniTemplatemessage</PackageReleaseNotes>
|
||||
<RepositoryUrl>https://github.com/stulzq/Alipay.AopSdk.Core</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
<PackageLicenseUrl />
|
||||
<PackageLicenseFile>LICENSE</PackageLicenseFile>
|
||||
<PackageIcon>logo.jpg</PackageIcon>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
<PackageReference Include="Nito.AsyncEx" Version="5.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="..\LICENSE">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath></PackagePath>
|
||||
</None>
|
||||
<None Include="..\logo.jpg">
|
||||
<Pack>True</Pack>
|
||||
<PackagePath></PackagePath>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -0,0 +1,11 @@
|
||||
namespace Alipay.AopSdk.Core
|
||||
{
|
||||
public class AlipayConstants
|
||||
{
|
||||
public const string RESPONSE_SUFFIX = "_response";
|
||||
public const string ERROR_RESPONSE = "error_response";
|
||||
public const string SIGN = "sign";
|
||||
|
||||
public const string ENCRYPT_NODE_NAME = "response_encrypted";
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,238 @@
|
||||
using System;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Alipay.AopSdk.Core.Parser;
|
||||
using Alipay.AopSdk.Core.Util;
|
||||
|
||||
namespace Alipay.AopSdk.Core
|
||||
{
|
||||
public class AlipayMobilePublicMultiMediaClient : IAopClient
|
||||
{
|
||||
public const string APP_ID = "app_id";
|
||||
public const string FORMAT = "format";
|
||||
public const string METHOD = "method";
|
||||
public const string TIMESTAMP = "timestamp";
|
||||
public const string VERSION = "version";
|
||||
public const string SIGN_TYPE = "sign_type";
|
||||
public const string ACCESS_TOKEN = "auth_token";
|
||||
public const string SIGN = "sign";
|
||||
public const string TERMINAL_TYPE = "terminal_type";
|
||||
public const string TERMINAL_INFO = "terminal_info";
|
||||
public const string PROD_CODE = "prod_code";
|
||||
public const string APP_AUTH_TOKEN = "app_auth_token";
|
||||
private readonly string appId;
|
||||
private readonly string charset;
|
||||
private string format;
|
||||
private readonly string privateKeyPem;
|
||||
private readonly string serverUrl;
|
||||
private readonly string signType = "RSA";
|
||||
|
||||
private string version;
|
||||
|
||||
private readonly WebUtils webUtils;
|
||||
|
||||
public string Version
|
||||
{
|
||||
get => version != null ? version : "1.0";
|
||||
set => version = value;
|
||||
}
|
||||
|
||||
public string Format
|
||||
{
|
||||
get => format != null ? format : "json";
|
||||
set => format = value;
|
||||
}
|
||||
|
||||
public T PageExecute<T>(IAopRequest<T> request) where T : AopResponse
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public T PageExecute<T>(IAopRequest<T> request, string session, string reqMethod) where T : AopResponse
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public T SdkExecute<T>(IAopRequest<T> request) where T : AopResponse
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<T> PageExecuteAsync<T>(IAopRequest<T> request) where T : AopResponse
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<T> PageExecuteAsync<T>(IAopRequest<T> request, string accessToken, string reqMethod) where T : AopResponse
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<T> ExecuteAsync<T>(IAopRequest<T> request) where T : AopResponse
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<T> ExecuteAsync<T>(IAopRequest<T> request, string accessToken) where T : AopResponse
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
public Task<T> ExecuteAsync<T>(IAopRequest<T> request, string accessToken, string appAuthToken) where T : AopResponse
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
|
||||
private AopResponse DoGet(AopDictionary parameters, Stream outStream)
|
||||
{
|
||||
return AsyncHelper.RunSync(async () => await DoGetAsync(parameters, outStream));
|
||||
}
|
||||
|
||||
private async Task<AopResponse> DoGetAsync(AopDictionary parameters, Stream outStream)
|
||||
{
|
||||
AlipayMobilePublicMultiMediaDownloadResponse response = null;
|
||||
|
||||
var url = serverUrl;
|
||||
if (parameters != null && parameters.Count > 0)
|
||||
if (url.Contains("?"))
|
||||
url = url + "&" + WebUtils.BuildQuery(parameters, charset);
|
||||
else
|
||||
url = url + "?" + WebUtils.BuildQuery(parameters, charset);
|
||||
|
||||
var client = webUtils.ConnectionPool.GetClient();
|
||||
var query=new Uri(url).Query;
|
||||
var resp = await client.GetAsync(query);
|
||||
if (resp.StatusCode == HttpStatusCode.OK)
|
||||
{
|
||||
|
||||
var body = await resp.Content.ReadAsStringAsync();
|
||||
IAopParser<AlipayMobilePublicMultiMediaDownloadResponse> tp =
|
||||
new AopJsonParser<AlipayMobilePublicMultiMediaDownloadResponse>();
|
||||
response = tp.Parse(body, charset);
|
||||
}
|
||||
else
|
||||
{
|
||||
response = new AlipayMobilePublicMultiMediaDownloadResponse();
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 把响应流转换为文本。
|
||||
/// </summary>
|
||||
/// <param name="rsp">响应流对象</param>
|
||||
/// <param name="encoding">编码方式</param>
|
||||
/// <returns>响应文本</returns>
|
||||
public void GetResponseAsStream(Stream outStream, HttpWebResponse rsp)
|
||||
{
|
||||
var result = new StringBuilder();
|
||||
Stream stream = null;
|
||||
StreamReader reader = null;
|
||||
BinaryWriter writer = null;
|
||||
|
||||
try
|
||||
{
|
||||
// 以字符流的方式读取HTTP响应
|
||||
stream = rsp.GetResponseStream();
|
||||
reader = new StreamReader(stream);
|
||||
|
||||
writer = new BinaryWriter(outStream);
|
||||
|
||||
//stream.CopyTo(outStream);
|
||||
var length = Convert.ToInt32(rsp.ContentLength);
|
||||
var buffer = new byte[length];
|
||||
var rc = 0;
|
||||
while ((rc = stream.Read(buffer, 0, length)) > 0)
|
||||
outStream.Write(buffer, 0, rc);
|
||||
outStream.Flush();
|
||||
outStream.Close();
|
||||
}
|
||||
finally
|
||||
{
|
||||
// 释放资源
|
||||
if (reader != null) reader.Close();
|
||||
if (stream != null) stream.Close();
|
||||
if (rsp != null) rsp.Close();
|
||||
}
|
||||
}
|
||||
|
||||
#region DefaultAopClient Constructors
|
||||
|
||||
public AlipayMobilePublicMultiMediaClient(string serverUrl, string appId, string privateKeyPem)
|
||||
{
|
||||
this.appId = appId;
|
||||
this.privateKeyPem = privateKeyPem;
|
||||
this.serverUrl = serverUrl;
|
||||
webUtils = new WebUtils(serverUrl);
|
||||
}
|
||||
|
||||
public AlipayMobilePublicMultiMediaClient(string serverUrl, string appId, string privateKeyPem, string format)
|
||||
: this(serverUrl, appId, privateKeyPem)
|
||||
{
|
||||
this.format = format;
|
||||
}
|
||||
|
||||
public AlipayMobilePublicMultiMediaClient(string serverUrl, string appId, string privateKeyPem, string format,
|
||||
string charset)
|
||||
: this(serverUrl, appId, privateKeyPem, format)
|
||||
{
|
||||
this.charset = charset;
|
||||
}
|
||||
|
||||
public AlipayMobilePublicMultiMediaClient(string serverUrl, string appId, string privateKeyPem, string format,
|
||||
string version, string signType)
|
||||
: this(serverUrl, appId, privateKeyPem, format)
|
||||
{
|
||||
this.version = version;
|
||||
this.signType = signType;
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
#region IAopClient Members
|
||||
|
||||
public T Execute<T>(IAopRequest<T> request) where T : AopResponse
|
||||
{
|
||||
return Execute(request, null);
|
||||
}
|
||||
|
||||
public T Execute<T>(IAopRequest<T> request, string accessToken) where T : AopResponse
|
||||
{
|
||||
return Execute(request, accessToken, null);
|
||||
}
|
||||
|
||||
public T Execute<T>(IAopRequest<T> request, string accessToken, string appAuthToken) where T : AopResponse
|
||||
{
|
||||
var multiMediaDownloadRequest = (AlipayMobilePublicMultiMediaDownloadRequest) request;
|
||||
// 添加协议级请求参数
|
||||
var txtParams = new AopDictionary(request.GetParameters());
|
||||
txtParams.Add(METHOD, request.GetApiName());
|
||||
txtParams.Add(VERSION, Version);
|
||||
txtParams.Add(APP_ID, appId);
|
||||
txtParams.Add(FORMAT, format);
|
||||
txtParams.Add(TIMESTAMP, DateTime.Now);
|
||||
txtParams.Add(ACCESS_TOKEN, accessToken);
|
||||
txtParams.Add(SIGN_TYPE, signType);
|
||||
txtParams.Add(TERMINAL_TYPE, request.GetTerminalType());
|
||||
txtParams.Add(TERMINAL_INFO, request.GetTerminalInfo());
|
||||
txtParams.Add(PROD_CODE, request.GetProdCode());
|
||||
|
||||
if (!string.IsNullOrEmpty(appAuthToken))
|
||||
txtParams.Add(APP_AUTH_TOKEN, appAuthToken);
|
||||
|
||||
|
||||
// 添加签名参数
|
||||
txtParams.Add(SIGN, AopUtils.SignAopRequest(txtParams, privateKeyPem, charset, signType));
|
||||
|
||||
var outStream = multiMediaDownloadRequest.stream;
|
||||
var rsp = DoGet(txtParams, outStream);
|
||||
|
||||
return (T) rsp;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,117 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Alipay.AopSdk.Core
|
||||
{
|
||||
public class AlipayMobilePublicMultiMediaDownloadRequest : IAopRequest<AlipayMobilePublicMultiMediaDownloadResponse>
|
||||
{
|
||||
public string BizContent { get; set; }
|
||||
public Stream stream { set; get; }
|
||||
|
||||
#region IAopRequest Members
|
||||
|
||||
private string apiVersion = "1.0";
|
||||
private string terminalType;
|
||||
private string terminalInfo;
|
||||
private string prodCode;
|
||||
private string notifyUrl;
|
||||
private string returnUrl;
|
||||
private bool needEncrypt;
|
||||
private AopObject bizModel;
|
||||
|
||||
public void SetNeedEncrypt(bool needEncrypt)
|
||||
{
|
||||
this.needEncrypt = needEncrypt;
|
||||
}
|
||||
|
||||
|
||||
public bool GetNeedEncrypt()
|
||||
{
|
||||
return needEncrypt;
|
||||
}
|
||||
|
||||
public void SetNotifyUrl(string notifyUrl)
|
||||
{
|
||||
this.notifyUrl = notifyUrl;
|
||||
}
|
||||
|
||||
public string GetNotifyUrl()
|
||||
{
|
||||
return notifyUrl;
|
||||
}
|
||||
|
||||
public void SetReturnUrl(string returnUrl)
|
||||
{
|
||||
this.returnUrl = returnUrl;
|
||||
}
|
||||
|
||||
public string GetReturnUrl()
|
||||
{
|
||||
return returnUrl;
|
||||
}
|
||||
|
||||
public void SetApiVersion(string apiVersion)
|
||||
{
|
||||
this.apiVersion = apiVersion;
|
||||
}
|
||||
|
||||
public string GetApiVersion()
|
||||
{
|
||||
return apiVersion;
|
||||
}
|
||||
|
||||
public void SetTerminalType(string terminalType)
|
||||
{
|
||||
this.terminalType = terminalType;
|
||||
}
|
||||
|
||||
public string GetTerminalType()
|
||||
{
|
||||
return terminalType;
|
||||
}
|
||||
|
||||
public void SetTerminalInfo(string terminalInfo)
|
||||
{
|
||||
this.terminalInfo = terminalInfo;
|
||||
}
|
||||
|
||||
public string GetTerminalInfo()
|
||||
{
|
||||
return terminalInfo;
|
||||
}
|
||||
|
||||
public void SetProdCode(string prodCode)
|
||||
{
|
||||
this.prodCode = prodCode;
|
||||
}
|
||||
|
||||
public string GetProdCode()
|
||||
{
|
||||
return prodCode;
|
||||
}
|
||||
|
||||
public string GetApiName()
|
||||
{
|
||||
return "alipay.mobile.public.multimedia.download";
|
||||
}
|
||||
|
||||
public IDictionary<string, string> GetParameters()
|
||||
{
|
||||
var parameters = new AopDictionary();
|
||||
parameters.Add("biz_content", BizContent);
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public AopObject GetBizModel()
|
||||
{
|
||||
return bizModel;
|
||||
}
|
||||
|
||||
public void SetBizModel(AopObject bizModel)
|
||||
{
|
||||
this.bizModel = bizModel;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
namespace Alipay.AopSdk.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayMobilePublicMultiMediaDownloadResponse.
|
||||
/// </summary>
|
||||
public class AlipayMobilePublicMultiMediaDownloadResponse : AopResponse
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace Alipay.AopSdk.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// 符合AOP习惯的纯字符串字典结构。
|
||||
/// </summary>
|
||||
public class AopDictionary : Dictionary<string, string>
|
||||
{
|
||||
private const string DATE_TIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
|
||||
|
||||
public AopDictionary()
|
||||
{
|
||||
}
|
||||
|
||||
public AopDictionary(IDictionary<string, string> dictionary)
|
||||
: base(dictionary)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 添加一个新的键值对。空键或者空值的键值对将会被忽略。
|
||||
/// </summary>
|
||||
/// <param name="key">键名称</param>
|
||||
/// <param name="value">键对应的值,目前支持:string, int, long, double, bool, DateTime类型</param>
|
||||
public void Add(string key, object value)
|
||||
{
|
||||
string strValue;
|
||||
|
||||
if (value == null)
|
||||
{
|
||||
strValue = null;
|
||||
}
|
||||
else if (value is string)
|
||||
{
|
||||
strValue = (string) value;
|
||||
}
|
||||
else if (value is DateTime?)
|
||||
{
|
||||
var dateTime = value as DateTime?;
|
||||
strValue = dateTime.Value.ToString(DATE_TIME_FORMAT);
|
||||
}
|
||||
else if (value is int?)
|
||||
{
|
||||
strValue = (value as int?).Value.ToString();
|
||||
}
|
||||
else if (value is long?)
|
||||
{
|
||||
strValue = (value as long?).Value.ToString();
|
||||
}
|
||||
else if (value is double?)
|
||||
{
|
||||
strValue = (value as double?).Value.ToString();
|
||||
}
|
||||
else if (value is bool?)
|
||||
{
|
||||
strValue = (value as bool?).Value.ToString().ToLower();
|
||||
}
|
||||
else
|
||||
{
|
||||
strValue = value.ToString();
|
||||
}
|
||||
|
||||
Add(key, strValue);
|
||||
}
|
||||
|
||||
public new void Add(string key, string value)
|
||||
{
|
||||
if (!string.IsNullOrEmpty(key) && !string.IsNullOrEmpty(value))
|
||||
base.Add(key, value);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
using System;
|
||||
using System.Runtime.Serialization;
|
||||
|
||||
namespace Alipay.AopSdk.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// AOP客户端异常。
|
||||
/// </summary>
|
||||
public class AopException : Exception
|
||||
{
|
||||
public AopException()
|
||||
{
|
||||
}
|
||||
|
||||
public AopException(string message)
|
||||
: base(message)
|
||||
{
|
||||
}
|
||||
|
||||
protected AopException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
}
|
||||
|
||||
public AopException(string message, Exception innerException)
|
||||
: base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
public AopException(string errorCode, string errorMsg)
|
||||
: base(errorCode + ":" + errorMsg)
|
||||
{
|
||||
ErrorCode = errorCode;
|
||||
ErrorMsg = errorMsg;
|
||||
}
|
||||
|
||||
public string ErrorCode { get; }
|
||||
|
||||
public string ErrorMsg { get; }
|
||||
}
|
||||
}
|
||||
12
Infrastructure/ServiceClient/Alipay.AopSdk.Core/AopObject.cs
Normal file
12
Infrastructure/ServiceClient/Alipay.AopSdk.Core/AopObject.cs
Normal file
@@ -0,0 +1,12 @@
|
||||
using System;
|
||||
|
||||
namespace Alipay.AopSdk.Core
|
||||
{
|
||||
/// <summary>
|
||||
/// 基础对象。
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public abstract class AopObject
|
||||
{
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,73 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core
|
||||
{
|
||||
[Serializable]
|
||||
public abstract class AopResponse
|
||||
{
|
||||
private string body;
|
||||
private string code;
|
||||
private string msg;
|
||||
private string subCode;
|
||||
private string subMsg;
|
||||
|
||||
/// <summary>
|
||||
/// 错误码
|
||||
/// 对应 ErrCode
|
||||
/// </summary>
|
||||
[JsonProperty("code")]
|
||||
public string Code
|
||||
{
|
||||
get => code;
|
||||
set => code = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 错误信息
|
||||
/// 对应 ErrMsg
|
||||
/// </summary>
|
||||
[JsonProperty("msg")]
|
||||
public string Msg
|
||||
{
|
||||
get => msg;
|
||||
set => msg = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 子错误码
|
||||
/// 对应 SubErrCode
|
||||
/// </summary>
|
||||
[JsonProperty("sub_code")]
|
||||
public string SubCode
|
||||
{
|
||||
get => subCode;
|
||||
set => subCode = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 子错误信息
|
||||
/// 对应 SubErrMsg
|
||||
/// </summary>
|
||||
[JsonProperty("sub_msg")]
|
||||
public string SubMsg
|
||||
{
|
||||
get => subMsg;
|
||||
set => subMsg = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 响应原始内容
|
||||
/// </summary>
|
||||
public string Body
|
||||
{
|
||||
get => body;
|
||||
set => body = value;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 响应结果是否错误
|
||||
/// </summary>
|
||||
public bool IsError => !string.IsNullOrEmpty(SubCode);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,119 @@
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// 类名:Core
|
||||
/// 功能:支付宝接口公用函数类
|
||||
/// 详细:该类是请求、通知返回两个文件所调用的公用函数核心处理文件,不需要修改
|
||||
/// 版本:3.4
|
||||
/// 修改日期:2015-06-05
|
||||
/// 说明:
|
||||
/// 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
||||
/// 该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
|
||||
/// </summary>
|
||||
public class Core
|
||||
{
|
||||
|
||||
public Core()
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 除去数组中的空值和签名参数并以字母a到z的顺序排序
|
||||
/// </summary>
|
||||
/// <param name="dicArrayPre">过滤前的参数组</param>
|
||||
/// <returns>过滤后的参数组</returns>
|
||||
public static Dictionary<string, string> FilterPara(SortedDictionary<string, string> dicArrayPre)
|
||||
{
|
||||
Dictionary<string, string> dicArray = new Dictionary<string, string>();
|
||||
foreach (KeyValuePair<string, string> temp in dicArrayPre)
|
||||
{
|
||||
if (temp.Key.ToLower() != "sign" && temp.Key.ToLower()!="sign_type" && temp.Value != "" && temp.Value != null)
|
||||
{
|
||||
dicArray.Add(temp.Key, temp.Value);
|
||||
}
|
||||
}
|
||||
|
||||
return dicArray;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串
|
||||
/// </summary>
|
||||
/// <param name="sArray">需要拼接的数组</param>
|
||||
/// <returns>拼接完成以后的字符串</returns>
|
||||
public static string CreateLinkString(Dictionary<string, string> dicArray)
|
||||
{
|
||||
StringBuilder prestr = new StringBuilder();
|
||||
foreach (KeyValuePair<string, string> temp in dicArray)
|
||||
{
|
||||
prestr.Append(temp.Key + "=" + temp.Value + "&");
|
||||
}
|
||||
|
||||
//去掉最後一個&字符
|
||||
int nLen = prestr.Length;
|
||||
prestr.Remove(nLen-1,1);
|
||||
|
||||
return prestr.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 把数组所有元素,按照“参数=参数值”的模式用“&”字符拼接成字符串,并对参数值做urlencode
|
||||
/// </summary>
|
||||
/// <param name="sArray">需要拼接的数组</param>
|
||||
/// <param name="code">字符编码</param>
|
||||
/// <returns>拼接完成以后的字符串</returns>
|
||||
//public static string CreateLinkStringUrlencode(Dictionary<string, string> dicArray, Encoding code)
|
||||
//{
|
||||
// StringBuilder prestr = new StringBuilder();
|
||||
// foreach (KeyValuePair<string, string> temp in dicArray)
|
||||
// {
|
||||
// prestr.Append(temp.Key + "=" + HttpUtility.UrlEncode(temp.Value, code) + "&");
|
||||
// }
|
||||
|
||||
// //去掉最後一個&字符
|
||||
// int nLen = prestr.Length;
|
||||
// prestr.Remove(nLen - 1, 1);
|
||||
|
||||
// return prestr.ToString();
|
||||
//}
|
||||
|
||||
/// <summary>
|
||||
/// 获取文件的md5摘要
|
||||
/// </summary>
|
||||
/// <param name="sFile">文件流</param>
|
||||
/// <returns>MD5摘要结果</returns>
|
||||
public static string GetAbstractToMD5(Stream sFile)
|
||||
{
|
||||
MD5 md5 = new MD5CryptoServiceProvider();
|
||||
byte[] result = md5.ComputeHash(sFile);
|
||||
StringBuilder sb = new StringBuilder(32);
|
||||
for (int i = 0; i < result.Length; i++)
|
||||
{
|
||||
sb.Append(result[i].ToString("x").PadLeft(2, '0'));
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取文件的md5摘要
|
||||
/// </summary>
|
||||
/// <param name="dataFile">文件流</param>
|
||||
/// <returns>MD5摘要结果</returns>
|
||||
public static string GetAbstractToMD5(byte[] dataFile)
|
||||
{
|
||||
MD5 md5 = new MD5CryptoServiceProvider();
|
||||
byte[] result = md5.ComputeHash(dataFile);
|
||||
StringBuilder sb = new StringBuilder(32);
|
||||
for (int i = 0; i < result.Length; i++)
|
||||
{
|
||||
sb.Append(result[i].ToString("x").PadLeft(2, '0'));
|
||||
}
|
||||
return sb.ToString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using Alipay.AopSdk.Core.Response;
|
||||
using Alipay.AopSdk.F2FPay.Model;
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayF2FMonitorResult 的摘要说明
|
||||
/// </summary>
|
||||
public class AlipayF2FMonitorResult
|
||||
{
|
||||
public AlipayF2FMonitorResult()
|
||||
{
|
||||
//
|
||||
// TODO: 在此处添加构造函数逻辑
|
||||
//
|
||||
}
|
||||
|
||||
public MonitorHeartbeatSynResponse response { get; set; }
|
||||
|
||||
public ResultEnum Status
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
if (response != null)
|
||||
{
|
||||
if (response.Code == ResultCode.SUCCESS)
|
||||
{
|
||||
return ResultEnum.SUCCESS;
|
||||
}
|
||||
else
|
||||
return ResultEnum.FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ResultEnum.UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using Alipay.AopSdk.Core.Response;
|
||||
using Alipay.AopSdk.F2FPay.Model;
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayF2FPayResult 的摘要说明
|
||||
/// </summary>
|
||||
public class AlipayF2FPayResult
|
||||
{
|
||||
public AlipayF2FPayResult()
|
||||
{
|
||||
//
|
||||
// TODO: 在此处添加构造函数逻辑
|
||||
//
|
||||
}
|
||||
|
||||
public AlipayTradePayResponse response { get; set; }
|
||||
|
||||
public ResultEnum Status
|
||||
{
|
||||
get
|
||||
{
|
||||
|
||||
if (response != null)
|
||||
{
|
||||
if (response.Code == ResultCode.SUCCESS)
|
||||
{
|
||||
return ResultEnum.SUCCESS;
|
||||
}
|
||||
else
|
||||
return ResultEnum.FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ResultEnum.UNKNOWN;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using Alipay.AopSdk.Core.Response;
|
||||
using Alipay.AopSdk.F2FPay.Model;
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayF2FPayResult 的摘要说明
|
||||
/// </summary>
|
||||
public class AlipayF2FPrecreateResult
|
||||
{
|
||||
public AlipayF2FPrecreateResult()
|
||||
{
|
||||
//
|
||||
// TODO: 在此处添加构造函数逻辑
|
||||
//
|
||||
}
|
||||
|
||||
public AlipayTradePrecreateResponse response { get; set; }
|
||||
|
||||
public ResultEnum Status
|
||||
{
|
||||
get
|
||||
{
|
||||
if (response != null)
|
||||
{
|
||||
if (response.Code == ResultCode.SUCCESS)
|
||||
{
|
||||
return ResultEnum.SUCCESS;
|
||||
}
|
||||
if (response.Code == ResultCode.ERROR)
|
||||
{
|
||||
return ResultEnum.UNKNOWN;
|
||||
}
|
||||
else
|
||||
return ResultEnum.FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ResultEnum.UNKNOWN;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,46 @@
|
||||
using Alipay.AopSdk.Core.Response;
|
||||
using Alipay.AopSdk.F2FPay.Model;
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayF2FPayResult 的摘要说明
|
||||
/// </summary>
|
||||
public class AlipayF2FQueryResult
|
||||
{
|
||||
public AlipayF2FQueryResult()
|
||||
{
|
||||
//
|
||||
// TODO: 在此处添加构造函数逻辑
|
||||
//
|
||||
}
|
||||
|
||||
public AlipayTradeQueryResponse response { get; set; }
|
||||
|
||||
public ResultEnum Status
|
||||
{
|
||||
get
|
||||
{
|
||||
if (response != null)
|
||||
{
|
||||
if (response.Code == ResultCode.SUCCESS &&
|
||||
(response.TradeStatus.Equals(TradeStatus.TRADE_SUCCESS) || response.TradeStatus.Equals(TradeStatus.TRADE_FINISHED)))
|
||||
{
|
||||
return ResultEnum.SUCCESS;
|
||||
}
|
||||
if (response.Code == ResultCode.ERROR)
|
||||
{
|
||||
return ResultEnum.UNKNOWN;
|
||||
}
|
||||
else
|
||||
return ResultEnum.FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ResultEnum.UNKNOWN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
using Alipay.AopSdk.Core.Response;
|
||||
using Alipay.AopSdk.F2FPay.Model;
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayF2FPayResult 的摘要说明
|
||||
/// </summary>
|
||||
public class AlipayF2FRefundResult
|
||||
{
|
||||
public AlipayF2FRefundResult()
|
||||
{
|
||||
//
|
||||
// TODO: 在此处添加构造函数逻辑
|
||||
//
|
||||
}
|
||||
|
||||
public AlipayTradeRefundResponse response { get; set; }
|
||||
|
||||
public ResultEnum Status
|
||||
{
|
||||
get
|
||||
{
|
||||
if (response != null)
|
||||
{
|
||||
if (response.Code == ResultCode.SUCCESS)
|
||||
{
|
||||
return ResultEnum.SUCCESS;
|
||||
}
|
||||
if (response.Code == ResultCode.ERROR)
|
||||
{
|
||||
return ResultEnum.UNKNOWN;
|
||||
}
|
||||
else
|
||||
return ResultEnum.FAILED;
|
||||
}
|
||||
else
|
||||
{
|
||||
return ResultEnum.UNKNOWN;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
using Alipay.AopSdk.Core;
|
||||
using Alipay.AopSdk.Core.Request;
|
||||
using Alipay.AopSdk.F2FPay.Domain;
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayTradePayImpl 的摘要说明
|
||||
/// </summary>
|
||||
public class AlipayMonitorImpl : IAlipayMonitor
|
||||
{
|
||||
|
||||
IAopClient client = null;
|
||||
|
||||
public AlipayMonitorImpl(string monitorUrl, string appId, string merchant_private_key, string format, string version,
|
||||
string sign_type, string alipay_public_key, string charset)
|
||||
{
|
||||
client = new DefaultAopClient(monitorUrl, appId, merchant_private_key, format, version,
|
||||
sign_type, alipay_public_key, charset);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#region 接口方法
|
||||
|
||||
public AlipayF2FMonitorResult mcloudMonitor(AlipayMonitorContentBuilder build)
|
||||
{
|
||||
AlipayF2FMonitorResult result = new AlipayF2FMonitorResult();
|
||||
try
|
||||
{
|
||||
MonitorHeartbeatSynRequest monitorRequest = new MonitorHeartbeatSynRequest();
|
||||
monitorRequest.BizContent = build.BuildJson();
|
||||
result.response = client.Execute(monitorRequest);
|
||||
return result;
|
||||
}
|
||||
catch
|
||||
{
|
||||
result.response = null;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 内部方法
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,393 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using Alipay.AopSdk.Core;
|
||||
using Alipay.AopSdk.Core.Request;
|
||||
using Alipay.AopSdk.Core.Response;
|
||||
using Alipay.AopSdk.Core.Util;
|
||||
using Alipay.AopSdk.F2FPay.Domain;
|
||||
using Alipay.AopSdk.F2FPay.Model;
|
||||
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayTradePayImpl 的摘要说明
|
||||
/// </summary>
|
||||
public class AlipayTradeImpl : IAlipayTradeService
|
||||
{
|
||||
|
||||
|
||||
|
||||
IAopClient client = null;
|
||||
|
||||
public AlipayTradeImpl(string serverUrl, string appId, string merchant_private_key, string format, string version,
|
||||
string sign_type, string alipay_public_key, string charset)
|
||||
{
|
||||
client = new DefaultAopClient(serverUrl, appId, merchant_private_key, format, version,
|
||||
sign_type, alipay_public_key, charset);
|
||||
|
||||
}
|
||||
|
||||
|
||||
#region 接口方法
|
||||
public AlipayF2FPayResult TradePay(AlipayTradePayContentBuilder builder)
|
||||
{
|
||||
AlipayF2FPayResult payResult = new AlipayF2FPayResult();
|
||||
try
|
||||
{
|
||||
|
||||
AlipayTradePayRequest payRequest = new AlipayTradePayRequest();
|
||||
payRequest.BizContent = builder.BuildJson();
|
||||
AlipayTradePayResponse payResponse = client.Execute(payRequest);
|
||||
|
||||
//payRequest.SetBizModel("");
|
||||
|
||||
if (payResponse != null)
|
||||
{
|
||||
|
||||
switch (payResponse.Code)
|
||||
{
|
||||
case ResultCode.SUCCESS:
|
||||
break;
|
||||
|
||||
//返回支付处理中,需要进行轮询
|
||||
case ResultCode.INRROCESS:
|
||||
|
||||
AlipayTradeQueryResponse queryResponse = LoopQuery(builder.out_trade_no, 10, 3000); //用订单号trade_no进行轮询也是可以的。
|
||||
//轮询结束后还是支付处理中,需要调撤销接口
|
||||
if (queryResponse != null)
|
||||
{
|
||||
if (queryResponse.TradeStatus == "WAIT_BUYER_PAY")
|
||||
{
|
||||
CancelAndRetry(builder.out_trade_no);
|
||||
payResponse.Code = ResultCode.FAIL;
|
||||
}
|
||||
payResponse = toTradePayResponse(queryResponse);
|
||||
}
|
||||
break;
|
||||
|
||||
//明确返回业务失败
|
||||
case ResultCode.FAIL:
|
||||
break;
|
||||
|
||||
//返回系统异常,需要调用一次查询接口,没有返回支付成功的话调用撤销接口撤销交易
|
||||
case ResultCode.ERROR:
|
||||
|
||||
AlipayTradeQueryResponse queryResponse2 = sendTradeQuery(builder.out_trade_no);
|
||||
|
||||
if (queryResponse2 != null)
|
||||
{
|
||||
if (queryResponse2.TradeStatus == TradeStatus.WAIT_BUYER_PAY)
|
||||
{
|
||||
AlipayTradeCancelResponse cancelResponse = CancelAndRetry(builder.out_trade_no);
|
||||
payResponse.Code = ResultCode.FAIL;
|
||||
}
|
||||
|
||||
payResponse = toTradePayResponse(queryResponse2);
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
default:
|
||||
payResult.response = payResponse;
|
||||
break;
|
||||
}
|
||||
payResult.response = payResponse;
|
||||
return payResult;
|
||||
}
|
||||
else
|
||||
{
|
||||
AlipayTradeQueryResponse queryResponse3 = sendTradeQuery(builder.out_trade_no);
|
||||
if (queryResponse3 != null)
|
||||
{
|
||||
if (queryResponse3.TradeStatus == TradeStatus.WAIT_BUYER_PAY)
|
||||
{
|
||||
AlipayTradeCancelResponse cancelResponse = CancelAndRetry(builder.out_trade_no);
|
||||
payResponse.Code = ResultCode.FAIL;
|
||||
}
|
||||
payResponse = toTradePayResponse(queryResponse3);
|
||||
}
|
||||
payResult.response = payResponse;
|
||||
return payResult;
|
||||
}
|
||||
//return payResult;
|
||||
}
|
||||
catch(Exception e)
|
||||
{
|
||||
|
||||
AlipayTradePayResponse payResponse = new AlipayTradePayResponse();
|
||||
payResponse.Code = ResultCode.FAIL;
|
||||
payResponse.Body = e.Message;
|
||||
payResult.response = payResponse;
|
||||
return payResult;
|
||||
}
|
||||
}
|
||||
|
||||
public AlipayF2FQueryResult TradeQuery(string outTradeNo)
|
||||
{
|
||||
return AsyncHelper.RunSync(async () => await TradeQueryAsync(outTradeNo));
|
||||
}
|
||||
|
||||
public async Task<AlipayF2FQueryResult> TradeQueryAsync(string outTradeNo)
|
||||
{
|
||||
AlipayF2FQueryResult result = new AlipayF2FQueryResult();
|
||||
try
|
||||
{
|
||||
|
||||
AlipayTradeQueryContentBuilder build = new AlipayTradeQueryContentBuilder();
|
||||
build.out_trade_no = outTradeNo;
|
||||
AlipayTradeQueryRequest payRequest = new AlipayTradeQueryRequest();
|
||||
payRequest.BizContent = build.BuildJson();
|
||||
result.response = await client.ExecuteAsync(payRequest);
|
||||
return result;
|
||||
}
|
||||
catch
|
||||
{
|
||||
result.response = null;
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public AlipayF2FRefundResult TradeRefund(AlipayTradeRefundContentBuilder builder)
|
||||
{
|
||||
return AsyncHelper.RunSync(async () => await TradeRefundAsync(builder));
|
||||
}
|
||||
|
||||
public async Task<AlipayF2FRefundResult> TradeRefundAsync(AlipayTradeRefundContentBuilder builder)
|
||||
{
|
||||
var refundResult = new AlipayF2FRefundResult();
|
||||
try
|
||||
{
|
||||
|
||||
AlipayTradeRefundRequest refundRequest = new AlipayTradeRefundRequest();
|
||||
refundRequest.BizContent = builder.BuildJson();
|
||||
refundResult.response = await client.ExecuteAsync(refundRequest);
|
||||
return refundResult;
|
||||
}
|
||||
catch
|
||||
{
|
||||
refundResult.response = null;
|
||||
return refundResult;
|
||||
}
|
||||
}
|
||||
|
||||
public AlipayF2FPrecreateResult TradePrecreate(AlipayTradePrecreateContentBuilder builder)
|
||||
{
|
||||
return AsyncHelper.RunSync(async () => await TradePrecreateAsync(builder));
|
||||
}
|
||||
|
||||
public async Task<AlipayF2FPrecreateResult> TradePrecreateAsync(AlipayTradePrecreateContentBuilder builder)
|
||||
{
|
||||
AlipayF2FPrecreateResult payResult = new AlipayF2FPrecreateResult();
|
||||
try
|
||||
{
|
||||
|
||||
AlipayTradePrecreateRequest payRequest = new AlipayTradePrecreateRequest();
|
||||
payRequest.BizContent = builder.BuildJson();
|
||||
|
||||
|
||||
payResult.response = await client.ExecuteAsync(payRequest);
|
||||
return payResult;
|
||||
}
|
||||
catch
|
||||
{
|
||||
payResult.response = null;
|
||||
return payResult;
|
||||
}
|
||||
}
|
||||
|
||||
public AlipayF2FPrecreateResult TradePrecreate(AlipayTradePrecreateContentBuilder builder, string notify_url)
|
||||
{
|
||||
return AsyncHelper.RunSync(async () => await TradePrecreateAsync(builder, notify_url));
|
||||
}
|
||||
|
||||
public async Task<AlipayF2FPrecreateResult> TradePrecreateAsync(AlipayTradePrecreateContentBuilder builder, string notify_url)
|
||||
{
|
||||
AlipayF2FPrecreateResult payResult = new AlipayF2FPrecreateResult();
|
||||
try
|
||||
{
|
||||
AlipayTradePrecreateRequest payRequest = new AlipayTradePrecreateRequest();
|
||||
payRequest.BizContent = builder.BuildJson();
|
||||
payRequest.SetNotifyUrl(notify_url);
|
||||
payResult.response = await client.ExecuteAsync(payRequest);
|
||||
return payResult;
|
||||
|
||||
}
|
||||
catch
|
||||
{
|
||||
payResult.response = null;
|
||||
return payResult;
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
|
||||
#region 内部方法
|
||||
private AlipayTradeCancelResponse tradeCancel(string outTradeNo)
|
||||
{
|
||||
try
|
||||
{
|
||||
AlipayTradeCancelRequest request = new AlipayTradeCancelRequest();
|
||||
StringBuilder sb2 = new StringBuilder();
|
||||
sb2.Append("{\"out_trade_no\":\"" + outTradeNo + "\"}");
|
||||
request.BizContent = sb2.ToString();
|
||||
AlipayTradeCancelResponse response = client.Execute(request);
|
||||
return response;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private AlipayTradePayResponse toTradePayResponse(AlipayTradeQueryResponse queryResponse)
|
||||
{
|
||||
if (queryResponse == null || queryResponse.Code != ResultCode.SUCCESS)
|
||||
return null;
|
||||
AlipayTradePayResponse payResponse = new AlipayTradePayResponse();
|
||||
|
||||
if (queryResponse.TradeStatus == TradeStatus.WAIT_BUYER_PAY)
|
||||
{
|
||||
payResponse.Code = ResultCode.INRROCESS;
|
||||
}
|
||||
if (queryResponse.TradeStatus == TradeStatus.TRADE_FINISHED
|
||||
|| queryResponse.TradeStatus == TradeStatus.TRADE_SUCCESS)
|
||||
{
|
||||
payResponse.Code = ResultCode.SUCCESS;
|
||||
}
|
||||
if (queryResponse.TradeStatus == TradeStatus.TRADE_CLOSED)
|
||||
{
|
||||
payResponse.Code = ResultCode.FAIL;
|
||||
}
|
||||
|
||||
payResponse.Msg = queryResponse.Msg;
|
||||
payResponse.SubCode = queryResponse.SubCode;
|
||||
payResponse.SubMsg = queryResponse.SubMsg;
|
||||
payResponse.Body = queryResponse.Body;
|
||||
payResponse.BuyerLogonId = queryResponse.BuyerLogonId;
|
||||
payResponse.FundBillList = queryResponse.FundBillList;
|
||||
payResponse.OpenId = queryResponse.OpenId;
|
||||
payResponse.OutTradeNo = queryResponse.OutTradeNo;
|
||||
payResponse.ReceiptAmount = queryResponse.ReceiptAmount;
|
||||
payResponse.TotalAmount = queryResponse.TotalAmount;
|
||||
payResponse.TradeNo = queryResponse.TradeNo;
|
||||
|
||||
|
||||
return payResponse;
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
private AlipayTradeQueryResponse sendTradeQuery(string outTradeNo)
|
||||
{
|
||||
try
|
||||
{
|
||||
AlipayTradeQueryContentBuilder build = new AlipayTradeQueryContentBuilder();
|
||||
build.out_trade_no = outTradeNo;
|
||||
AlipayTradeQueryRequest payRequest = new AlipayTradeQueryRequest();
|
||||
payRequest.BizContent = build.BuildJson();
|
||||
AlipayTradeQueryResponse payResponse = client.Execute(payRequest);
|
||||
return payResponse;
|
||||
}
|
||||
catch
|
||||
{
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 1.返回支付处理中,轮询订单状态
|
||||
/// 2.本示例中轮询了6次,每次相隔5秒
|
||||
/// </summary>
|
||||
/// <param name="biz_content"></param>
|
||||
/// <returns></returns>
|
||||
private AlipayTradeQueryResponse LoopQuery(string out_trade_no, int count, int interval)
|
||||
{
|
||||
AlipayTradeQueryResponse queryResult = null;
|
||||
|
||||
for (int i = 1; i <= count; i++)
|
||||
{
|
||||
Thread.Sleep(interval);
|
||||
AlipayTradeQueryResponse queryResponse = sendTradeQuery(out_trade_no);
|
||||
if (queryResponse != null && string.Compare(queryResponse.Code, ResultCode.SUCCESS, false) == 0)
|
||||
{
|
||||
queryResult = queryResponse;
|
||||
if (queryResponse.TradeStatus == "TRADE_FINISHED"
|
||||
|| queryResponse.TradeStatus == "TRADE_SUCCESS"
|
||||
|| queryResponse.TradeStatus == "TRADE_CLOSED")
|
||||
return queryResponse;
|
||||
}
|
||||
}
|
||||
|
||||
return queryResult;
|
||||
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 撤销订单
|
||||
/// </summary>
|
||||
/// <param name="out_trade_no"></param>
|
||||
/// <returns></returns>
|
||||
private AlipayTradeCancelResponse CancelAndRetry(string out_trade_no)
|
||||
{
|
||||
AlipayTradeCancelResponse cancelResponse = null;
|
||||
|
||||
cancelResponse = tradeCancel(out_trade_no);
|
||||
|
||||
//如果撤销失败,新开一个线程重试撤销,不影响主业务
|
||||
if (cancelResponse == null || (cancelResponse.Code == ResultCode.FAIL && cancelResponse.RetryFlag == "Y"))
|
||||
{
|
||||
ParameterizedThreadStart ParStart = new ParameterizedThreadStart(cancelThreadFunc);
|
||||
Thread myThread = new Thread(ParStart);
|
||||
object o = out_trade_no;
|
||||
myThread.Start(o);
|
||||
}
|
||||
return cancelResponse;
|
||||
}
|
||||
|
||||
private void cancelThreadFunc(object o)
|
||||
{
|
||||
int RETRYCOUNT = 10;
|
||||
int INTERVAL = 10000;
|
||||
|
||||
for (int i = 0; i < RETRYCOUNT; ++i)
|
||||
{
|
||||
|
||||
Thread.Sleep(INTERVAL);
|
||||
AlipayTradeCancelRequest cancelRequest = new AlipayTradeCancelRequest();
|
||||
string outTradeNo = o.ToString();
|
||||
AlipayTradeCancelResponse cancelResponse = tradeCancel(outTradeNo);
|
||||
|
||||
if (null != cancelResponse)
|
||||
{
|
||||
if (cancelResponse.Code == ResultCode.FAIL)
|
||||
{
|
||||
if (cancelResponse.RetryFlag == "N")
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ((cancelResponse.Code == ResultCode.SUCCESS))
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (i == RETRYCOUNT - 1)
|
||||
{
|
||||
/** !!!!!!!注意!!!!!!!!
|
||||
处理到最后一次,还是未撤销成功,需要在商户数据库中对此单最标记,人工介入处理*/
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,200 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Net;
|
||||
using System.Text;
|
||||
using Alipay.AopSdk.Core.Util;
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// 类名:Notify
|
||||
/// 功能:支付宝通知处理类
|
||||
/// 详细:处理支付宝各接口通知返回
|
||||
/// 版本:3.3
|
||||
/// 修改日期:2011-07-05
|
||||
/// '说明:
|
||||
/// 以下代码只是为了方便商户测试而提供的样例代码,商户可以根据自己网站的需要,按照技术文档编写,并非一定要使用该代码。
|
||||
/// 该代码仅供学习和研究支付宝接口使用,只是提供一个参考。
|
||||
///
|
||||
/// //////////////////////注意/////////////////////////////
|
||||
/// 调试通知返回时,可查看或改写log日志的写入TXT里的数据,来检查通知返回是否正常
|
||||
/// </summary>
|
||||
public class Notify
|
||||
{
|
||||
#region 字段
|
||||
private string _partner = ""; //合作身份者ID
|
||||
private string _charset = ""; //编码格式
|
||||
private string _sign_type = ""; //签名方式
|
||||
private string _alipay_public_key = ""; //支付宝公钥文件地址
|
||||
|
||||
//支付宝消息验证地址
|
||||
private string Https_veryfy_url = "";
|
||||
#endregion
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 构造函数
|
||||
/// 从配置文件中初始化变量
|
||||
/// </summary>
|
||||
/// <param name="inputPara">通知返回参数数组</param>
|
||||
/// <param name="notify_id">通知验证ID</param>
|
||||
|
||||
public Notify(string charset, string sign_type, string pid, string mapiUrl, string alipay_public_key)
|
||||
{
|
||||
//初始化基础配置信息
|
||||
_charset = charset;
|
||||
_sign_type = sign_type;
|
||||
_partner = pid;
|
||||
Https_veryfy_url = mapiUrl + "?service=notify_verify&";
|
||||
_alipay_public_key = alipay_public_key;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 验证消息是否是支付宝发出的合法消息
|
||||
/// </summary>
|
||||
/// <param name="inputPara">通知返回参数数组</param>
|
||||
/// <param name="notify_id">通知验证ID</param>
|
||||
/// <param name="sign">支付宝生成的签名结果</param>
|
||||
/// <returns>验证结果</returns>
|
||||
public bool Verify(SortedDictionary<string, string> inputPara, string notify_id, string sign)
|
||||
{
|
||||
//获取返回时的签名验证结果
|
||||
bool isSign = GetSignVeryfy(inputPara, sign);
|
||||
//获取是否是支付宝服务器发来的请求的验证结果
|
||||
|
||||
//string responseTxt = "true";
|
||||
//当面付2.0的异步通
|
||||
//if (notify_id != null && notify_id != "") { responseTxt = GetResponseTxt(notify_id); }
|
||||
|
||||
//写日志记录(若要调试,请取消下面两行注释)
|
||||
//string sWord = "responseTxt=" + responseTxt + "\n isSign=" + isSign.ToString() + "\n 返回回来的参数:" + GetPreSignStr(inputPara) + "\n ";
|
||||
//Core.LogResult(sWord);
|
||||
|
||||
//对于开放平台的异步通知,通过验签可以达到安全校验的目的
|
||||
//isSign不是true,与安全校验码、请求时的参数格式(如:带自定义参数等)、编码格式有关
|
||||
if (isSign)//验证成功
|
||||
{
|
||||
return true;
|
||||
}
|
||||
else//验证失败
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取待签名字符串(调试用)
|
||||
/// </summary>
|
||||
/// <param name="inputPara">通知返回参数数组</param>
|
||||
/// <returns>待签名字符串</returns>
|
||||
private string GetPreSignStr(SortedDictionary<string, string> inputPara)
|
||||
{
|
||||
Dictionary<string, string> sPara = new Dictionary<string, string>();
|
||||
|
||||
//过滤空值、sign与sign_type参数
|
||||
sPara = Core.FilterPara(inputPara);
|
||||
|
||||
//获取待签名字符串
|
||||
string preSignStr = Core.CreateLinkString(sPara);
|
||||
|
||||
return preSignStr;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取返回时的签名验证结果
|
||||
/// </summary>
|
||||
/// <param name="inputPara">通知返回参数数组</param>
|
||||
/// <param name="sign">对比的签名结果</param>
|
||||
/// <returns>签名验证结果</returns>
|
||||
private bool GetSignVeryfy(SortedDictionary<string, string> inputPara, string sign)
|
||||
{
|
||||
Dictionary<string, string> sPara = new Dictionary<string, string>();
|
||||
|
||||
//过滤空值、sign与sign_type参数
|
||||
sPara = Core.FilterPara(inputPara);
|
||||
|
||||
//获取待签名字符串
|
||||
string preSignStr = Core.CreateLinkString(sPara);
|
||||
|
||||
|
||||
|
||||
//获得签名验证结果
|
||||
bool isSign = false;
|
||||
if (sign != null && sign != "")
|
||||
{
|
||||
switch (_sign_type)
|
||||
{
|
||||
case "RSA":
|
||||
isSign = AlipaySignature.RSACheckContent(preSignStr, sign, _alipay_public_key, _charset, _sign_type,false);
|
||||
break;
|
||||
case "RSA2":
|
||||
isSign = AlipaySignature.RSACheckContent(preSignStr, sign, _alipay_public_key, _charset, _sign_type,false);
|
||||
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return isSign;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获取是否是支付宝服务器发来的请求的验证结果
|
||||
/// </summary>
|
||||
/// <param name="notify_id">通知验证ID</param>
|
||||
/// <returns>验证结果</returns>
|
||||
private string GetResponseTxt(string notify_id)
|
||||
{
|
||||
string veryfy_url = Https_veryfy_url + "partner=" + _partner + "¬ify_id=" + notify_id;
|
||||
|
||||
//获取远程服务器ATN结果,验证是否是支付宝服务器发来的请求
|
||||
string responseTxt = Get_Http(veryfy_url, 120000);
|
||||
|
||||
return responseTxt;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获取远程服务器ATN结果
|
||||
/// </summary>
|
||||
/// <param name="strUrl">指定URL路径地址</param>
|
||||
/// <param name="timeout">超时时间设置</param>
|
||||
/// <returns>服务器ATN结果</returns>
|
||||
private string Get_Http(string strUrl, int timeout)
|
||||
{
|
||||
string strResult;
|
||||
try
|
||||
{
|
||||
HttpWebRequest myReq = (HttpWebRequest)HttpWebRequest.Create(strUrl);
|
||||
myReq.Timeout = timeout;
|
||||
HttpWebResponse HttpWResp = (HttpWebResponse)myReq.GetResponse();
|
||||
Stream myStream = HttpWResp.GetResponseStream();
|
||||
StreamReader sr = new StreamReader(myStream, Encoding.Default);
|
||||
StringBuilder strBuilder = new StringBuilder();
|
||||
while (-1 != sr.Peek())
|
||||
{
|
||||
strBuilder.Append(sr.ReadLine());
|
||||
}
|
||||
|
||||
strResult = strBuilder.ToString();
|
||||
}
|
||||
catch (Exception exp)
|
||||
{
|
||||
strResult = "错误:" + exp.Message;
|
||||
}
|
||||
|
||||
return strResult;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// F2FBiz 的摘要说明
|
||||
/// </summary>
|
||||
public class F2FBiz
|
||||
{
|
||||
private F2FBiz() { }
|
||||
|
||||
public static IAlipayTradeService serviceClient = null;
|
||||
|
||||
|
||||
public static IAlipayTradeService CreateClientInstance(string serverUrl, string appId, string merchant_private_key, string version,
|
||||
string sign_type, string alipay_public_key, string charset)
|
||||
{
|
||||
|
||||
|
||||
|
||||
serviceClient = new AlipayTradeImpl(serverUrl, appId, merchant_private_key, "json", version,
|
||||
sign_type, alipay_public_key, charset);
|
||||
|
||||
return serviceClient;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// F2FBiz 的摘要说明
|
||||
/// </summary>
|
||||
public class F2FMonitor
|
||||
{
|
||||
private F2FMonitor() { }
|
||||
|
||||
public static IAlipayMonitor monitorClient = null;
|
||||
|
||||
public static IAlipayMonitor CreateClientInstance(string monitorUrl, string appId, string merchant_private_key, string version,
|
||||
string sign_type, string alipay_public_key, string charset)
|
||||
{
|
||||
if (monitorClient == null)
|
||||
{
|
||||
monitorClient = new AlipayMonitorImpl(monitorUrl, appId, merchant_private_key, "json", version,
|
||||
sign_type, alipay_public_key, charset);
|
||||
}
|
||||
return monitorClient;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Alipay.AopSdk.Core;
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// F2FResult 的摘要说明
|
||||
/// </summary>
|
||||
public abstract class F2FResult
|
||||
{
|
||||
public abstract bool IsSuccess();
|
||||
public abstract AopResponse AopResponse();
|
||||
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
using Alipay.AopSdk.F2FPay.Domain;
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// IAlipayMonitor 的摘要说明
|
||||
/// </summary>
|
||||
public interface IAlipayMonitor
|
||||
{
|
||||
|
||||
//云监控接口
|
||||
AlipayF2FMonitorResult mcloudMonitor(AlipayMonitorContentBuilder builder);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System.Threading.Tasks;
|
||||
using Alipay.AopSdk.F2FPay.Domain;
|
||||
|
||||
namespace Alipay.AopSdk.F2FPay.Business
|
||||
{
|
||||
/// <summary>
|
||||
/// IAlipayTrade 的摘要说明
|
||||
/// </summary>
|
||||
public interface IAlipayTradeService
|
||||
{
|
||||
//当面付条码支付
|
||||
AlipayF2FPayResult TradePay(AlipayTradePayContentBuilder builder);
|
||||
|
||||
// 当面付2.0交易查询
|
||||
AlipayF2FQueryResult TradeQuery(string outTradeNo);
|
||||
|
||||
// 当面付2.0交易退货
|
||||
AlipayF2FRefundResult TradeRefund(AlipayTradeRefundContentBuilder builder);
|
||||
|
||||
// 当面付2.0预下单
|
||||
AlipayF2FPrecreateResult TradePrecreate(AlipayTradePrecreateContentBuilder builder);
|
||||
AlipayF2FPrecreateResult TradePrecreate(AlipayTradePrecreateContentBuilder builder, string notify_url);
|
||||
|
||||
//云监控接口
|
||||
//AlipayF2FMonitorResult mcloudMonitor(AlipayMonitorContentBuilder builder);
|
||||
Task<AlipayF2FQueryResult> TradeQueryAsync(string outTradeNo);
|
||||
Task<AlipayF2FRefundResult> TradeRefundAsync(AlipayTradeRefundContentBuilder builder);
|
||||
Task<AlipayF2FPrecreateResult> TradePrecreateAsync(AlipayTradePrecreateContentBuilder builder);
|
||||
Task<AlipayF2FPrecreateResult> TradePrecreateAsync(AlipayTradePrecreateContentBuilder builder, string notify_url);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,649 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using Alipay.AopSdk.Core.Parser;
|
||||
using Alipay.AopSdk.Core.Util;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core
|
||||
{
|
||||
/// <inheritdoc />
|
||||
/// <summary>
|
||||
/// AOP客户端。
|
||||
/// </summary>
|
||||
public class DefaultAopClient : IAopClient
|
||||
{
|
||||
public const string APP_ID = "app_id";
|
||||
public const string FORMAT = "format";
|
||||
public const string METHOD = "method";
|
||||
public const string TIMESTAMP = "timestamp";
|
||||
public const string VERSION = "version";
|
||||
public const string SIGN_TYPE = "sign_type";
|
||||
public const string ACCESS_TOKEN = "auth_token";
|
||||
public const string SIGN = "sign";
|
||||
public const string TERMINAL_TYPE = "terminal_type";
|
||||
public const string TERMINAL_INFO = "terminal_info";
|
||||
public const string PROD_CODE = "prod_code";
|
||||
public const string NOTIFY_URL = "notify_url";
|
||||
public const string CHARSET = "charset";
|
||||
public const string ENCRYPT_TYPE = "encrypt_type";
|
||||
public const string BIZ_CONTENT = "biz_content";
|
||||
public const string APP_AUTH_TOKEN = "app_auth_token";
|
||||
public const string RETURN_URL = "return_url";
|
||||
private readonly string alipayPublicKey;
|
||||
private string charset;
|
||||
private readonly string encyptKey;
|
||||
private readonly string encyptType = "AES";
|
||||
private string format;
|
||||
private string httpmethod;
|
||||
private readonly bool keyFromFile;
|
||||
|
||||
public string notify_url;
|
||||
private readonly string privateKeyPem;
|
||||
public string return_url;
|
||||
private readonly string serverUrl;
|
||||
private readonly string signType = "RSA2";
|
||||
|
||||
private string version;
|
||||
|
||||
private readonly WebUtils webUtils;
|
||||
|
||||
public string Version
|
||||
{
|
||||
get => version != null ? version : "1.0";
|
||||
set => version = value;
|
||||
}
|
||||
|
||||
public string Format
|
||||
{
|
||||
get => format != null ? format : "json";
|
||||
set => format = value;
|
||||
}
|
||||
|
||||
public string AppId { get; set; }
|
||||
|
||||
#region IAopClient Members
|
||||
|
||||
public T PageExecute<T>(IAopRequest<T> request) where T : AopResponse
|
||||
{
|
||||
return PageExecute(request, null, "POST");
|
||||
}
|
||||
|
||||
public async Task<T> PageExecuteAsync<T>(IAopRequest<T> request) where T : AopResponse
|
||||
{
|
||||
return await PageExecuteAsync(request, null, "POST");
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region IAopClient Members
|
||||
public T PageExecute<T> (IAopRequest<T> request, string accessToken, string reqMethod) where T : AopResponse
|
||||
{
|
||||
return AsyncHelper.RunSync(async () => await PageExecuteAsync(request, accessToken, reqMethod));
|
||||
}
|
||||
|
||||
public async Task<T> PageExecuteAsync<T>(IAopRequest<T> request, string accessToken, string reqMethod) where T : AopResponse
|
||||
{
|
||||
if (string.IsNullOrEmpty(charset))
|
||||
charset = "utf-8";
|
||||
|
||||
string apiVersion = null;
|
||||
|
||||
if (!string.IsNullOrEmpty(request.GetApiVersion()))
|
||||
apiVersion = request.GetApiVersion();
|
||||
else
|
||||
apiVersion = Version;
|
||||
|
||||
var txtParams = new AopDictionary(request.GetParameters());
|
||||
|
||||
// 序列化BizModel
|
||||
txtParams = SerializeBizModel(txtParams, request);
|
||||
|
||||
// 添加协议级请求参数
|
||||
//AopDictionary txtParams = new AopDictionary(request.GetParameters());
|
||||
txtParams.Add(METHOD, request.GetApiName());
|
||||
txtParams.Add(VERSION, apiVersion);
|
||||
txtParams.Add(APP_ID, AppId);
|
||||
txtParams.Add(FORMAT, format);
|
||||
txtParams.Add(TIMESTAMP, DateTime.Now);
|
||||
txtParams.Add(ACCESS_TOKEN, accessToken);
|
||||
txtParams.Add(SIGN_TYPE, signType);
|
||||
txtParams.Add(TERMINAL_TYPE, request.GetTerminalType());
|
||||
txtParams.Add(TERMINAL_INFO, request.GetTerminalInfo());
|
||||
txtParams.Add(PROD_CODE, request.GetProdCode());
|
||||
txtParams.Add(NOTIFY_URL, request.GetNotifyUrl());
|
||||
txtParams.Add(CHARSET, charset);
|
||||
txtParams.Add(RETURN_URL, request.GetReturnUrl());
|
||||
//字典排序
|
||||
IDictionary<string, string> sortedTxtParams = new SortedDictionary<string, string>(txtParams);
|
||||
txtParams = new AopDictionary(sortedTxtParams);
|
||||
// 排序返回字典类型添加签名参数
|
||||
|
||||
var signContent =AlipaySignature.GetSignContent(txtParams);
|
||||
|
||||
var path ="Logs/"+DateTime.Now.ToString("yyyyMMdd");
|
||||
if (!Directory.Exists(path))
|
||||
{
|
||||
Directory.CreateDirectory(path);
|
||||
}
|
||||
var file = path + "/alipay.log";
|
||||
File.AppendAllText(file, "pay body:" + signContent);
|
||||
|
||||
txtParams.Add(SIGN, AopUtils.SignAopRequest(sortedTxtParams, privateKeyPem, charset, keyFromFile, signType));
|
||||
File.AppendAllText(file, "pay SIGN:" + txtParams[SIGN]);
|
||||
// 是否需要上传文件
|
||||
string body;
|
||||
|
||||
if (request is IAopUploadRequest<T>)
|
||||
{
|
||||
var uRequest = (IAopUploadRequest<T>) request;
|
||||
var fileParams = AopUtils.CleanupDictionary(uRequest.GetFileParameters());
|
||||
body = await webUtils.DoPostAsync(serverUrl + "?" + CHARSET + "=" + charset, txtParams, fileParams, charset);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (reqMethod.Equals("GET"))
|
||||
{
|
||||
//直接调用DoGet方法请求
|
||||
//body=webUtils .DoGet (this.serverUrl ,txtParams ,this.charset);
|
||||
//拼接get请求的url
|
||||
var tmpUrl = serverUrl;
|
||||
if (txtParams != null && txtParams.Count > 0)
|
||||
if (tmpUrl.Contains("?"))
|
||||
tmpUrl = tmpUrl + "&" + WebUtils.BuildQuery(txtParams, charset);
|
||||
else
|
||||
tmpUrl = tmpUrl + "?" + WebUtils.BuildQuery(txtParams, charset);
|
||||
body = tmpUrl;
|
||||
}
|
||||
else
|
||||
{
|
||||
//直接调用DoPost方法请求
|
||||
// body = webUtils.DoPost(this.serverUrl, txtParams, this.charset);
|
||||
//输出post表单
|
||||
body = BuildHtmlRequest(txtParams, reqMethod, reqMethod);
|
||||
}
|
||||
}
|
||||
|
||||
T rsp = null;
|
||||
IAopParser<T> parser = null;
|
||||
if ("xml".Equals(format))
|
||||
{
|
||||
parser = new AopXmlParser<T>();
|
||||
rsp = parser.Parse(body, charset);
|
||||
}
|
||||
else
|
||||
{
|
||||
parser = new AopJsonParser<T>();
|
||||
rsp = parser.Parse(body, charset);
|
||||
}
|
||||
|
||||
//验签
|
||||
// CheckResponseSign(request, rsp, parser, this.alipayPublicKey, this.charset);
|
||||
return rsp;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region SDK Execute
|
||||
|
||||
public T SdkExecute<T>(IAopRequest<T> request) where T : AopResponse
|
||||
{
|
||||
// 构造请求参数
|
||||
var requestParams = buildRequestParams(request, null, null);
|
||||
|
||||
// 字典排序
|
||||
IDictionary<string, string> sortedParams = new SortedDictionary<string, string>(requestParams);
|
||||
var sortedAopDic = new AopDictionary(sortedParams);
|
||||
|
||||
// 参数签名
|
||||
var charset = string.IsNullOrEmpty(this.charset) ? "utf-8" : this.charset;
|
||||
var signResult = AopUtils.SignAopRequest(sortedAopDic, privateKeyPem, charset, keyFromFile, signType);
|
||||
|
||||
// 添加签名结果参数
|
||||
sortedAopDic.Add(SIGN, signResult);
|
||||
|
||||
// 参数拼接
|
||||
var signedResult = WebUtils.BuildQuery(sortedAopDic, charset);
|
||||
|
||||
// 构造结果
|
||||
var rsp = (T) Activator.CreateInstance(typeof(T));
|
||||
rsp.Body = signedResult;
|
||||
return rsp;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IAopClient Members
|
||||
|
||||
public string BuildHtmlRequest(IDictionary<string, string> sParaTemp, string strMethod, string strButtonValue)
|
||||
{
|
||||
//待请求参数数组
|
||||
IDictionary<string, string> dicPara = new Dictionary<string, string>();
|
||||
dicPara = sParaTemp;
|
||||
|
||||
var sbHtml = new StringBuilder();
|
||||
//sbHtml.Append("<head><meta http-equiv=\"Content-Type\" content=\"text/html\" charset= \"" + charset + "\" /></head>");
|
||||
|
||||
sbHtml.Append("<form id='alipaysubmit' name='alipaysubmit' action='" + serverUrl + "?charset=" + charset +
|
||||
"' method='" + strMethod + "'>");
|
||||
;
|
||||
foreach (var temp in dicPara)
|
||||
sbHtml.Append("<input name='" + temp.Key + "' value='" + temp.Value + "'/>");
|
||||
|
||||
//submit按钮控件请不要含有name属性
|
||||
sbHtml.Append("<input type='submit' value='" + strButtonValue + "' style='display:none;'></form>");
|
||||
// sbHtml.Append("<input type='submit' value='" + strButtonValue + "'></form></div>");
|
||||
|
||||
//表单实现自动提交
|
||||
sbHtml.Append("<script>document.forms['alipaysubmit'].submit();</script>");
|
||||
|
||||
return sbHtml.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Common Method
|
||||
|
||||
private AopDictionary buildRequestParams<T>(IAopRequest<T> request, string accessToken, string appAuthToken)
|
||||
where T : AopResponse
|
||||
{
|
||||
// 默认参数
|
||||
var oriParams = new AopDictionary(request.GetParameters());
|
||||
|
||||
// 序列化BizModel
|
||||
var result = SerializeBizModel(oriParams, request);
|
||||
|
||||
// 获取参数
|
||||
var charset = string.IsNullOrEmpty(this.charset) ? "utf-8" : this.charset;
|
||||
var apiVersion = string.IsNullOrEmpty(request.GetApiVersion()) ? Version : request.GetApiVersion();
|
||||
|
||||
// 添加协议级请求参数,为空的参数后面会自动过滤,这里不做处理。
|
||||
result.Add(METHOD, request.GetApiName());
|
||||
result.Add(VERSION, apiVersion);
|
||||
result.Add(APP_ID, AppId);
|
||||
result.Add(FORMAT, format);
|
||||
result.Add(TIMESTAMP, DateTime.Now);
|
||||
result.Add(ACCESS_TOKEN, accessToken);
|
||||
result.Add(SIGN_TYPE, signType);
|
||||
result.Add(TERMINAL_TYPE, request.GetTerminalType());
|
||||
result.Add(TERMINAL_INFO, request.GetTerminalInfo());
|
||||
result.Add(PROD_CODE, request.GetProdCode());
|
||||
result.Add(NOTIFY_URL, request.GetNotifyUrl());
|
||||
result.Add(CHARSET, charset);
|
||||
result.Add(RETURN_URL, request.GetReturnUrl());
|
||||
result.Add(APP_AUTH_TOKEN, appAuthToken);
|
||||
|
||||
if (request.GetNeedEncrypt())
|
||||
{
|
||||
if (string.IsNullOrEmpty(result[BIZ_CONTENT]))
|
||||
throw new AopException("api request Fail ! The reason: encrypt request is not supported!");
|
||||
|
||||
if (string.IsNullOrEmpty(encyptKey) || string.IsNullOrEmpty(encyptType))
|
||||
throw new AopException("encryptType or encryptKey must not null!");
|
||||
|
||||
if (!"AES".Equals(encyptType))
|
||||
throw new AopException("api only support Aes!");
|
||||
|
||||
var encryptContent = AopUtils.AesEncrypt(encyptKey, result[BIZ_CONTENT], this.charset);
|
||||
result.Remove(BIZ_CONTENT);
|
||||
result.Add(BIZ_CONTENT, encryptContent);
|
||||
result.Add(ENCRYPT_TYPE, encyptType);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region DefaultAopClient Constructors
|
||||
|
||||
public DefaultAopClient(string serverUrl, string appId, string privateKeyPem)
|
||||
{
|
||||
AppId = appId;
|
||||
this.privateKeyPem = privateKeyPem;
|
||||
this.serverUrl = serverUrl;
|
||||
webUtils = new WebUtils(serverUrl);
|
||||
}
|
||||
|
||||
public DefaultAopClient(string serverUrl, string appId, string privateKeyPem, bool keyFromFile)
|
||||
{
|
||||
AppId = appId;
|
||||
this.privateKeyPem = privateKeyPem;
|
||||
this.serverUrl = serverUrl;
|
||||
this.keyFromFile = keyFromFile;
|
||||
webUtils = new WebUtils(serverUrl);
|
||||
}
|
||||
|
||||
public DefaultAopClient(string serverUrl, string appId, string privateKeyPem, string format)
|
||||
{
|
||||
AppId = appId;
|
||||
this.privateKeyPem = privateKeyPem;
|
||||
this.serverUrl = serverUrl;
|
||||
this.format = format;
|
||||
webUtils = new WebUtils(serverUrl);
|
||||
}
|
||||
|
||||
public DefaultAopClient(string serverUrl, string appId, string privateKeyPem, string format, string charset)
|
||||
: this(serverUrl, appId, privateKeyPem, format)
|
||||
{
|
||||
this.charset = charset;
|
||||
}
|
||||
|
||||
public DefaultAopClient(string serverUrl, string appId, string privateKeyPem, string format, string version,
|
||||
string signType)
|
||||
: this(serverUrl, appId, privateKeyPem)
|
||||
{
|
||||
this.format = format;
|
||||
this.version = version;
|
||||
this.signType = signType;
|
||||
}
|
||||
|
||||
public DefaultAopClient(string serverUrl, string appId, string privateKeyPem, string format, string version,
|
||||
string signType, string alipayPulicKey)
|
||||
: this(serverUrl, appId, privateKeyPem, format, version, signType)
|
||||
{
|
||||
alipayPublicKey = alipayPulicKey;
|
||||
}
|
||||
|
||||
public DefaultAopClient(string serverUrl, string appId, string privateKeyPem, string format, string version,
|
||||
string signType, string alipayPulicKey, string charset)
|
||||
: this(serverUrl, appId, privateKeyPem, format, version, signType, alipayPulicKey)
|
||||
{
|
||||
this.charset = charset;
|
||||
}
|
||||
|
||||
//
|
||||
public DefaultAopClient(string serverUrl, string appId, string privateKeyPem, string format, string version,
|
||||
string signType, string alipayPulicKey, string charset, bool keyFromFile)
|
||||
: this(serverUrl, appId, privateKeyPem, format, version, signType, alipayPulicKey)
|
||||
{
|
||||
this.keyFromFile = keyFromFile;
|
||||
this.charset = charset;
|
||||
}
|
||||
|
||||
public DefaultAopClient(string serverUrl, string appId, string privateKeyPem, string format, string version,
|
||||
string signType, string alipayPulicKey, string charset, string encyptKey)
|
||||
: this(serverUrl, appId, privateKeyPem, format, version, signType, alipayPulicKey, charset)
|
||||
{
|
||||
this.encyptKey = encyptKey;
|
||||
encyptType = "AES";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IAopClient Members
|
||||
|
||||
public T Execute<T>(IAopRequest<T> request) where T : AopResponse
|
||||
{
|
||||
return Execute(request, null);
|
||||
}
|
||||
|
||||
public T Execute<T>(IAopRequest<T> request, string accessToken) where T : AopResponse
|
||||
{
|
||||
return Execute(request, accessToken, null);
|
||||
}
|
||||
|
||||
public async Task<T> ExecuteAsync<T>(IAopRequest<T> request) where T : AopResponse
|
||||
{
|
||||
return await ExecuteAsync(request, null);
|
||||
}
|
||||
|
||||
public async Task<T> ExecuteAsync<T>(IAopRequest<T> request, string accessToken) where T : AopResponse
|
||||
{
|
||||
return await ExecuteAsync(request, accessToken, null);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IAopClient Members
|
||||
|
||||
public T Execute<T>(IAopRequest<T> request, string accessToken, string appAuthToken) where T : AopResponse
|
||||
{
|
||||
return AsyncHelper.RunSync(async () => await ExecuteAsync(request, accessToken, appAuthToken));
|
||||
}
|
||||
|
||||
public async Task<T> ExecuteAsync<T>(IAopRequest<T> request, string accessToken, string appAuthToken) where T : AopResponse
|
||||
{
|
||||
if (string.IsNullOrEmpty(charset))
|
||||
charset = "utf-8";
|
||||
|
||||
string apiVersion = null;
|
||||
|
||||
if (!string.IsNullOrEmpty(request.GetApiVersion()))
|
||||
apiVersion = request.GetApiVersion();
|
||||
else
|
||||
apiVersion = Version;
|
||||
|
||||
// 添加协议级请求参数
|
||||
var txtParams = new AopDictionary(request.GetParameters());
|
||||
|
||||
// 序列化BizModel
|
||||
txtParams = SerializeBizModel(txtParams, request);
|
||||
|
||||
txtParams.Add(METHOD, request.GetApiName());
|
||||
txtParams.Add(VERSION, apiVersion);
|
||||
txtParams.Add(APP_ID, AppId);
|
||||
txtParams.Add(FORMAT, format);
|
||||
txtParams.Add(TIMESTAMP, DateTime.Now);
|
||||
txtParams.Add(ACCESS_TOKEN, accessToken);
|
||||
txtParams.Add(SIGN_TYPE, signType);
|
||||
txtParams.Add(TERMINAL_TYPE, request.GetTerminalType());
|
||||
txtParams.Add(TERMINAL_INFO, request.GetTerminalInfo());
|
||||
txtParams.Add(PROD_CODE, request.GetProdCode());
|
||||
txtParams.Add(CHARSET, charset);
|
||||
|
||||
|
||||
if (!string.IsNullOrEmpty(request.GetNotifyUrl()))
|
||||
txtParams.Add(NOTIFY_URL, request.GetNotifyUrl());
|
||||
|
||||
if (!string.IsNullOrEmpty(appAuthToken))
|
||||
txtParams.Add(APP_AUTH_TOKEN, appAuthToken);
|
||||
|
||||
|
||||
if (request.GetNeedEncrypt())
|
||||
{
|
||||
if (string.IsNullOrEmpty(txtParams[BIZ_CONTENT]))
|
||||
throw new AopException("api request Fail ! The reason: encrypt request is not supported!");
|
||||
|
||||
if (string.IsNullOrEmpty(encyptKey) || string.IsNullOrEmpty(encyptType))
|
||||
throw new AopException("encryptType or encryptKey must not null!");
|
||||
|
||||
if (!"AES".Equals(encyptType))
|
||||
throw new AopException("api only support Aes!");
|
||||
|
||||
var encryptContent = AopUtils.AesEncrypt(encyptKey, txtParams[BIZ_CONTENT], charset);
|
||||
txtParams.Remove(BIZ_CONTENT);
|
||||
txtParams.Add(BIZ_CONTENT, encryptContent);
|
||||
txtParams.Add(ENCRYPT_TYPE, encyptType);
|
||||
}
|
||||
|
||||
// 添加签名参数
|
||||
txtParams.Add(SIGN, AopUtils.SignAopRequest(txtParams, privateKeyPem, charset, keyFromFile, signType));
|
||||
|
||||
|
||||
// 是否需要上传文件
|
||||
string body;
|
||||
|
||||
|
||||
if (request is IAopUploadRequest<T>)
|
||||
{
|
||||
var uRequest = (IAopUploadRequest<T>)request;
|
||||
var fileParams = AopUtils.CleanupDictionary(uRequest.GetFileParameters());
|
||||
body = await webUtils.DoPostAsync(serverUrl + "?" + CHARSET + "=" + charset, txtParams, fileParams, charset);
|
||||
}
|
||||
else
|
||||
{
|
||||
body = await webUtils.DoPostAsync(serverUrl + "?" + CHARSET + "=" + charset, txtParams, charset);
|
||||
}
|
||||
|
||||
T rsp = null;
|
||||
IAopParser<T> parser = null;
|
||||
if ("xml".Equals(format))
|
||||
{
|
||||
parser = new AopXmlParser<T>();
|
||||
rsp = parser.Parse(body, charset);
|
||||
}
|
||||
else
|
||||
{
|
||||
parser = new AopJsonParser<T>();
|
||||
rsp = parser.Parse(body, charset);
|
||||
}
|
||||
|
||||
var item = parseRespItem(request, body, parser, encyptKey, encyptType, charset);
|
||||
rsp = parser.Parse(item.realContent, charset);
|
||||
|
||||
CheckResponseSign(request, item.respContent, rsp.IsError, parser, alipayPublicKey, charset, signType, keyFromFile);
|
||||
|
||||
return rsp;
|
||||
}
|
||||
|
||||
private static ResponseParseItem parseRespItem<T>(IAopRequest<T> request, string respBody, IAopParser<T> parser,
|
||||
string encryptKey, string encryptType, string charset) where T : AopResponse
|
||||
{
|
||||
string realContent = null;
|
||||
|
||||
if (request.GetNeedEncrypt())
|
||||
realContent = parser.EncryptSourceData(request, respBody, encryptType, encryptKey, charset);
|
||||
else
|
||||
realContent = respBody;
|
||||
|
||||
var item = new ResponseParseItem();
|
||||
item.realContent = realContent;
|
||||
item.respContent = respBody;
|
||||
|
||||
return item;
|
||||
}
|
||||
|
||||
public static void CheckResponseSign<T>(IAopRequest<T> request, string responseBody, bool isError,
|
||||
IAopParser<T> parser, string alipayPublicKey, string charset, string signType) where T : AopResponse
|
||||
{
|
||||
if (string.IsNullOrEmpty(alipayPublicKey) || string.IsNullOrEmpty(charset))
|
||||
return;
|
||||
|
||||
var signItem = parser.GetSignItem(request, responseBody);
|
||||
if (signItem == null)
|
||||
throw new AopException("sign check fail: Body is Empty!");
|
||||
|
||||
if (!isError ||
|
||||
isError && !string.IsNullOrEmpty(signItem.Sign))
|
||||
{
|
||||
var rsaCheckContent =
|
||||
AlipaySignature.RSACheckContent(signItem.SignSourceDate, signItem.Sign, alipayPublicKey, charset, signType);
|
||||
if (!rsaCheckContent)
|
||||
if (!string.IsNullOrEmpty(signItem.SignSourceDate) && signItem.SignSourceDate.Contains("\\/"))
|
||||
{
|
||||
var srouceData = signItem.SignSourceDate.Replace("\\/", "/");
|
||||
var jsonCheck = AlipaySignature.RSACheckContent(srouceData, signItem.Sign, alipayPublicKey, charset, signType);
|
||||
if (!jsonCheck)
|
||||
throw new AopException(
|
||||
"sign check fail: check Sign and Data Fail JSON also");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AopException(
|
||||
"sign check fail: check Sign and Data Fail!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public static void CheckResponseSign<T>(IAopRequest<T> request, string responseBody, bool isError,
|
||||
IAopParser<T> parser, string alipayPublicKey, string charset, string signType, bool keyFromFile)
|
||||
where T : AopResponse
|
||||
{
|
||||
if (string.IsNullOrEmpty(alipayPublicKey) || string.IsNullOrEmpty(charset))
|
||||
return;
|
||||
|
||||
var signItem = parser.GetSignItem(request, responseBody);
|
||||
if (signItem == null)
|
||||
throw new AopException("sign check fail: Body is Empty!");
|
||||
|
||||
if (!isError ||
|
||||
isError && !string.IsNullOrEmpty(signItem.Sign))
|
||||
{
|
||||
var rsaCheckContent = AlipaySignature.RSACheckContent(signItem.SignSourceDate, signItem.Sign, alipayPublicKey,
|
||||
charset, signType, keyFromFile);
|
||||
if (!rsaCheckContent)
|
||||
if (!string.IsNullOrEmpty(signItem.SignSourceDate) && signItem.SignSourceDate.Contains("\\/"))
|
||||
{
|
||||
var srouceData = signItem.SignSourceDate.Replace("\\/", "/");
|
||||
var jsonCheck =
|
||||
AlipaySignature.RSACheckContent(srouceData, signItem.Sign, alipayPublicKey, charset, signType, keyFromFile);
|
||||
if (!jsonCheck)
|
||||
throw new AopException(
|
||||
"sign check fail: check Sign and Data Fail JSON also");
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new AopException(
|
||||
"sign check fail: check Sign and Data Fail!");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IAopClient Members
|
||||
|
||||
public Dictionary<string, string> FilterPara(SortedDictionary<string, string> dicArrayPre)
|
||||
{
|
||||
var dicArray = new Dictionary<string, string>();
|
||||
foreach (var temp in dicArrayPre)
|
||||
if (temp.Key.ToLower() != "sign" && temp.Key.ToLower() != "sign_type" && temp.Value != "" && temp.Value != null)
|
||||
dicArray.Add(temp.Key, temp.Value);
|
||||
|
||||
return dicArray;
|
||||
}
|
||||
|
||||
public static string CreateLinkStringUrlencode(Dictionary<string, string> dicArray, Encoding code)
|
||||
{
|
||||
var prestr = new StringBuilder();
|
||||
foreach (var temp in dicArray)
|
||||
prestr.Append(temp.Key + "=" + HttpUtility.UrlEncode(temp.Value, code) + "&");
|
||||
|
||||
//去掉最後一個&字符
|
||||
var nLen = prestr.Length;
|
||||
prestr.Remove(nLen - 1, 1);
|
||||
|
||||
return prestr.ToString();
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Model Serialize
|
||||
|
||||
/// <summary>
|
||||
/// </summary>
|
||||
/// <typeparam name="T"></typeparam>
|
||||
/// <param name="requestParams"></param>
|
||||
/// <param name="request"></param>
|
||||
/// <returns></returns>
|
||||
private AopDictionary SerializeBizModel<T>(AopDictionary requestParams, IAopRequest<T> request) where T : AopResponse
|
||||
{
|
||||
var result = requestParams;
|
||||
var isBizContentEmpty = !requestParams.ContainsKey(BIZ_CONTENT) || string.IsNullOrEmpty(requestParams[BIZ_CONTENT]);
|
||||
if (isBizContentEmpty && request.GetBizModel() != null)
|
||||
{
|
||||
var bizModel = request.GetBizModel();
|
||||
var content = Serialize(bizModel);
|
||||
result.Add(BIZ_CONTENT, content);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// AopObject序列化
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <returns></returns>
|
||||
private string Serialize(AopObject obj)
|
||||
{
|
||||
JsonSerializerSettings jsetting = new JsonSerializerSettings();
|
||||
jsetting.NullValueHandling = NullValueHandling.Ignore;
|
||||
return JsonConvert.SerializeObject(obj, Formatting.None, jsetting);
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccessOrdersFeedBack Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccessOrdersFeedBack : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 错误码
|
||||
/// </summary>
|
||||
[JsonProperty("error_code")]
|
||||
public string ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 错误描述
|
||||
/// </summary>
|
||||
[JsonProperty("error_desc")]
|
||||
public string ErrorDesc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 反馈主键ID(生产单ID或者采购单ID或者码token)
|
||||
/// </summary>
|
||||
[JsonProperty("feedback_id")]
|
||||
public string FeedbackId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产单:PRODUCE_ORDER 采购单:PURCHASE_ORDER 二维码:QRCODE
|
||||
/// </summary>
|
||||
[JsonProperty("order_type")]
|
||||
public string OrderType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部单据号
|
||||
/// </summary>
|
||||
[JsonProperty("out_biz_no")]
|
||||
public string OutBizNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 每条记录处理结果
|
||||
/// </summary>
|
||||
[JsonProperty("success")]
|
||||
public bool Success { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccessOrdersFeedBackResult Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccessOrdersFeedBackResult : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 错误码
|
||||
/// </summary>
|
||||
[JsonProperty("error_code")]
|
||||
public string ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 错误描述
|
||||
/// </summary>
|
||||
[JsonProperty("error_desc")]
|
||||
public string ErrorDesc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 反馈主键ID(生产单ID或者采购单ID或者码token)
|
||||
/// </summary>
|
||||
[JsonProperty("feedback_id")]
|
||||
public string FeedbackId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产单:PRODUCE_ORDER 采购单:PURCHASE_ORDER 二维码:QRCODE
|
||||
/// </summary>
|
||||
[JsonProperty("order_type")]
|
||||
public string OrderType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部单据号
|
||||
/// </summary>
|
||||
[JsonProperty("out_biz_no")]
|
||||
public string OutBizNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 每条记录处理结果
|
||||
/// </summary>
|
||||
[JsonProperty("success")]
|
||||
public bool Success { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccessParams Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccessParams : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 目前支持以下值: 1. ALIPAYAPP (钱包h5页面签约) 2. QRCODE(扫码签约) 3. QRCODEORSMS(扫码签约或者短信签约)
|
||||
/// </summary>
|
||||
[JsonProperty("channel")]
|
||||
public string Channel { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccessProduceOrder Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccessProduceOrder : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 口碑码批次号
|
||||
/// </summary>
|
||||
[JsonProperty("batch_id")]
|
||||
public string BatchId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产单标识
|
||||
/// </summary>
|
||||
[JsonProperty("produce_order_id")]
|
||||
public string ProduceOrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产数量
|
||||
/// </summary>
|
||||
[JsonProperty("produce_quantity")]
|
||||
public long ProduceQuantity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料属性名称
|
||||
/// </summary>
|
||||
[JsonProperty("stuff_attr_name")]
|
||||
public string StuffAttrName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料材质
|
||||
/// </summary>
|
||||
[JsonProperty("stuff_material")]
|
||||
public string StuffMaterial { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料尺寸
|
||||
/// </summary>
|
||||
[JsonProperty("stuff_size")]
|
||||
public string StuffSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料类型
|
||||
/// </summary>
|
||||
[JsonProperty("stuff_type")]
|
||||
public string StuffType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板唯一标识
|
||||
/// </summary>
|
||||
[JsonProperty("template_id")]
|
||||
public string TemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板名称
|
||||
/// </summary>
|
||||
[JsonProperty("template_name")]
|
||||
public string TemplateName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccessProduceQrcode Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccessProduceQrcode : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 口碑码批次号
|
||||
/// </summary>
|
||||
[JsonProperty("batch_id")]
|
||||
public string BatchId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 码url
|
||||
/// </summary>
|
||||
[JsonProperty("core_url")]
|
||||
public string CoreUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 生产单号
|
||||
/// </summary>
|
||||
[JsonProperty("produce_order_id")]
|
||||
public string ProduceOrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 二维码编码
|
||||
/// </summary>
|
||||
[JsonProperty("qrcode")]
|
||||
public string Qrcode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccessPurchaseOrder Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccessPurchaseOrder : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 申请日期, 格式: yyyy-MM-dd HH:mm:ss
|
||||
/// </summary>
|
||||
[JsonProperty("apply_date")]
|
||||
public string ApplyDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 申请订单明细号
|
||||
/// </summary>
|
||||
[JsonProperty("asset_item_id")]
|
||||
public string AssetItemId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 申请订单号
|
||||
/// </summary>
|
||||
[JsonProperty("asset_order_id")]
|
||||
public string AssetOrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 采购单号(订单汇总表ID)
|
||||
/// </summary>
|
||||
[JsonProperty("asset_purchase_id")]
|
||||
public string AssetPurchaseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 市
|
||||
/// </summary>
|
||||
[JsonProperty("city")]
|
||||
public string City { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 数量
|
||||
/// </summary>
|
||||
[JsonProperty("count")]
|
||||
public string Count { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单创建日期, 格式: yyyy-MM-dd HH:mm:ss
|
||||
/// </summary>
|
||||
[JsonProperty("create_date")]
|
||||
public string CreateDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 区
|
||||
/// </summary>
|
||||
[JsonProperty("district")]
|
||||
public string District { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否需要生产
|
||||
/// </summary>
|
||||
[JsonProperty("is_produce")]
|
||||
public string IsProduce { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 省
|
||||
/// </summary>
|
||||
[JsonProperty("province")]
|
||||
public string Province { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 收货人地址
|
||||
/// </summary>
|
||||
[JsonProperty("receiver_address")]
|
||||
public string ReceiverAddress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 联系人电话
|
||||
/// </summary>
|
||||
[JsonProperty("receiver_mobile")]
|
||||
public string ReceiverMobile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 收货人姓名
|
||||
/// </summary>
|
||||
[JsonProperty("receiver_name")]
|
||||
public string ReceiverName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料类型
|
||||
/// </summary>
|
||||
[JsonProperty("stuff_attr_name")]
|
||||
public string StuffAttrName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料材质
|
||||
/// </summary>
|
||||
[JsonProperty("stuff_material")]
|
||||
public string StuffMaterial { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料尺寸
|
||||
/// </summary>
|
||||
[JsonProperty("stuff_size")]
|
||||
public string StuffSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物料属性
|
||||
/// </summary>
|
||||
[JsonProperty("stuff_type")]
|
||||
public string StuffType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板ID
|
||||
/// </summary>
|
||||
[JsonProperty("template_id")]
|
||||
public string TemplateId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 模板名称,线下约定的物料名
|
||||
/// </summary>
|
||||
[JsonProperty("template_name")]
|
||||
public string TemplateName { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,71 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccessPurchaseOrderSend Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccessPurchaseOrderSend : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 申请单明细号
|
||||
/// </summary>
|
||||
[JsonProperty("asset_item_id")]
|
||||
public string AssetItemId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 申请单号
|
||||
/// </summary>
|
||||
[JsonProperty("asset_order_id")]
|
||||
public string AssetOrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 采购单ID
|
||||
/// </summary>
|
||||
[JsonProperty("asset_purchase_id")]
|
||||
public string AssetPurchaseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物流公司code
|
||||
/// </summary>
|
||||
[JsonProperty("express_code")]
|
||||
public string ExpressCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物流公司名称
|
||||
/// </summary>
|
||||
[JsonProperty("express_name")]
|
||||
public string ExpressName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物流单号
|
||||
/// </summary>
|
||||
[JsonProperty("express_no")]
|
||||
public string ExpressNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部单号(供应商主键标识)
|
||||
/// </summary>
|
||||
[JsonProperty("out_biz_no")]
|
||||
public string OutBizNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// PO单号
|
||||
/// </summary>
|
||||
[JsonProperty("po_no")]
|
||||
public string PoNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 回传码值数量1000(不是码物料时为0)
|
||||
/// </summary>
|
||||
[JsonProperty("return_qrcode_count")]
|
||||
public string ReturnQrcodeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 本次发货数量
|
||||
/// </summary>
|
||||
[JsonProperty("ship_count")]
|
||||
public string ShipCount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccessPurchaseOrderSendResult Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccessPurchaseOrderSendResult : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 申请单明细号
|
||||
/// </summary>
|
||||
[JsonProperty("asset_item_id")]
|
||||
public string AssetItemId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 申请单号
|
||||
/// </summary>
|
||||
[JsonProperty("asset_order_id")]
|
||||
public string AssetOrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 采购单ID
|
||||
/// </summary>
|
||||
[JsonProperty("asset_purchase_id")]
|
||||
public string AssetPurchaseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 错误CODE
|
||||
/// </summary>
|
||||
[JsonProperty("error_code")]
|
||||
public string ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 错误描述
|
||||
/// </summary>
|
||||
[JsonProperty("error_desc")]
|
||||
public string ErrorDesc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部单号(调用方业务主键标识)
|
||||
/// </summary>
|
||||
[JsonProperty("out_biz_no")]
|
||||
public string OutBizNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理是否成功
|
||||
/// </summary>
|
||||
[JsonProperty("success")]
|
||||
public bool Success { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccessReturnQrcode Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccessReturnQrcode : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 采购单ID
|
||||
/// </summary>
|
||||
[JsonProperty("asset_purchase_id")]
|
||||
public string AssetPurchaseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物流单号
|
||||
/// </summary>
|
||||
[JsonProperty("express_no")]
|
||||
public string ExpressNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部单号(调用方业务主键)
|
||||
/// </summary>
|
||||
[JsonProperty("out_biz_no")]
|
||||
public string OutBizNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 二维码token值
|
||||
/// </summary>
|
||||
[JsonProperty("qrcode")]
|
||||
public string Qrcode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccessReturnQrcodeResult Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccessReturnQrcodeResult : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 采购单ID
|
||||
/// </summary>
|
||||
[JsonProperty("asset_purchase_id")]
|
||||
public string AssetPurchaseId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 错误码
|
||||
/// </summary>
|
||||
[JsonProperty("error_code")]
|
||||
public string ErrorCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 错误描述
|
||||
/// </summary>
|
||||
[JsonProperty("error_desc")]
|
||||
public string ErrorDesc { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 物流单号
|
||||
/// </summary>
|
||||
[JsonProperty("express_no")]
|
||||
public string ExpressNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部单号(调用方业务主键)
|
||||
/// </summary>
|
||||
[JsonProperty("out_biz_no")]
|
||||
public string OutBizNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 二维码token值
|
||||
/// </summary>
|
||||
[JsonProperty("qrcode")]
|
||||
public string Qrcode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理结果(成功或失败)
|
||||
/// </summary>
|
||||
[JsonProperty("success")]
|
||||
public bool Success { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccountFreeze Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccountFreeze : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 冻结金额
|
||||
/// </summary>
|
||||
[JsonProperty("freeze_amount")]
|
||||
public string FreezeAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 冻结类型名称
|
||||
/// </summary>
|
||||
[JsonProperty("freeze_name")]
|
||||
public string FreezeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 冻结类型值
|
||||
/// </summary>
|
||||
[JsonProperty("freeze_type")]
|
||||
public string FreezeType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AccountRecord Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AccountRecord : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付宝订单号
|
||||
/// </summary>
|
||||
[JsonProperty("alipay_order_no")]
|
||||
public string AlipayOrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当时账户的余额
|
||||
/// </summary>
|
||||
[JsonProperty("balance")]
|
||||
public string Balance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务类型
|
||||
/// </summary>
|
||||
[JsonProperty("business_type")]
|
||||
public string BusinessType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建时间
|
||||
/// </summary>
|
||||
[JsonProperty("create_time")]
|
||||
public string CreateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 收入金额
|
||||
/// </summary>
|
||||
[JsonProperty("in_amount")]
|
||||
public string InAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 账务备注说明
|
||||
/// </summary>
|
||||
[JsonProperty("memo")]
|
||||
public string Memo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户订单号
|
||||
/// </summary>
|
||||
[JsonProperty("merchant_order_no")]
|
||||
public string MerchantOrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对方支付宝账户ID
|
||||
/// </summary>
|
||||
[JsonProperty("opt_user_id")]
|
||||
public string OptUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支出金额
|
||||
/// </summary>
|
||||
[JsonProperty("out_amount")]
|
||||
public string OutAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 本方支付宝账户ID
|
||||
/// </summary>
|
||||
[JsonProperty("self_user_id")]
|
||||
public string SelfUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 账务类型
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// ActivityAuditDTO Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ActivityAuditDTO : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 审核id
|
||||
/// </summary>
|
||||
[JsonProperty("audit_id")]
|
||||
public string AuditId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// INIT:初始化;AUDITING:审核中;REJECT:审核驳回;PASS:审核通过;CANCEL:审核撤销;FAIL:审核失败
|
||||
/// </summary>
|
||||
[JsonProperty("audit_status")]
|
||||
public string AuditStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作人id
|
||||
/// </summary>
|
||||
[JsonProperty("creator_id")]
|
||||
public string CreatorId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// SALES:口碑内部小二;PROVIDER:外部服务商;PROVIDER_STAFF:外部服务商员工
|
||||
/// </summary>
|
||||
[JsonProperty("creator_type")]
|
||||
public string CreatorType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作时间
|
||||
/// </summary>
|
||||
[JsonProperty("operation_time")]
|
||||
public string OperationTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审核通过或者审核驳回的原因
|
||||
/// </summary>
|
||||
[JsonProperty("reason")]
|
||||
public string Reason { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// ActivityOrderDTO Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class ActivityOrderDTO : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 工单中的审核信息
|
||||
/// </summary>
|
||||
[JsonProperty("activity_audit_list")]
|
||||
public List<ActivityAuditDTO> ActivityAuditList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// INIT:初始化;AUDITING:审核中;REJECT:审核驳回;PASS:审核通过;CANCEL:审核撤销;FAIL:审核失败
|
||||
/// </summary>
|
||||
[JsonProperty("audit_status")]
|
||||
public string AuditStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单号
|
||||
/// </summary>
|
||||
[JsonProperty("order_id")]
|
||||
public string OrderId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// INIT:初始化;DOING:处理中;SUCCESS:成功;FAIL:失败
|
||||
/// </summary>
|
||||
[JsonProperty("order_status")]
|
||||
public string OrderStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// CAMPAIGN_CREATE_ORDER:创建工单;CAMPAIGN_ENABLE_ORDER:生效工单;CAMPAIGN_START_ORDER:启动工单;CAMPAIGN_CLOSE_ORDER:关闭工单;CAMPAIGN_FINISH_ORDER:结束工单;CAMPAIGN_DELETE_ORDER:删除工单;CAMPAIGN_MODIFY_ORDER:修改工单
|
||||
/// </summary>
|
||||
[JsonProperty("order_type")]
|
||||
public string OrderType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,60 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AddressInfo Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AddressInfo : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 商户详细经营地址
|
||||
/// </summary>
|
||||
[JsonProperty("address")]
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户所在城市编码,城市编码是与国家统计局一致,请查询: http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/
|
||||
/// 国标省市区号下载:http://aopsdkdownload.cn-hangzhou.alipay-pub.aliyun-inc.com/doc/2016.xls?spm=a219a.7629140.0.0.qRW4KQ&file
|
||||
/// =2016.xls
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户所在区县编码,区县编码是与国家统计局一致,请查询: http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/
|
||||
/// 国标省市区号下载:http://aopsdkdownload.cn-hangzhou.alipay-pub.aliyun-inc.com/doc/2016.xls?spm=a219a.7629140.0.0.qRW4KQ&file
|
||||
/// =2016.xls
|
||||
/// </summary>
|
||||
[JsonProperty("district_code")]
|
||||
public string DistrictCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 纬度,浮点型,小数点后最多保留6位 如需要录入经纬度,请以高德坐标系为准,录入时请确保经纬度参数准确。高德经纬度查询:http://lbs.amap.com/console/show/picker
|
||||
/// </summary>
|
||||
[JsonProperty("latitude")]
|
||||
public string Latitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 经度,浮点型, 小数点后最多保留6位。 如需要录入经纬度,请以高德坐标系为准,录入时请确保经纬度参数准确。高德经纬度查询:http://lbs.amap.com/console/show/picker
|
||||
/// </summary>
|
||||
[JsonProperty("longitude")]
|
||||
public string Longitude { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户所在省份编码, 省份编码是与国家统计局一致,请查询: http://www.stats.gov.cn/tjsj/tjbz/tjyqhdmhcxhfdm/
|
||||
/// 国标省市区号下载:http://aopsdkdownload.cn-hangzhou.alipay-pub.aliyun-inc.com/doc/2016.xls?spm=a219a.7629140.0.0.qRW4KQ&file
|
||||
/// =2016.xls
|
||||
/// </summary>
|
||||
[JsonProperty("province_code")]
|
||||
public string ProvinceCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地址类型。取值范围:BUSINESS_ADDRESS:经营地址(默认)
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,212 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AdviceVO Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AdviceVO : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 兑换请求发起时间
|
||||
/// </summary>
|
||||
[JsonProperty("client_advice_timestamp")]
|
||||
public string ClientAdviceTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户号:用于定义FX交易的客户,由外汇交易中心统一分配
|
||||
/// </summary>
|
||||
[JsonProperty("client_id")]
|
||||
public string ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户请求序号: 客户侧的流水号,由客户上送
|
||||
/// </summary>
|
||||
[JsonProperty("client_ref")]
|
||||
public string ClientRef { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对应金额,选输项
|
||||
/// </summary>
|
||||
[JsonProperty("contra_amount")]
|
||||
public string ContraAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对应币种
|
||||
/// </summary>
|
||||
[JsonProperty("contra_ccy")]
|
||||
public string ContraCcy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 端对端流水号 原TransactionID,用于标识全局唯一序号
|
||||
/// </summary>
|
||||
[JsonProperty("end_to_end_id")]
|
||||
public string EndToEndId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求类型:H - HedgeAdvise , T - TradeAdvise。锁价模式下先发送Hedge,在发送对应的Trade。非锁价模式下,可直接发送Trade
|
||||
/// </summary>
|
||||
[JsonProperty("msg_type")]
|
||||
public string MsgType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否部分成交:Y,N。是否可部分成交 默认为不可部分成交
|
||||
/// </summary>
|
||||
[JsonProperty("partial_trade")]
|
||||
public string PartialTrade { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付渠道: 上送收单业务中的支付渠道,须提前约定。
|
||||
/// </summary>
|
||||
[JsonProperty("payment_provider")]
|
||||
public string PaymentProvider { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付类型, 默认为DEFAULT
|
||||
/// </summary>
|
||||
[JsonProperty("payment_type")]
|
||||
public string PaymentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户协议扩展号,用于支持同一客户在不同场景下所需的汇率
|
||||
/// </summary>
|
||||
[JsonProperty("profile_id")]
|
||||
public string ProfileId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇率的唯一编码
|
||||
/// </summary>
|
||||
[JsonProperty("rate_ref")]
|
||||
public string RateRef { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇率请求模式 : TA时必输,仅在TA时有效。 字典:REQ - 按客户请求(含滑点)成交,若该价格失效,则交易失败;ACP - 汇率失效或请求中不带汇率,接受该客户协议的最新汇率,实际成交汇率以GlobalFX为准;"
|
||||
/// </summary>
|
||||
[JsonProperty("rate_request_mode")]
|
||||
public string RateRequestMode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇率类型:SPOT,FORWARD。送RateRef的情况下,以RateRef关联的汇率为准。
|
||||
/// </summary>
|
||||
[JsonProperty("rate_type")]
|
||||
public string RateType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备用字段1
|
||||
/// </summary>
|
||||
[JsonProperty("reference_field1")]
|
||||
public string ReferenceField1 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备用字段2
|
||||
/// </summary>
|
||||
[JsonProperty("reference_field2")]
|
||||
public string ReferenceField2 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 备用字段3
|
||||
/// </summary>
|
||||
[JsonProperty("reference_field3")]
|
||||
public string ReferenceField3 { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关联交易请求号: "本次交易请求关联的原交易号。填写规范: 1)正向交易的TA,填写HA MessageId 2)REFUND,添加原SALE的TA MessageId 3)CHARGEBACK,填写原SALE的TA
|
||||
/// MessageId 4)CHARGEBACK_REVERSE,填写原CHARGEBACK的TA MessageId 5)CANCELLATION,填写被Cancel交易的TA MessageId"
|
||||
/// </summary>
|
||||
[JsonProperty("related_message_id")]
|
||||
public string RelatedMessageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易请求号
|
||||
/// </summary>
|
||||
[JsonProperty("request_message_id")]
|
||||
public string RequestMessageId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 客户请求的汇率,送RateRef的情况下,以RateRef关联的汇率为准。
|
||||
/// </summary>
|
||||
[JsonProperty("requested_rate")]
|
||||
public string RequestedRate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// NDF交割下,实际交割币种的金额
|
||||
/// </summary>
|
||||
[JsonProperty("settlement_amount")]
|
||||
public string SettlementAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// NDF交割下,实际交割的币种
|
||||
/// </summary>
|
||||
[JsonProperty("settlement_ccy")]
|
||||
public string SettlementCcy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 买卖方向:BUY,SELL。客户视角对交易货币的操作。该字段为必填,与原TransactionType的对应关系如下: SALE - SELL REFUND - BUY CHARGEBACK - BUY
|
||||
/// CHARGEBACK_RESEVSE - SELL CANCELLATION - 使用原交易的side"
|
||||
/// </summary>
|
||||
[JsonProperty("side")]
|
||||
public string Side { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 汇率上浮滑点 : BP单位,即汇率单位的万分之一。仅在“请求汇率模式”为REQ时有效,在请求汇率/汇率编码对应的汇率的基础上,Side为BUY时上浮滑点,Side为SELL时下浮滑点
|
||||
/// </summary>
|
||||
[JsonProperty("slip_point")]
|
||||
public long SlipPoint { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 调用方事件码
|
||||
/// </summary>
|
||||
[JsonProperty("source_event_code")]
|
||||
public string SourceEventCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 调用方产品码
|
||||
/// </summary>
|
||||
[JsonProperty("source_product_code")]
|
||||
public string SourceProductCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 时间所在时区
|
||||
/// </summary>
|
||||
[JsonProperty("time_zone")]
|
||||
public string TimeZone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上层业务发起时间
|
||||
/// </summary>
|
||||
[JsonProperty("trade_timestamp")]
|
||||
public string TradeTimestamp { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易金额
|
||||
/// </summary>
|
||||
[JsonProperty("transaction_amount")]
|
||||
public string TransactionAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易币种: 客户视角的交易买卖币种
|
||||
/// </summary>
|
||||
[JsonProperty("transaction_ccy")]
|
||||
public string TransactionCcy { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易币种交割方式:DELIV,NDF。当Client的实际交割货币与交易币种不一致时,送NDF。
|
||||
/// </summary>
|
||||
[JsonProperty("transaction_ccy_type")]
|
||||
public string TransactionCcyType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易类型: 兼容收单业务兑换使用。字典:SALE,REFUND,CHARGEBACK,CHARGEBACK_REVERSE,CANCELLATION
|
||||
/// </summary>
|
||||
[JsonProperty("transaction_type")]
|
||||
public string TransactionType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 起息日期 : YYYYMMDD,客户期望的资金交割日期
|
||||
/// </summary>
|
||||
[JsonProperty("value_date")]
|
||||
public string ValueDate { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AgreementParams Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AgreementParams : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付宝系统中用以唯一标识用户签约记录的编号(用户签约成功后的协议号 )
|
||||
/// </summary>
|
||||
[JsonProperty("agreement_no")]
|
||||
public string AgreementNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 鉴权申请token,其格式和内容,由支付宝定义。在需要做支付鉴权校验时,该参数不能为空。
|
||||
/// </summary>
|
||||
[JsonProperty("apply_token")]
|
||||
public string ApplyToken { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 鉴权确认码,在需要做支付鉴权校验时,该参数不能为空
|
||||
/// </summary>
|
||||
[JsonProperty("auth_confirm_no")]
|
||||
public string AuthConfirmNo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AgreementSignParams Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AgreementSignParams : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 商户在芝麻端申请的appId
|
||||
/// </summary>
|
||||
[JsonProperty("buckle_app_id")]
|
||||
public string BuckleAppId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户在芝麻端申请的merchantId
|
||||
/// </summary>
|
||||
[JsonProperty("buckle_merchant_id")]
|
||||
public string BuckleMerchantId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户签约号,代扣协议中标示用户的唯一签约号(确保在商户系统中唯一)。 格式规则:支持大写小写字母和数字,最长32位。 商户系统按需传入,如果同一用户在同一产品码、同一签约场景下,签订了多份代扣协议,那么需要指定并传入该值。
|
||||
/// </summary>
|
||||
[JsonProperty("external_agreement_no")]
|
||||
public string ExternalAgreementNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户在商户网站的登录账号,用于在签约页面展示,如果为空,则不展示
|
||||
/// </summary>
|
||||
[JsonProperty("external_logon_id")]
|
||||
public string ExternalLogonId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 个人签约产品码,商户和支付宝签约时确定。
|
||||
/// </summary>
|
||||
[JsonProperty("personal_product_code")]
|
||||
public string PersonalProductCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 签约营销参数,此值为json格式;具体的key需与营销约定
|
||||
/// </summary>
|
||||
[JsonProperty("promo_params")]
|
||||
public string PromoParams { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 协议签约场景,商户和支付宝签约时确定。 当传入商户签约号external_agreement_no时,场景不能为默认值DEFAULT|DEFAULT。
|
||||
/// </summary>
|
||||
[JsonProperty("sign_scene")]
|
||||
public string SignScene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前用户签约请求的协议有效周期。 整形数字加上时间单位的协议有效期,从发起签约请求的时间开始算起。 目前支持的时间单位: 1. d:天 2. m:月 如果未传入,默认为长期有效。
|
||||
/// </summary>
|
||||
[JsonProperty("sign_validity_period")]
|
||||
public string SignValidityPeriod { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 签约第三方主体类型。对于三方协议,表示当前用户和哪一类的第三方主体进行签约。 取值范围: 1. PARTNER(平台商户); 2. MERCHANT(集团商户),集团下子商户可共享用户签约内容; 默认为PARTNER。
|
||||
/// </summary>
|
||||
[JsonProperty("third_party_type")]
|
||||
public string ThirdPartyType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AliTrustAlipayCert Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AliTrustAlipayCert : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户出生日期
|
||||
/// </summary>
|
||||
[JsonProperty("birthday")]
|
||||
public string Birthday { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 点击支付宝实名认证图标之后的跳转链接
|
||||
/// </summary>
|
||||
[JsonProperty("forward_url")]
|
||||
public string ForwardUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户性别(M/F)
|
||||
/// </summary>
|
||||
[JsonProperty("gender")]
|
||||
public string Gender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝实名认证图标的链接地址
|
||||
/// </summary>
|
||||
[JsonProperty("icon_url")]
|
||||
public string IconUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当账户为支付宝实名认证时,取值为"T";否则为"F".
|
||||
/// </summary>
|
||||
[JsonProperty("is_certified")]
|
||||
public string IsCertified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户姓名
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AliTrustCert Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AliTrustCert : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 点击信用认证图标之后的跳转链接
|
||||
/// </summary>
|
||||
[JsonProperty("forward_url")]
|
||||
public string ForwardUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 通过信用认证的图标链接
|
||||
/// </summary>
|
||||
[JsonProperty("icon_url")]
|
||||
public string IconUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当通过信用认证时,取值为"T";否则为"F".
|
||||
/// </summary>
|
||||
[JsonProperty("is_certified")]
|
||||
public string IsCertified { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 芝麻认证等级,取值为1,2,3
|
||||
/// </summary>
|
||||
[JsonProperty("level")]
|
||||
public string Level { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当用户未通过芝麻认证时给出的原因提示
|
||||
/// </summary>
|
||||
[JsonProperty("message")]
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AliTrustRiskIdentify Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AliTrustRiskIdentify : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 芝麻信用风险名单详情列表
|
||||
/// </summary>
|
||||
[JsonProperty("details")]
|
||||
|
||||
public List<ZhimaRiskDetail> Details { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当有风险时,为"T";无风险识别是为"F"
|
||||
/// </summary>
|
||||
[JsonProperty("is_risk")]
|
||||
public string IsRisk { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 已废弃
|
||||
/// </summary>
|
||||
[JsonProperty("risk_tag")]
|
||||
public string RiskTag { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AliTrustScore Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AliTrustScore : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 芝麻分
|
||||
/// </summary>
|
||||
[JsonProperty("score")]
|
||||
public long Score { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayAccount Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayAccount : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付宝用户ID
|
||||
/// </summary>
|
||||
[JsonProperty("alipay_user_id")]
|
||||
public string AlipayUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 可用余额
|
||||
/// </summary>
|
||||
[JsonProperty("available_amount")]
|
||||
public string AvailableAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 不可用余额
|
||||
/// </summary>
|
||||
[JsonProperty("freeze_amount")]
|
||||
public string FreezeAmount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 余额总额
|
||||
/// </summary>
|
||||
[JsonProperty("total_amount")]
|
||||
public string TotalAmount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayAccountExrateAdviceAcceptModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayAccountExrateAdviceAcceptModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 交易请求对象内容
|
||||
/// </summary>
|
||||
[JsonProperty("advice")]
|
||||
public AdviceVO Advice { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayAccountExrateAllclientrateQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayAccountExrateAllclientrateQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 客户id,客户和报价中心签约时约定的信息
|
||||
/// </summary>
|
||||
[JsonProperty("client_id")]
|
||||
public string ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子协议扩展号,同一个客户不同业务场景下需要不同的客户报价,通过profile_id区分。正常情况下可能每个客户只有一个默认的profile_id
|
||||
/// </summary>
|
||||
[JsonProperty("profile_id")]
|
||||
public string ProfileId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayAccountExrateCollectcoreDataSendModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayAccountExrateCollectcoreDataSendModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 上数提交数据内容
|
||||
/// </summary>
|
||||
[JsonProperty("content")]
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,44 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayAccountExratePricingNotifyModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayAccountExratePricingNotifyModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 标识该汇率提供给哪个客户使用
|
||||
/// </summary>
|
||||
[JsonProperty("client_id")]
|
||||
public string ClientId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源汇率机构
|
||||
/// </summary>
|
||||
[JsonProperty("inst")]
|
||||
public string Inst { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 源汇率数据
|
||||
/// </summary>
|
||||
[JsonProperty("pricing_list")]
|
||||
|
||||
public List<PricingVO> PricingList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 该汇率的使用场景
|
||||
/// </summary>
|
||||
[JsonProperty("segment_id")]
|
||||
public string SegmentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 所在时区,所有的时间都是该时区的时间 支持 GMT+8 UTC+0 Europe/London 的格式
|
||||
/// </summary>
|
||||
[JsonProperty("time_zone")]
|
||||
public string TimeZone { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayAccountExrateRatequeryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayAccountExrateRatequeryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 需要查询汇率的货币对,如果为空则返回当前支持的所有货币对的汇率
|
||||
/// </summary>
|
||||
[JsonProperty("currency_pair")]
|
||||
public string CurrencyPair { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayAccountExrateTraderequestCreateModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayAccountExrateTraderequestCreateModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 交易请求对象内容
|
||||
/// </summary>
|
||||
[JsonProperty("trade_request")]
|
||||
public TradeRequestVO TradeRequest { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayAssetPointAccountlogQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayAssetPointAccountlogQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户流水查询起始时间
|
||||
/// </summary>
|
||||
[JsonProperty("account_date_begin")]
|
||||
public string AccountDateBegin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户流水查询结束时间
|
||||
/// </summary>
|
||||
[JsonProperty("account_date_end")]
|
||||
public string AccountDateEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询的当前页号,从1开始
|
||||
/// </summary>
|
||||
[JsonProperty("page_number")]
|
||||
public long PageNumber { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询的单页大小
|
||||
/// </summary>
|
||||
[JsonProperty("page_size")]
|
||||
public long PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子交易代码,标记大业务下的子业务,例如充值-外部商户发放,可选参数可以不传
|
||||
/// </summary>
|
||||
[JsonProperty("sub_trans_code")]
|
||||
|
||||
public List<string> SubTransCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主交易代码,例如支付、充值等,标记业务大类,可选参数可以不传
|
||||
/// </summary>
|
||||
[JsonProperty("trans_code")]
|
||||
|
||||
public List<string> TransCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户标识符,用于指定集分宝发放的用户,和user_symbol_type一起使用,确定一个唯一的支付宝用户
|
||||
/// </summary>
|
||||
[JsonProperty("user_symbol")]
|
||||
public string UserSymbol { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户标识符类型, 现在支持ALIPAY_USER_ID:表示支付宝用户ID, ALIPAY_LOGON_ID:表示支付宝登陆号,
|
||||
/// </summary>
|
||||
[JsonProperty("user_symbol_type")]
|
||||
public string UserSymbolType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayAssetPointOrderCreateModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayAssetPointOrderCreateModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 向用户展示集分宝发放备注
|
||||
/// </summary>
|
||||
[JsonProperty("memo")]
|
||||
public string Memo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// isv提供的发放订单号,由数字和字母组成,最大长度为32位,需要保证每笔订单发放的唯一性,支付宝对该参数做唯一性校验。如果订单号已存在,支付宝将返回订单号已经存在的错误
|
||||
/// </summary>
|
||||
[JsonProperty("merchant_order_no")]
|
||||
public string MerchantOrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发放集分宝时间
|
||||
/// </summary>
|
||||
[JsonProperty("order_time")]
|
||||
public string OrderTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发放集分宝的数量
|
||||
/// </summary>
|
||||
[JsonProperty("point_count")]
|
||||
public long PointCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户标识符,用于指定集分宝发放的用户,和user_symbol_type一起使用,确定一个唯一的支付宝用户
|
||||
/// </summary>
|
||||
[JsonProperty("user_symbol")]
|
||||
public string UserSymbol { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户标识符类型, 现在支持ALIPAY_USER_ID:表示支付宝用户ID, ALIPAY_LOGON_ID:表示支付宝登陆号, TAOBAO_NICK:淘宝昵称
|
||||
/// </summary>
|
||||
[JsonProperty("user_symbol_type")]
|
||||
public string UserSymbolType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayAssetPointOrderQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayAssetPointOrderQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// isv提供的发放号订单号,由数字和字母组成,最大长度为32为,需要保证每笔发放的唯一性,集分宝系统会对该参数做唯一性控制。调用接口后集分宝系统会根据这个外部订单号查询发放的订单详情。
|
||||
/// </summary>
|
||||
[JsonProperty("merchant_order_no")]
|
||||
public string MerchantOrderNo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayBossBaseProcessInstanceCancelModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayBossBaseProcessInstanceCancelModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 备注
|
||||
/// </summary>
|
||||
[JsonProperty("memo")]
|
||||
public string Memo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理人域账号
|
||||
/// </summary>
|
||||
[JsonProperty("operator")]
|
||||
public string Operator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流程全局唯一ID
|
||||
/// </summary>
|
||||
[JsonProperty("puid")]
|
||||
public string Puid { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,81 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayBossBaseProcessInstanceCreateModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayBossBaseProcessInstanceCreateModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 加签内容
|
||||
/// </summary>
|
||||
[JsonProperty("add_sign_content")]
|
||||
|
||||
public List<BPOpenApiAddSignContent> AddSignContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务上下文,JSON格式
|
||||
/// </summary>
|
||||
[JsonProperty("context")]
|
||||
public string Context { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 创建人的域账号
|
||||
/// </summary>
|
||||
[JsonProperty("creator")]
|
||||
public string Creator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 描述信息
|
||||
/// </summary>
|
||||
[JsonProperty("description")]
|
||||
public string Description { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 2088账号
|
||||
/// </summary>
|
||||
[JsonProperty("ip_role_id")]
|
||||
public string IpRoleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流程配置名称。需要先在流程平台配置流程
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 优先级,数字越大优先级越高,最大不超过29
|
||||
/// </summary>
|
||||
[JsonProperty("priority")]
|
||||
public long Priority { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流程全局唯一ID,和业务一一对应
|
||||
/// </summary>
|
||||
[JsonProperty("puid")]
|
||||
public BPOpenApiPUID Puid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 前置流程从哪个节点发起的本流程
|
||||
/// </summary>
|
||||
[JsonProperty("source_node_name")]
|
||||
public string SourceNodeName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 前置流程的PUID。用于串连起两个流程
|
||||
/// </summary>
|
||||
[JsonProperty("source_puid")]
|
||||
public string SourcePuid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 子流程的上下文。每一个上下文都使用JSON格式
|
||||
/// </summary>
|
||||
[JsonProperty("sub_contexts")]
|
||||
|
||||
public List<string> SubContexts { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayBossBaseProcessInstanceQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayBossBaseProcessInstanceQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 流程全局唯一ID
|
||||
/// </summary>
|
||||
[JsonProperty("puid")]
|
||||
public string Puid { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayBossBaseProcessTaskProcessModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayBossBaseProcessTaskProcessModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 更新的业务上下文。和原有业务上下文同key覆盖,新增key新增。
|
||||
/// </summary>
|
||||
[JsonProperty("context")]
|
||||
public string Context { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理幂等值,特别注意这个值的使用,不能依赖于流程中的任何值。
|
||||
/// </summary>
|
||||
[JsonProperty("idempotent_id")]
|
||||
public string IdempotentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 处理备注
|
||||
/// </summary>
|
||||
[JsonProperty("memo")]
|
||||
public string Memo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前需要推进的节点
|
||||
/// </summary>
|
||||
[JsonProperty("node")]
|
||||
public string Node { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作名称
|
||||
/// </summary>
|
||||
[JsonProperty("operate")]
|
||||
public string Operate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前处理人域账号
|
||||
/// </summary>
|
||||
[JsonProperty("operator")]
|
||||
public string Operator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新的优先级。填写0则不更新,使用原值
|
||||
/// </summary>
|
||||
[JsonProperty("priority")]
|
||||
public long Priority { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 流程全局唯一ID
|
||||
/// </summary>
|
||||
[JsonProperty("puid")]
|
||||
public string Puid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 更新的子流程上下文。完全覆盖原值。若不需要覆盖,则传null
|
||||
/// </summary>
|
||||
[JsonProperty("sub_contexts")]
|
||||
|
||||
public List<string> SubContexts { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayBossCsChannelQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayBossCsChannelQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 平均通话时长的qualifier
|
||||
/// </summary>
|
||||
[JsonProperty("att")]
|
||||
public string Att { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总接通率的qualifier
|
||||
/// </summary>
|
||||
[JsonProperty("connectionrate")]
|
||||
public string Connectionrate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 在线小二人数的qualifier
|
||||
/// </summary>
|
||||
[JsonProperty("curragentsloggedin")]
|
||||
public string Curragentsloggedin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 通话中人数的qualifier
|
||||
/// </summary>
|
||||
[JsonProperty("curragenttalking")]
|
||||
public string Curragenttalking { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 小休人数的qualifier
|
||||
/// </summary>
|
||||
[JsonProperty("currentnotreadyagents")]
|
||||
public string Currentnotreadyagents { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 等待人数的qualifier
|
||||
/// </summary>
|
||||
[JsonProperty("currentreadyagents")]
|
||||
public string Currentreadyagents { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总排队数的Qualifier
|
||||
/// </summary>
|
||||
[JsonProperty("currnumberwaitingcalls")]
|
||||
public string Currnumberwaitingcalls { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查询hbase的rowkey
|
||||
/// </summary>
|
||||
[JsonProperty("endkey")]
|
||||
public string Endkey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查询hbase的rowkey
|
||||
/// </summary>
|
||||
[JsonProperty("startkey")]
|
||||
public string Startkey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总流入量的qualifier
|
||||
/// </summary>
|
||||
[JsonProperty("visitorinflow")]
|
||||
public string Visitorinflow { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 总应答量的qualifier
|
||||
/// </summary>
|
||||
[JsonProperty("visitorresponse")]
|
||||
public string Visitorresponse { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 应答量[转接] 的qualifier
|
||||
/// </summary>
|
||||
[JsonProperty("visitorresponsetransfer")]
|
||||
public string Visitorresponsetransfer { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayBossCsDatacollectSendModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayBossCsDatacollectSendModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 上数提交数据内容
|
||||
/// </summary>
|
||||
[JsonProperty("content")]
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,114 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayBossProdSubmerchantCreateModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayBossProdSubmerchantCreateModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 受理商户详细经营地址
|
||||
/// </summary>
|
||||
[JsonProperty("address")]
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户简称
|
||||
/// </summary>
|
||||
[JsonProperty("alias_name")]
|
||||
public string AliasName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户营业执照编号
|
||||
/// </summary>
|
||||
[JsonProperty("business_license")]
|
||||
public string BusinessLicense { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户经营类目,参考开放平台口碑开放行业入驻要求
|
||||
/// </summary>
|
||||
[JsonProperty("category_id")]
|
||||
public string CategoryId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户所在城市编码
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户联系人邮箱
|
||||
/// </summary>
|
||||
[JsonProperty("contact_email")]
|
||||
public string ContactEmail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户联系人手机号
|
||||
/// </summary>
|
||||
[JsonProperty("contact_mobile")]
|
||||
public string ContactMobile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户联系人名称
|
||||
/// </summary>
|
||||
[JsonProperty("contact_name")]
|
||||
public string ContactName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户联系人电话
|
||||
/// </summary>
|
||||
[JsonProperty("contact_phone")]
|
||||
public string ContactPhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户所在区县编码
|
||||
/// </summary>
|
||||
[JsonProperty("district_code")]
|
||||
public string DistrictCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户编号,由受理机构定义,需要保证在受理机构下唯一
|
||||
/// </summary>
|
||||
[JsonProperty("external_id")]
|
||||
public string ExternalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户身份证编号
|
||||
/// </summary>
|
||||
[JsonProperty("id_card")]
|
||||
public string IdCard { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户备注信息,可填写额外信息
|
||||
/// </summary>
|
||||
[JsonProperty("memo")]
|
||||
public string Memo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户名称
|
||||
/// </summary>
|
||||
[JsonProperty("name")]
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户所在省份编码
|
||||
/// </summary>
|
||||
[JsonProperty("province_code")]
|
||||
public string ProvinceCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户客服电话
|
||||
/// </summary>
|
||||
[JsonProperty("service_phone")]
|
||||
public string ServicePhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户来源机构标识,填写受理机构在支付宝的pid
|
||||
/// </summary>
|
||||
[JsonProperty("source")]
|
||||
public string Source { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,84 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayBossProdSubmerchantModifyModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayBossProdSubmerchantModifyModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 受理商户详细经营地址
|
||||
/// </summary>
|
||||
[JsonProperty("address")]
|
||||
public string Address { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户简称
|
||||
/// </summary>
|
||||
[JsonProperty("alias_name")]
|
||||
public string AliasName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户营业执照编号
|
||||
/// </summary>
|
||||
[JsonProperty("business_license")]
|
||||
public string BusinessLicense { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户城市编码
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户联系人名称
|
||||
/// </summary>
|
||||
[JsonProperty("contact_name")]
|
||||
public string ContactName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户区县编码
|
||||
/// </summary>
|
||||
[JsonProperty("district_code")]
|
||||
public string DistrictCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户编号,与sub_merchant_id二选一必传
|
||||
/// </summary>
|
||||
[JsonProperty("external_id")]
|
||||
public string ExternalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户身份证编号
|
||||
/// </summary>
|
||||
[JsonProperty("id_card")]
|
||||
public string IdCard { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户省份编码
|
||||
/// </summary>
|
||||
[JsonProperty("province_code")]
|
||||
public string ProvinceCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户客服电话
|
||||
/// </summary>
|
||||
[JsonProperty("service_phone")]
|
||||
public string ServicePhone { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户来源机构标识,填写受理机构在支付宝的pid
|
||||
/// </summary>
|
||||
[JsonProperty("source")]
|
||||
public string Source { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 本次修改受理商户的支付宝识别号,同请求传入的sub_merchant_id字段,与external_id二选一必传
|
||||
/// </summary>
|
||||
[JsonProperty("sub_merchant_id")]
|
||||
public string SubMerchantId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayBossProdSubmerchantQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayBossProdSubmerchantQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 受理商户在受理机构下的唯一标识,与sub_merchant_id二选一必传
|
||||
/// </summary>
|
||||
[JsonProperty("external_id")]
|
||||
public string ExternalId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 受理商户在支付宝入驻后的识别号,商户入驻后由支付宝返回,与external_id二选一必传
|
||||
/// </summary>
|
||||
[JsonProperty("sub_merchant_id")]
|
||||
public string SubMerchantId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayChinareModelResult Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayChinareModelResult : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 体检记录id
|
||||
/// </summary>
|
||||
[JsonProperty("id")]
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 规则id
|
||||
/// </summary>
|
||||
[JsonProperty("rule_id")]
|
||||
public string RuleId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 核保结果
|
||||
/// </summary>
|
||||
[JsonProperty("rule_result")]
|
||||
public string RuleResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易流水记录id
|
||||
/// </summary>
|
||||
[JsonProperty("trans_id")]
|
||||
public string TransId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCodeRecoResult Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCodeRecoResult : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 识别的验证码内容
|
||||
/// </summary>
|
||||
[JsonProperty("content")]
|
||||
public string Content { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceBusinessorderQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceBusinessorderQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询办事记录的时间区间中的开始时间,格式为yyyy-MM-dd HH:mm:ss
|
||||
/// </summary>
|
||||
[JsonProperty("begin_time")]
|
||||
public string BeginTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查询办事记录的时间区间中的结束时间,格式为yyyy-MM-dd HH:mm:ss
|
||||
/// </summary>
|
||||
[JsonProperty("end_time")]
|
||||
public string EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// isv的appid
|
||||
/// </summary>
|
||||
[JsonProperty("isv_appid")]
|
||||
public string IsvAppid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询的起始页数
|
||||
/// </summary>
|
||||
[JsonProperty("page_num")]
|
||||
public string PageNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询的每页数据量
|
||||
/// </summary>
|
||||
[JsonProperty("page_size")]
|
||||
public string PageSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 查询的办事记录所属服务展台(如城市服务为CITY_SERVICE,车主平台为MYCAR_SERVICE等)
|
||||
/// </summary>
|
||||
[JsonProperty("platform_type")]
|
||||
public string PlatformType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 办事记录状态列表
|
||||
/// </summary>
|
||||
[JsonProperty("status_list")]
|
||||
|
||||
public List<string> StatusList { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝userId
|
||||
/// </summary>
|
||||
[JsonProperty("user_id")]
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorDepositCancelModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorDepositCancelModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 扩展字段,传递撤销的终端信息,原因等
|
||||
/// </summary>
|
||||
[JsonProperty("biz_info_ext")]
|
||||
public string BizInfoExt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 充值卡号
|
||||
/// </summary>
|
||||
[JsonProperty("card_no")]
|
||||
public string CardNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交通卡卡类型,一个城市只有一个固定的值
|
||||
/// </summary>
|
||||
[JsonProperty("card_type")]
|
||||
public string CardType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 撤销时间
|
||||
/// </summary>
|
||||
[JsonProperty("operate_time")]
|
||||
public string OperateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户的交易号
|
||||
/// </summary>
|
||||
[JsonProperty("out_biz_no")]
|
||||
public string OutBizNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易号
|
||||
/// </summary>
|
||||
[JsonProperty("trade_no")]
|
||||
public string TradeNo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorDepositConfirmModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorDepositConfirmModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 传递确认的终端信息,终端编号等
|
||||
/// </summary>
|
||||
[JsonProperty("biz_info_ext")]
|
||||
public string BizInfoExt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交通卡号
|
||||
/// </summary>
|
||||
[JsonProperty("card_no")]
|
||||
public string CardNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交通卡卡类型,一个城市只有一个固定的值
|
||||
/// </summary>
|
||||
[JsonProperty("card_type")]
|
||||
public string CardType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 核销时间
|
||||
/// </summary>
|
||||
[JsonProperty("operate_time")]
|
||||
public string OperateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户的交易号
|
||||
/// </summary>
|
||||
[JsonProperty("out_biz_no")]
|
||||
public string OutBizNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 该笔请求的唯一编号,强校验,控制幂等性
|
||||
/// </summary>
|
||||
[JsonProperty("request_id")]
|
||||
public string RequestId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝交易号
|
||||
/// </summary>
|
||||
[JsonProperty("trade_no")]
|
||||
public string TradeNo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorDepositQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorDepositQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 交通卡号
|
||||
/// </summary>
|
||||
[JsonProperty("card_no")]
|
||||
public string CardNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 和渠道定义的卡类型,一个城市支持一种卡类型
|
||||
/// </summary>
|
||||
[JsonProperty("card_type")]
|
||||
public string CardType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// transfer:待圈存 success:圈存成功 fail:圈存失败
|
||||
/// </summary>
|
||||
[JsonProperty("status")]
|
||||
public string Status { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorFunctionQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorFunctionQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 城市国家标准编码
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 终端设备编码,android可直接获取设备的devicecode值
|
||||
/// </summary>
|
||||
[JsonProperty("device_code")]
|
||||
public string DeviceCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorScriptQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorScriptQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 卡类型,智能卡中心的内部编码规则
|
||||
/// </summary>
|
||||
[JsonProperty("card_type")]
|
||||
public string CardType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 脚本类型,目前支持两种 readCardType:判定卡是什么城市的交通卡 readCardInfo:读取卡中的余额等信息
|
||||
/// </summary>
|
||||
[JsonProperty("script_type")]
|
||||
public string ScriptType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorStationQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorStationQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 城市编码请参考查询:http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/201504/t20150415_712722.html; 已支持城市:广州 440100,深圳
|
||||
/// 440300,杭州330100。
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorVoucherBatchqueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorVoucherBatchqueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 城市编码请参考查询:http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/201504/t20150415_712722.html; 已支持城市:广州 440100,深圳
|
||||
/// 440300,杭州330100。
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝交易号列表
|
||||
/// </summary>
|
||||
[JsonProperty("trade_nos")]
|
||||
|
||||
public List<string> TradeNos { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorVoucherCancelModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorVoucherCancelModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 渠道商提供的其它信息
|
||||
/// </summary>
|
||||
[JsonProperty("biz_info_ext")]
|
||||
public string BizInfoExt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 城市标准码
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户退款时间
|
||||
/// </summary>
|
||||
[JsonProperty("operate_time")]
|
||||
public string OperateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 核销号
|
||||
/// </summary>
|
||||
[JsonProperty("ticket_no")]
|
||||
public string TicketNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝交易号
|
||||
/// </summary>
|
||||
[JsonProperty("trade_no")]
|
||||
public string TradeNo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,102 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorVoucherConfirmModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorVoucherConfirmModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 金额,元为单位
|
||||
/// </summary>
|
||||
[JsonProperty("amount")]
|
||||
public string Amount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 渠道商提供的其它信息
|
||||
/// </summary>
|
||||
[JsonProperty("biz_info_ext")]
|
||||
public string BizInfoExt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 该笔请求的唯一编号,有值请求强校验
|
||||
/// </summary>
|
||||
[JsonProperty("biz_request_id")]
|
||||
public string BizRequestId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 城市标准码
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 终点站编号
|
||||
/// </summary>
|
||||
[JsonProperty("end_station")]
|
||||
public string EndStation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单张票编号列表,多个逗号分隔
|
||||
/// </summary>
|
||||
[JsonProperty("exchange_ids")]
|
||||
public string ExchangeIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户核销时间
|
||||
/// </summary>
|
||||
[JsonProperty("operate_time")]
|
||||
public string OperateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户的交易号
|
||||
/// </summary>
|
||||
[JsonProperty("out_biz_no")]
|
||||
public string OutBizNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 票数
|
||||
/// </summary>
|
||||
[JsonProperty("quantity")]
|
||||
public string Quantity { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 请求方标识
|
||||
/// </summary>
|
||||
[JsonProperty("seller_id")]
|
||||
public string SellerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 起点站编号
|
||||
/// </summary>
|
||||
[JsonProperty("start_station")]
|
||||
public string StartStation { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 核销号
|
||||
/// </summary>
|
||||
[JsonProperty("ticket_no")]
|
||||
public string TicketNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 票单价,元为单位
|
||||
/// </summary>
|
||||
[JsonProperty("ticket_price")]
|
||||
public string TicketPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 票类型
|
||||
/// </summary>
|
||||
[JsonProperty("ticket_type")]
|
||||
public string TicketType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝交易号
|
||||
/// </summary>
|
||||
[JsonProperty("trade_no")]
|
||||
public string TradeNo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorVoucherGenerateModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorVoucherGenerateModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 城市编码请参考查询:http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/201504/t20150415_712722.html; 已支持城市:广州 440100,深圳
|
||||
/// 440300,杭州330100。
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 起点站站点编码
|
||||
/// </summary>
|
||||
[JsonProperty("site_begin")]
|
||||
public string SiteBegin { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 终点站站点编码
|
||||
/// </summary>
|
||||
[JsonProperty("site_end")]
|
||||
public string SiteEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地铁票购票数量
|
||||
/// </summary>
|
||||
[JsonProperty("ticket_num")]
|
||||
public string TicketNum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 单张票价,元为单价
|
||||
/// </summary>
|
||||
[JsonProperty("ticket_price")]
|
||||
public string TicketPrice { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 地铁票种类
|
||||
/// </summary>
|
||||
[JsonProperty("ticket_type")]
|
||||
public string TicketType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单总金额,元为单位
|
||||
/// </summary>
|
||||
[JsonProperty("total_fee")]
|
||||
public string TotalFee { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝交易号(交易支付时,必须通过指定sellerId:2088121612215201,将钱支付到指定的中间户中)
|
||||
/// </summary>
|
||||
[JsonProperty("trade_no")]
|
||||
public string TradeNo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorVoucherQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorVoucherQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 城市标准码
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 8位核销码
|
||||
/// </summary>
|
||||
[JsonProperty("ticket_no")]
|
||||
public string TicketNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝交易号
|
||||
/// </summary>
|
||||
[JsonProperty("trade_no")]
|
||||
public string TradeNo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorVoucherRefundModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorVoucherRefundModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 城市编码请参考查询:http://www.stats.gov.cn/tjsj/tjbz/xzqhdm/201504/t20150415_712722.html; 已支持城市:广州 440100,深圳
|
||||
/// 440300,杭州330100。
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝交易号
|
||||
/// </summary>
|
||||
[JsonProperty("trade_no")]
|
||||
public string TradeNo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceCityfacilitatorVoucherUploadModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceCityfacilitatorVoucherUploadModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 渠道商提供的其它信息
|
||||
/// </summary>
|
||||
[JsonProperty("biz_info_ext")]
|
||||
public string BizInfoExt { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 城市标准码
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// JSON字符串,包含出票的序列号,票号,出票时间,出票流水号
|
||||
/// </summary>
|
||||
[JsonProperty("exchange_ids")]
|
||||
public string ExchangeIds { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作时间
|
||||
/// </summary>
|
||||
[JsonProperty("operate_time")]
|
||||
public string OperateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 核销码
|
||||
/// </summary>
|
||||
[JsonProperty("ticket_no")]
|
||||
public string TicketNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝交易号
|
||||
/// </summary>
|
||||
[JsonProperty("trade_no")]
|
||||
public string TradeNo { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceDataMonitordataSyncModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceDataMonitordataSyncModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 传入的批量打包数据,dataEntry和dataDim的组合数据,详见dataEntry和dataDim的说明
|
||||
/// </summary>
|
||||
[JsonProperty("datas")]
|
||||
|
||||
public List<Datas> Datas { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 接口的版本,当前版本是v1.0.0
|
||||
/// </summary>
|
||||
[JsonProperty("interface_version")]
|
||||
public string InterfaceVersion { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceDataResultSendModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceDataResultSendModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 请求来源
|
||||
/// </summary>
|
||||
[JsonProperty("channel")]
|
||||
public string Channel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 版本号,由支付宝分配
|
||||
/// </summary>
|
||||
[JsonProperty("interface_version")]
|
||||
public string InterfaceVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作code,由支付宝分配
|
||||
/// </summary>
|
||||
[JsonProperty("op_code")]
|
||||
public string OpCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结果码,由支付宝分配,该结果码将对应不同的页面展示
|
||||
/// </summary>
|
||||
[JsonProperty("result_code")]
|
||||
public string ResultCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 场景code,由支付宝分配
|
||||
/// </summary>
|
||||
[JsonProperty("scene_code")]
|
||||
public string SceneCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 场景的数据表示. json 数组格式, 根据不同的scene_code,op_code, channel,version共同确定参数是否 可以为空,接入时由支付宝确定 参数格式。
|
||||
/// </summary>
|
||||
[JsonProperty("scene_data")]
|
||||
public string SceneData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 通知的目标用户
|
||||
/// </summary>
|
||||
[JsonProperty("target_id")]
|
||||
public string TargetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 取值范围: IDENTITY_CARD_NO :身份证 ALIPAY_LOGON_ID:支付宝登录账号 BINDING_MOBILE_NO:支付宝账号绑定的手机号 ALIPAY_USER_ID:支付宝user_id
|
||||
/// 标明target_id对应的类型,此参数为空时, 默认为支付宝账号的user_id。 注意:类型为身份证、支付宝绑定的手机号时, 可能对应多个支付宝账号,此时只会选择列表
|
||||
/// 第一个支付宝账号的userId作为targetId使用。
|
||||
/// </summary>
|
||||
[JsonProperty("target_id_type")]
|
||||
public string TargetIdType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,63 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceDataSendModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceDataSendModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 场景的来源渠道,比如场景 在阿里旅行触发,就用alitrip 接入时和支付宝共同确认
|
||||
/// </summary>
|
||||
[JsonProperty("channel")]
|
||||
public string Channel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作码,由支付宝分配
|
||||
/// </summary>
|
||||
[JsonProperty("op_code")]
|
||||
public string OpCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 操作数据,如果只需要支付宝这边利用 数据直接完成某个功能(通知),则使 用此参数传输数据.,根据不同的scene_code, op_code,channel,version共同确定参数是否
|
||||
/// 可以为空,接入时由支付宝确定参数格式。
|
||||
/// </summary>
|
||||
[JsonProperty("op_data")]
|
||||
public string OpData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 场景标识,由支付宝分配
|
||||
/// </summary>
|
||||
[JsonProperty("scene_code")]
|
||||
public string SceneCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 场景的数据表示. json 数组 格式,根据不同的scene_code, op_code,channel,version共同确定 参数是否可以为空,接入时由支付宝确定 参数格式。
|
||||
/// </summary>
|
||||
[JsonProperty("scene_data")]
|
||||
public string SceneData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 场景覆盖的目标人群标识, 单个用户是支付宝的userId, 多个用户userId 使用英文半 角逗号隔开,最多200个 如果是群组,使用支付宝分配 的群组ID.
|
||||
/// </summary>
|
||||
[JsonProperty("target_id")]
|
||||
public string TargetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 取值范围: IDENTITY_CARD_NO :身份证 ALIPAY_LOGON_ID:支付宝登录账号 BINDING_MOBILE_NO:支付宝账号绑定的手机号 ALIPAY_USER_ID:支付宝user_id
|
||||
/// 标明target_id对应的类型,此参数为空时, 默认为支付宝账号的user_id。 注意:类型为身份证、支付宝绑定的手机号时, 可能对应多个支付宝账号,此时只会选择列表
|
||||
/// 第一个支付宝账号的userId作为targetId使用。
|
||||
/// </summary>
|
||||
[JsonProperty("target_id_type")]
|
||||
public string TargetIdType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 场景数据的类型的版本,由支付宝分配
|
||||
/// </summary>
|
||||
[JsonProperty("version")]
|
||||
public string Version { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceLotteryPresentSendModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceLotteryPresentSendModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 被赠送彩票的支付宝用户的ID,不支持一次赠送给多个用户
|
||||
/// </summary>
|
||||
[JsonProperty("alipay_user_id")]
|
||||
public string AlipayUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 彩种ID
|
||||
/// </summary>
|
||||
[JsonProperty("lottery_type_id")]
|
||||
public long LotteryTypeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部订单号,不超过255字符,可包含英文和数字,需保证在商户端不重复
|
||||
/// </summary>
|
||||
[JsonProperty("out_order_no")]
|
||||
public string OutOrderNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 彩票注数,大于0,最大为100
|
||||
/// </summary>
|
||||
[JsonProperty("stake_count")]
|
||||
public long StakeCount { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 赠言,不超过20个汉字
|
||||
/// </summary>
|
||||
[JsonProperty("swety_words")]
|
||||
public string SwetyWords { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceLotteryPresentlistQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceLotteryPresentlistQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 结束日期,格式为yyyyMMdd
|
||||
/// </summary>
|
||||
[JsonProperty("gmt_end")]
|
||||
public string GmtEnd { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 开始日期,格式为yyyyMMdd
|
||||
/// </summary>
|
||||
[JsonProperty("gmt_start")]
|
||||
public string GmtStart { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 页号,必须大于0,默认为1
|
||||
/// </summary>
|
||||
[JsonProperty("page_no")]
|
||||
public long PageNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 页大小,必须大于0,最大为500,默认为500
|
||||
/// </summary>
|
||||
[JsonProperty("page_size")]
|
||||
public long PageSize { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceMedicalCardQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceMedicalCardQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付授权码
|
||||
/// </summary>
|
||||
[JsonProperty("auth_code")]
|
||||
public string AuthCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 买家支付宝账号对应的支付宝唯一用户号。 以2088开头的纯16位数字。
|
||||
/// </summary>
|
||||
[JsonProperty("buyer_id")]
|
||||
public string BuyerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 卡颁发机构编号
|
||||
/// </summary>
|
||||
[JsonProperty("card_org_no")]
|
||||
public string CardOrgNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务扩展参数
|
||||
/// </summary>
|
||||
[JsonProperty("extend_params")]
|
||||
public string ExtendParams { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 跳回的地址
|
||||
/// </summary>
|
||||
[JsonProperty("return_url")]
|
||||
public string ReturnUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付场景 条码支付,取值:bar_code 声波支付,取值:wave_code
|
||||
/// </summary>
|
||||
[JsonProperty("scene")]
|
||||
public string Scene { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceMedicalInformationUploadModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceMedicalInformationUploadModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付授权码
|
||||
/// </summary>
|
||||
[JsonProperty("auth_code")]
|
||||
public string AuthCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付场景(默认为条形码) 条码支付,取值:bar_code 声波支付,取值:wave_code 二维码支付,取值qr_code
|
||||
/// </summary>
|
||||
[JsonProperty("auth_type")]
|
||||
public string AuthType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上报明细: 挂号场景:挂号科室名 线下药店:药品名称
|
||||
/// </summary>
|
||||
[JsonProperty("body")]
|
||||
public string Body { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 买家id
|
||||
/// </summary>
|
||||
[JsonProperty("buyer_id")]
|
||||
public string BuyerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务扩展参数 系统商编号:sys_service_provider_id 该参数作为系统商返佣数据提取的依据,请填写系统商签约协议的PID
|
||||
/// </summary>
|
||||
[JsonProperty("extend_params")]
|
||||
public string ExtendParams { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部生成时间。 格式为 yyyy-MM-dd HH:mm:ss
|
||||
/// </summary>
|
||||
[JsonProperty("gmt_out_create")]
|
||||
public string GmtOutCreate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 上报行业: 药店:STORE
|
||||
/// </summary>
|
||||
[JsonProperty("industry")]
|
||||
public string Industry { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否医保业务 是:T 不是:F
|
||||
/// </summary>
|
||||
[JsonProperty("is_insurance")]
|
||||
public string IsInsurance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 医保机构的编号
|
||||
/// </summary>
|
||||
[JsonProperty("medical_card_inst_id")]
|
||||
public string MedicalCardInstId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 医疗机构名称
|
||||
/// </summary>
|
||||
[JsonProperty("org_name")]
|
||||
public string OrgName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 医疗机构编码(医保局分配)
|
||||
/// </summary>
|
||||
[JsonProperty("org_no")]
|
||||
public string OrgNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户订单号,64个字符以内、可包含字母、数字、下划线;需保证在商户端不重复。
|
||||
/// </summary>
|
||||
[JsonProperty("out_trade_no")]
|
||||
public string OutTradeNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 患者证件号码
|
||||
/// </summary>
|
||||
[JsonProperty("patient_card_no")]
|
||||
public string PatientCardNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 患者证件类型
|
||||
/// </summary>
|
||||
[JsonProperty("patient_card_type")]
|
||||
public string PatientCardType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 患者手机号
|
||||
/// </summary>
|
||||
[JsonProperty("patient_mobile")]
|
||||
public string PatientMobile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 患者姓名 患者姓名&患者证件和医保卡信息全部匹配才能使用医保,否则认为套保嫌疑不允许医保只能自费
|
||||
/// </summary>
|
||||
[JsonProperty("patient_name")]
|
||||
public string PatientName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 如果需要医保支付这个字段必传。业务报文,报文中可包含多条业务数据
|
||||
/// </summary>
|
||||
[JsonProperty("request_content")]
|
||||
public string RequestContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 场景,取值:REGISTRATION(挂号)
|
||||
/// </summary>
|
||||
[JsonProperty("scene")]
|
||||
public string Scene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 卖家支付宝用户ID,如果该值为空,则默认为商户签约账号对应的支付宝用户ID
|
||||
/// </summary>
|
||||
[JsonProperty("seller_id")]
|
||||
public string SellerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务流水号
|
||||
/// </summary>
|
||||
[JsonProperty("serial_no")]
|
||||
public string SerialNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 主题
|
||||
/// </summary>
|
||||
[JsonProperty("subject")]
|
||||
public string Subject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 金额,单位元
|
||||
/// </summary>
|
||||
[JsonProperty("total_amount")]
|
||||
public string TotalAmount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceMedicalInstcardBindModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceMedicalInstcardBindModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 区域编码,使用国家行政区划代码,可参看 http://www.stats.gov.cn/tjsj/tjbz/xzqhdm
|
||||
/// </summary>
|
||||
[JsonProperty("city_code")]
|
||||
public string CityCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝处理完请求后,如验证成功,当前页面自动跳转到商户网站里指定页面的http路径。
|
||||
/// </summary>
|
||||
[JsonProperty("return_url")]
|
||||
public string ReturnUrl { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,144 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceMedicalInstcardCreateandpayModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceMedicalInstcardCreateandpayModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 业务单据号
|
||||
/// </summary>
|
||||
[JsonProperty("bill_no")]
|
||||
public string BillNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 对交易或者商品的描述
|
||||
/// </summary>
|
||||
[JsonProperty("body")]
|
||||
public string Body { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 买家id
|
||||
/// </summary>
|
||||
[JsonProperty("buyer_id")]
|
||||
public string BuyerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务扩展参数
|
||||
/// </summary>
|
||||
[JsonProperty("extend_params")]
|
||||
public string ExtendParams { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部下单时间。 格式为 yyyy-MM-dd HH:mm:ss
|
||||
/// </summary>
|
||||
[JsonProperty("gmt_out_create")]
|
||||
public string GmtOutCreate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付行业: 医院:HOSPITAL 药店:STORE
|
||||
/// </summary>
|
||||
[JsonProperty("industry")]
|
||||
public string Industry { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部机构业务上是否允许这笔单订单使用医保支付 允许使用:T 不允许使用:F
|
||||
/// </summary>
|
||||
[JsonProperty("is_insurance")]
|
||||
public string IsInsurance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 医保机构的编号
|
||||
/// </summary>
|
||||
[JsonProperty("medical_card_inst_id")]
|
||||
public string MedicalCardInstId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 医疗机构名称
|
||||
/// </summary>
|
||||
[JsonProperty("org_name")]
|
||||
public string OrgName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 医疗机构编码(医保局分配)
|
||||
/// </summary>
|
||||
[JsonProperty("org_no")]
|
||||
public string OrgNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 商户订单号,64个字符以内、可包含字母、数字、下划线;需保证在商户端不重复。
|
||||
/// </summary>
|
||||
[JsonProperty("out_trade_no")]
|
||||
public string OutTradeNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 患者证件号码
|
||||
/// </summary>
|
||||
[JsonProperty("patient_card_no")]
|
||||
public string PatientCardNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 患者证件类型
|
||||
/// </summary>
|
||||
[JsonProperty("patient_card_type")]
|
||||
public string PatientCardType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 患者手机号
|
||||
/// </summary>
|
||||
[JsonProperty("patient_mobile")]
|
||||
public string PatientMobile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 患者姓名 患者姓名&患者证件和医保卡信息全部匹配才能使用医保,否则认为套保嫌疑不允许医保只能自费
|
||||
/// </summary>
|
||||
[JsonProperty("patient_name")]
|
||||
public string PatientName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 如果需要医保支付这个字段必传。业务报文,报文中可包含多条业务数据
|
||||
/// </summary>
|
||||
[JsonProperty("request_content")]
|
||||
public string RequestContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付场景,取值:REGISTRATION(挂号) TREATMENT(诊间) HOSPITALIZATION(住院) COMMON(非医院类)
|
||||
/// </summary>
|
||||
[JsonProperty("scene")]
|
||||
public string Scene { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 卖家支付宝用户ID,如果该值为空,则默认为商户签约账号对应的支付宝用户ID
|
||||
/// </summary>
|
||||
[JsonProperty("seller_id")]
|
||||
public string SellerId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 业务流水号
|
||||
/// </summary>
|
||||
[JsonProperty("serial_no")]
|
||||
public string SerialNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单标题
|
||||
/// </summary>
|
||||
[JsonProperty("subject")]
|
||||
public string Subject { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 该笔订单允许的最晚付款时间,逾期将关闭交易。取值范围:1m~15d。m-分钟,h-小时,d-天,1c-当天(1c-当天的情况下,无论交易何时创建,都在0点关闭)。 该参数数值不接受小数点, 如 1.5h,可转换为 90m
|
||||
/// </summary>
|
||||
[JsonProperty("timeout_express")]
|
||||
public string TimeoutExpress { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订单总金额,单位为元,不能小于0,精确到小数点后2位。
|
||||
/// </summary>
|
||||
[JsonProperty("total_amount")]
|
||||
public string TotalAmount { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,66 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceTradeApplyModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceTradeApplyModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 订单费用详情,用于在订单确认页面展示
|
||||
/// </summary>
|
||||
[JsonProperty("amount_detail")]
|
||||
public string AmountDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 接口请求渠道编码,由支付宝提供
|
||||
/// </summary>
|
||||
[JsonProperty("channel")]
|
||||
public string Channel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 接口版本号
|
||||
/// </summary>
|
||||
[JsonProperty("interface_version")]
|
||||
public string InterfaceVersion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用于标识操作模型,由支付宝配置提供
|
||||
/// </summary>
|
||||
[JsonProperty("op_code")]
|
||||
public string OpCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 场景的数据表示. json 数组格式,根据场景不同的模型传入不同参数,由支付宝负责提供参数集合
|
||||
/// </summary>
|
||||
[JsonProperty("order_detail")]
|
||||
public string OrderDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用于标识数据模型,由支付宝配置提供
|
||||
/// </summary>
|
||||
[JsonProperty("scene_code")]
|
||||
public string SceneCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 场景覆盖的目标人群标识,支持支付宝userId、身份证号、支付宝登录号、支付宝绑定手机号;
|
||||
/// </summary>
|
||||
[JsonProperty("target_id")]
|
||||
public string TargetId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 场景覆盖人群id类型
|
||||
/// </summary>
|
||||
[JsonProperty("target_id_type")]
|
||||
public string TargetIdType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 交易请求参数
|
||||
/// </summary>
|
||||
[JsonProperty("trade_apply_params")]
|
||||
public TradeApplyParams TradeApplyParams { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceTransportOfflinepayRecordVerifyModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceTransportOfflinepayRecordVerifyModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 原始脱机记录信息
|
||||
/// </summary>
|
||||
[JsonProperty("record")]
|
||||
public string Record { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceTransportOfflinepayTradeSettleModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceTransportOfflinepayTradeSettleModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 脱机交易列表
|
||||
/// </summary>
|
||||
[JsonProperty("trade_list")]
|
||||
|
||||
public List<AlipayOfflineTrade> TradeList { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceTransportOfflinepayUserblacklistQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceTransportOfflinepayUserblacklistQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 用户黑名单分页ID,1开始
|
||||
/// </summary>
|
||||
[JsonProperty("page_index")]
|
||||
public long PageIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 脱机交易用户黑名单分页页大小,最大页大小不超过1000
|
||||
/// </summary>
|
||||
[JsonProperty("page_size")]
|
||||
public long PageSize { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCommerceTransportOfflinepayVirtualcardSendModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCommerceTransportOfflinepayVirtualcardSendModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 虚拟卡信息同步动作
|
||||
/// </summary>
|
||||
[JsonProperty("action")]
|
||||
public string Action { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户虚拟卡余额,单位元。
|
||||
/// </summary>
|
||||
[JsonProperty("balance")]
|
||||
public string Balance { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// hex格式表示的虚拟卡数据,卡数据将在虚拟卡二维码中透传。
|
||||
/// </summary>
|
||||
[JsonProperty("card_data")]
|
||||
public string CardData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 用户虚拟卡卡号
|
||||
/// </summary>
|
||||
[JsonProperty("card_no")]
|
||||
public string CardNo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 虚拟卡卡类型
|
||||
/// </summary>
|
||||
[JsonProperty("card_type")]
|
||||
public string CardType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 表示虚拟卡是否可用
|
||||
/// </summary>
|
||||
[JsonProperty("disabled")]
|
||||
public string Disabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 卡状态不可用时,标示卡的具体不可用状态。 CARD_OVERDUE ---- 欠费,CARD_REVOKING ---- 退卡中
|
||||
/// </summary>
|
||||
[JsonProperty("disabled_code")]
|
||||
public string DisabledCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当虚拟卡不可用时,提示用户不可用原因。
|
||||
/// </summary>
|
||||
[JsonProperty("disabled_tips")]
|
||||
public string DisabledTips { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// json格式字符串,存放扩展信息。discount_type ---- 优惠标识
|
||||
/// </summary>
|
||||
[JsonProperty("ext_info")]
|
||||
public string ExtInfo { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 虚拟卡最后更新时间 使用标准java时间格式
|
||||
/// </summary>
|
||||
[JsonProperty("last_update_time")]
|
||||
public string LastUpdateTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝用户id
|
||||
/// </summary>
|
||||
[JsonProperty("user_id")]
|
||||
public string UserId { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,48 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayContract Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayContract : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 支付宝用户ID
|
||||
/// </summary>
|
||||
[JsonProperty("alipay_user_id")]
|
||||
public string AlipayUserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订购的应用名称,有效时间。
|
||||
/// </summary>
|
||||
[JsonProperty("contract_content")]
|
||||
public string ContractContent { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订购的失效时间
|
||||
/// </summary>
|
||||
[JsonProperty("end_time")]
|
||||
public string EndTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订购URL。在sign返回false时返回应用的订购地址,可以引导用户订购。
|
||||
/// </summary>
|
||||
[JsonProperty("page_url")]
|
||||
public string PageUrl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 订购的生效时间
|
||||
/// </summary>
|
||||
[JsonProperty("start_time")]
|
||||
public string StartTime { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 是否订购的标识。true:代表已订购。
|
||||
/// </summary>
|
||||
[JsonProperty("subscribe")]
|
||||
public bool Subscribe { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,67 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCreditAutofinanceLoanApplyModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCreditAutofinanceLoanApplyModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 区域
|
||||
/// </summary>
|
||||
[JsonProperty("area")]
|
||||
public string Area { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 征信结果回调地址
|
||||
/// </summary>
|
||||
[JsonProperty("backurl")]
|
||||
public string Backurl { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 扩展参数信息,json格式,针对不同的业务平台有不同的参数,目前大搜车业务支持的参数有:firstpayamt 首付租金,firstpayprop 首付比例,lastpayamt 回购尾款,loantenor
|
||||
/// 贷款期数,monthpayamt 每月还款额度
|
||||
/// </summary>
|
||||
[JsonProperty("extparam")]
|
||||
public string Extparam { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部平台宝贝ID
|
||||
/// </summary>
|
||||
[JsonProperty("itemid")]
|
||||
public string Itemid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 机构编码
|
||||
/// </summary>
|
||||
[JsonProperty("orgcode")]
|
||||
public string Orgcode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部平台订单号,64个字符以内、只能包含字母、数字、下划线;需保证在外部平台端不重复
|
||||
/// </summary>
|
||||
[JsonProperty("outorderno")]
|
||||
public string Outorderno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝账号数字ID
|
||||
/// </summary>
|
||||
[JsonProperty("uid")]
|
||||
public string Uid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 核身VID
|
||||
/// </summary>
|
||||
[JsonProperty("verifyid")]
|
||||
public string Verifyid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前安装的支付宝钱包版本号
|
||||
/// </summary>
|
||||
[JsonProperty("version")]
|
||||
public string Version { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,42 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCreditAutofinanceLoanCloseModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCreditAutofinanceLoanCloseModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 汽车金融内部订单号
|
||||
/// </summary>
|
||||
[JsonProperty("applyno")]
|
||||
public string Applyno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 机构编号
|
||||
/// </summary>
|
||||
[JsonProperty("orgcode")]
|
||||
public string Orgcode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 外部平台订单号,64个字符以内、只能包含字母、数字、下划线;需保证在外部平台端不重复
|
||||
/// </summary>
|
||||
[JsonProperty("outorderno")]
|
||||
public string Outorderno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关闭原因
|
||||
/// </summary>
|
||||
[JsonProperty("reson")]
|
||||
public string Reson { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 关闭类型 1. CLOSE_USER_CANCEL(用户主动放弃贷款) 2. CLOSE_TD_REJECT(同盾校验失败) 3. CLOSE_OTHER(其他情况)
|
||||
/// </summary>
|
||||
[JsonProperty("type")]
|
||||
public string Type { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,43 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCreditAutofinanceLoanPlanQueryModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCreditAutofinanceLoanPlanQueryModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 扩展参数,针对不同的平台特殊业务场景,将需要的参数填入改字段,目前针对大搜车业务有以下参数:itemprice 车辆价格,lastprop 车辆残值率,extintamt 基础服务包+增值服务包,loantenor
|
||||
/// 贷款期数,creditamtprop 授信额度比例调整值;
|
||||
/// </summary>
|
||||
[JsonProperty("extparam")]
|
||||
public string Extparam { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 机构编码,机构接入汽车金融平台时分配,固定值
|
||||
/// </summary>
|
||||
[JsonProperty("orgcode")]
|
||||
public string Orgcode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 产品编码,汽车金融平台给机构提供的产品编码
|
||||
/// </summary>
|
||||
[JsonProperty("productcode")]
|
||||
public string Productcode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 本次请求流水号,全局唯一
|
||||
/// </summary>
|
||||
[JsonProperty("seqno")]
|
||||
public string Seqno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝账号数字ID
|
||||
/// </summary>
|
||||
[JsonProperty("uid")]
|
||||
public string Uid { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace Alipay.AopSdk.Core.Domain
|
||||
{
|
||||
/// <summary>
|
||||
/// AlipayCreditAutofinanceVidGetModel Data Structure.
|
||||
/// </summary>
|
||||
[Serializable]
|
||||
public class AlipayCreditAutofinanceVidGetModel : AopObject
|
||||
{
|
||||
/// <summary>
|
||||
/// 机构编号
|
||||
/// </summary>
|
||||
[JsonProperty("orgcode")]
|
||||
public string Orgcode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 支付宝账号数字ID
|
||||
/// </summary>
|
||||
[JsonProperty("uid")]
|
||||
public string Uid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 当前安装的支付宝钱包版本号
|
||||
/// </summary>
|
||||
[JsonProperty("version")]
|
||||
public string Version { get; set; }
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user