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.

276 lines
7.5 KiB
C#

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Newtonsoft.Json;
namespace POSV.Card
{
/// <summary>
/// 统一收单支付
/// </summary>
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class CardTradePayRequest
{
/// <summary>
/// 交易参考号
/// </summary>
[JsonProperty(PropertyName = "tradeVoucherNo")]
public string TradeVoucherNo { get; set; }
/// <summary>
/// 商户订单号
/// </summary>
[JsonProperty(PropertyName = "tradeNo")]
public string TradeNo { get; set; }
/// <summary>
/// 会员编号
/// </summary>
[JsonProperty(PropertyName = "memberId")]
public string MemberId { get; set; }
/// <summary>
/// 会员手机号(会员编号和会员手机号可以确定会员身份,如果无法确定会员身份,不会享受积分权利)
/// </summary>
[JsonProperty(PropertyName = "mobile")]
public string Mobile { get; set; }
/// <summary>
/// 订单总金额(精确到分)
/// </summary>
[JsonProperty(PropertyName = "totalAmount")]
public int TotalAmount { get; set; }
/// <summary>
/// 实收总金额(精确到分)
/// </summary>
[JsonProperty(PropertyName = "realAmount")]
public int RealAmount { get; set; }
/// <summary>
/// 刷卡金额(精确到分)
/// </summary>
[JsonProperty(PropertyName = "payCardAmount")]
public int PayCardAmount { get; set; }
/// <summary>
/// 优惠总金额(精确到分)
/// </summary>
[JsonProperty(PropertyName = "discountAmount")]
public int DiscountAmount { get; set; }
/// <summary>
/// 优惠券总金额(精确到分)
/// </summary>
[JsonProperty(PropertyName = "couponTotalAmount")]
public int CouponTotalAmount { get; set; }
/// <summary>
/// 参与积分运算总金额(精确到分)
/// </summary>
[JsonProperty(PropertyName = "pointAmount")]
public int PointAmount { get; set; }
/// <summary>
/// 前台是否积分(0-不积分 ;1-以请求积分值为准;2-在请求积分值的基础上,累加积分)
/// </summary>
[JsonProperty(PropertyName = "pointFlag")]
public int PointFlag { get; set; }
/// <summary>
/// 积分值(精确到分)
/// </summary>
[JsonProperty(PropertyName = "pointValue")]
public int PointValue { get; set; }
/// <summary>
/// 卡支付明细(参数值为JSON字符串,如果刷卡金额大于0此项必填)
/// </summary>
[JsonProperty(PropertyName = "cardPayInfo")]
public List<PayInfo> PayInfo { get; set; }
/// <summary>
/// 支付方式明细(参数值为JSON字符串)
/// </summary>
[JsonProperty(PropertyName = "pays")]
public List<Pay> Pay { get; set; }
/// <summary>
/// 优惠券明细(参数值为JSON字符串)
/// </summary>
[JsonProperty(PropertyName = "coupons")]
public List<Coupon> Coupon { get; set; }
/// <summary>
/// 门店编号
/// </summary>
[JsonProperty(PropertyName = "shopNo")]
public string ShopNo { get; set; }
/// <summary>
/// 终端编号
/// </summary>
[JsonProperty(PropertyName = "posNo")]
public string PosNo { get; set; }
/// <summary>
/// 员工编号
/// </summary>
[JsonProperty(PropertyName = "workerNo")]
public string WorkerNo { get; set; }
/// <summary>
/// 终端标识(web、pos、wechat)
/// </summary>
[JsonProperty(PropertyName = "sourceSign")]
public string SourceSign { get; set; } = "x86";
}
/// <summary>
/// 卡支付明细
/// </summary>
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class PayInfo
{
/// <summary>
/// 预支付编码
/// </summary>
[JsonProperty(PropertyName = "prepayment")]
public string PrePayment { get; set; }
/// <summary>
/// 卡号
/// </summary>
[JsonProperty(PropertyName = "cardNo")]
public string CardNo { get; set; }
/// <summary>
/// 刷卡金额(精确到分)
/// </summary>
[JsonProperty(PropertyName = "amount")]
public int Amount { get; set; }
/// <summary>
/// 是否免密支付(0-否 1-是)
/// </summary>
[JsonProperty(PropertyName = "isNoPwd")]
public int IsNoPwd { get; set; }
/// <summary>
/// 密码
/// </summary>
[JsonProperty(PropertyName = "passwd")]
public string Passwd { get; set; }
}
/// <summary>
/// 优惠券明细(参数值为JSON字符串)
/// </summary>
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class Coupon
{
/// <summary>
/// 优惠券ID
/// </summary>
[JsonProperty(PropertyName = "couponId")]
public string CouponId { get; set; }
/// <summary>
/// 优惠券类型
/// </summary>
[JsonProperty(PropertyName = "couponType")]
public string CouponType { get; set; }
/// <summary>
/// 优惠券标题
/// </summary>
[JsonProperty(PropertyName = "title")]
public string Title { get; set; }
/// <summary>
/// 优惠券号码
/// </summary>
[JsonProperty(PropertyName = "code")]
public string Code { get; set; }
/// <summary>
/// 折扣值
/// </summary>
[JsonProperty(PropertyName = "discount")]
public string Discount { get; set; }
/// <summary>
/// 抵扣金额(精确到元)
/// </summary>
[JsonProperty(PropertyName = "cash")]
public string Cash { get; set; }
/// <summary>
/// 礼品描述
/// </summary>
[JsonProperty(PropertyName = "gift")]
public string Gift { get; set; }
/// <summary>
/// 备注描述
/// </summary>
[JsonProperty(PropertyName = "memo")]
public string Memo { get; set; }
}
/// <summary>
/// 支付方式明细
/// </summary>
[Serializable]
[JsonObject(MemberSerialization.OptIn)]
public class Pay
{
/// <summary>
/// 支付方式编码
/// </summary>
[JsonProperty(PropertyName = "payTypeNo")]
public string PayTypeNo { get; set; }
/// <summary>
/// 支付方式名称
/// </summary>
[JsonProperty(PropertyName = "payType")]
public string PayType { get; set; }
/// <summary>
/// 支付金额(精确到分)
/// </summary>
[JsonProperty(PropertyName = "money")]
public int Money { get; set; }
/// <summary>
/// 支付卡号
/// </summary>
[JsonProperty(PropertyName = "cardNo")]
public string CardNo { get; set; }
/// <summary>
/// 积分规则
/// </summary>
[JsonProperty(PropertyName = "pointRule")]
public string PointRule { get; set; }
/// <summary>
/// 积分值(精确到分)
/// </summary>
[JsonProperty(PropertyName = "point")]
public int Point { get; set; }
}
}