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