You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

417 lines
13 KiB
C#

9 months ago
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace POSV.LeShuaPay
{
public class LeShuaPayAuthCodeData
{
//==================================private==================================
#region field
//0 - 成功非0 - 失败。注此字段是通信标识业务状态要看result_code
private string resp_code;
//错误描述resp_code非0时返回
private string resp_msg;
//0 - 成功非0 - 失败
private string result_code;
//参考错误码
private string error_code;
//错误信息描述
private string error_msg;
//由乐刷分配
private string merchant_id;
//商户内部订单号
private string third_order_id;
//随机字符串
private string nonce_str;
//MD5签名结果
private string sign;
//详见下方订单状态
private string status;
//乐刷订单号
private string leshua_order_id;
//详见下方支付类型
private string pay_way;
//支付成功时才返回
private string pay_time;
//详见下方银行类型
private string bank_type;
//支付成功时才返回
private string openid;
//支付成功时才返回
private string out_transaction_id;
//支付成功时才返回。微信公众号APPID下用户唯一标识支付宝买家的支付宝用户ID
private string sub_openid;
//原样返回
private string attach;
//支付成功时才返回MICROPAY-条码支付NATIVE-原生扫码支付JSAPI-公众号支付、服务窗支付APP--app支付H5Pay-支付支付SmPgPay-小程序支付JSAPIQuick-简易支付
private string trade_type;
//支付成功时才返回
private string channel_order_id;
//支付成功时才返回
private string channel_datetime;
//支付成功时才返回,单位(分)
private string coupon;
//实际结算金额,支付成功时才返回,单位(分)
private string settlement_amount;
//订单优惠金额,支付成功时才返回,单位(分)
private string discount_amount;
//优惠详情说明:微信官网
private string promotion_detail;
//活动标志。WXLZ微信绿洲ZFBLH支付宝蓝海
private string active_flag;
//微信、支付宝此值有效
private string buyer_pay_amount;
#endregion
//==================================public==================================
#region resp_code 0 - 成功非0 - 失败。注此字段是通信标识业务状态要看result_code
[JsonProperty(PropertyName = "resp_code")]
/// <summary>
/// 0 - 成功非0 - 失败。注此字段是通信标识业务状态要看result_code
/// <summary>
public string Resp_code
{
get { return resp_code; }
set { resp_code = value; }
}
#endregion
#region resp_msg 错误描述resp_code非0时返回
[JsonProperty(PropertyName = "resp_msg")]
///<summary>
/// 错误描述resp_code非0时返回
///<summary>
public string Resp_msg
{
get { return resp_msg; }
set { resp_msg = value; }
}
#endregion
#region result_code 0 - 成功非0 - 失败
[JsonProperty(PropertyName = "result_code")]
/// <summary>
/// 0 - 成功非0 - 失败
/// <summary>
public string Result_code
{
get { return result_code; }
set { result_code = value; }
}
#endregion
#region error_code 参考错误码
[JsonProperty(PropertyName = "error_code")]
/// <summary>
/// 参考错误码
/// <summary>
public string Error_code
{
get { return error_code; }
set { error_code = value; }
}
#endregion
#region error_msg 错误信息描述
[JsonProperty(PropertyName = "error_msg")]
/// <summary>
/// 错误信息描述
/// <summary>
public string Error_msg
{
get { return error_msg; }
set { error_msg = value; }
}
#endregion
#region merchant_id 由乐刷分配
[JsonProperty(PropertyName = "merchant_id")]
/// <summary>
/// 由乐刷分配
/// <summary>
public string Merchant_id
{
get { return merchant_id; }
set { merchant_id = value; }
}
#endregion
#region third_order_id 商户内部订单号
[JsonProperty(PropertyName = "third_order_id")]
/// <summary>
/// 商户内部订单号
/// <summary>
public string Third_order_id
{
get { return third_order_id; }
set { third_order_id = value; }
}
#endregion
#region nonce_str 随机字符串
[JsonProperty(PropertyName = "nonce_str")]
/// <summary>
/// 随机字符串
/// <summary>
public string Nonce_str
{
get { return nonce_str; }
set { nonce_str = value; }
}
#endregion
#region sign MD5签名结果
[JsonProperty(PropertyName = "sign")]
/// <summary>
/// MD5签名结果
/// <summary>
public string Sign
{
get { return sign; }
set { sign = value; }
}
#endregion
#region status 详见下方订单状态
[JsonProperty(PropertyName = "status")]
/// <summary>
/// 详见下方订单状态
/// <summary>
public string Status
{
get { return status; }
set { status = value; }
}
#endregion
#region leshua_order_id 乐刷订单号
[JsonProperty(PropertyName = "leshua_order_id")]
/// <summary>
/// 乐刷订单号
/// <summary>
public string Leshua_order_id
{
get { return leshua_order_id; }
set { leshua_order_id = value; }
}
#endregion
#region pay_way 详见下方支付类型
[JsonProperty(PropertyName = "pay_way")]
/// <summary>
/// 详见下方支付类型
/// <summary>
public string Pay_way
{
get { return pay_way; }
set { pay_way = value; }
}
public string ToPayWayNo
{
get {
string _No = "05";
switch (pay_way)
{
case "WXZF":
break;
case "ZFBZF":
_No = "04";
break;
case "UPSMZF":
_No = "03";
break;
default:
break;
}
return _No;
}
}
#endregion
#region pay_time 支付成功时才返回
[JsonProperty(PropertyName = "pay_time")]
/// <summary>
/// 支付成功时才返回
/// <summary>
public string Pay_time
{
get { return pay_time; }
set { pay_time = value; }
}
#endregion
#region bank_type 详见下方银行类型
[JsonProperty(PropertyName = "bank_type")]
/// <summary>
/// 详见下方银行类型
/// <summary>
public string Bank_type
{
get { return bank_type; }
set { bank_type = value; }
}
#endregion
#region openid 支付成功时才返回
[JsonProperty(PropertyName = "openid")]
/// <summary>
/// 支付成功时才返回
/// <summary>
public string Openid
{
get { return openid; }
set { openid = value; }
}
#endregion
#region out_transaction_id 支付成功时才返回
[JsonProperty(PropertyName = "out_transaction_id")]
/// <summary>
/// 支付成功时才返回
/// <summary>
public string Out_transaction_id
{
get { return out_transaction_id; }
set { out_transaction_id = value; }
}
#endregion
#region sub_openid 支付成功时才返回。微信公众号APPID下用户唯一标识支付宝买家的支付宝用户ID
[JsonProperty(PropertyName = "sub_openid")]
/// <summary>
/// 支付成功时才返回。微信公众号APPID下用户唯一标识支付宝买家的支付宝用户ID
/// <summary>
public string Sub_openid
{
get { return sub_openid; }
set { sub_openid = value; }
}
#endregion
#region attach 原样返回
[JsonProperty(PropertyName = "attach")]
/// <summary>
/// 原样返回
/// <summary>
public string Attach
{
get { return attach; }
set { attach = value; }
}
#endregion
#region trade_type 支付成功时才返回MICROPAY-条码支付NATIVE-原生扫码支付JSAPI-公众号支付、服务窗支付APP--app支付H5Pay-支付支付SmPgPay-小程序支付JSAPIQuick-简易支付
[JsonProperty(PropertyName = "trade_type")]
/// <summary>
/// 支付成功时才返回MICROPAY-条码支付NATIVE-原生扫码支付JSAPI-公众号支付、服务窗支付APP--app支付H5Pay-支付支付SmPgPay-小程序支付JSAPIQuick-简易支付
/// <summary>
public string Trade_type
{
get { return trade_type; }
set { trade_type = value; }
}
#endregion
#region channel_order_id 支付成功时才返回
[JsonProperty(PropertyName = "channel_order_id")]
/// <summary>
/// 支付成功时才返回
/// <summary>
public string Channel_order_id
{
get { return channel_order_id; }
set { channel_order_id = value; }
}
#endregion
#region channel_datetime 支付成功时才返回
[JsonProperty(PropertyName = "channel_datetime")]
/// <summary>
/// 支付成功时才返回
/// <summary>
public string Channel_datetime
{
get { return channel_datetime; }
set { channel_datetime = value; }
}
#endregion
#region coupon 支付成功时才返回,单位(分)
[JsonProperty(PropertyName = "coupon")]
/// <summary>
/// 支付成功时才返回,单位(分)
/// <summary>
public string Coupon
{
get { return coupon; }
set { coupon = value; }
}
#endregion
#region settlement_amount 实际结算金额,支付成功时才返回,单位(分)
[JsonProperty(PropertyName = "settlement_amount")]
/// <summary>
/// 实际结算金额,支付成功时才返回,单位(分)
/// <summary>
public string Settlement_amount
{
get { return settlement_amount; }
set { settlement_amount = value; }
}
#endregion
#region discount_amount 订单优惠金额,支付成功时才返回,单位(分)
[JsonProperty(PropertyName = "discount_amount")]
/// <summary>
/// 订单优惠金额,支付成功时才返回,单位(分)
/// <summary>
public string Discount_amount
{
get { return discount_amount; }
set { discount_amount = value; }
}
#endregion
#region promotion_detail 优惠详情说明:微信官网
[JsonProperty(PropertyName = "promotion_detail")]
/// <summary>
/// 优惠详情说明:微信官网
/// <summary>
public string Promotion_detail
{
get { return promotion_detail; }
set { promotion_detail = value; }
}
#endregion
#region active_flag 活动标志。WXLZ微信绿洲ZFBLH支付宝蓝海
[JsonProperty(PropertyName = "active_flag")]
/// <summary>
/// 活动标志。WXLZ微信绿洲ZFBLH支付宝蓝海
/// <summary>
public string Active_flag
{
get { return active_flag; }
set { active_flag = value; }
}
#endregion
#region buyer_pay_amount 微信、支付宝此值有效
[JsonProperty(PropertyName = "buyer_pay_amount")]
/// <summary>
/// 微信、支付宝此值有效
/// <summary>
public string Buyer_pay_amount
{
get { return buyer_pay_amount; }
set { buyer_pay_amount = value; }
}
#endregion
}
}