using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Furion; namespace Yi.Framework.Module.WeChat.Model { /// /// 接收的结果 /// public class PayNoticeReponse { /// /// 通知的唯一ID /// public string id { get; set; } /// /// 通知的资源数据类型,支付成功通知为encrypt-resource /// public string create_time { get; set; } /// /// 通知的资源数据类型,支付成功通知为encrypt-resource /// public string event_type { get; set; } /// /// 通知的资源数据类型,支付成功通知为encrypt-resource /// public string resource_type { get; set; } /// /// 回调摘要 /// public string summary { get; set; } /// /// 数据 /// public Resource resource { get; set; } } /// /// 通知的数据 /// public class Resource { /// /// 加密算法类型:AEAD_AES_256_GCM /// public string algorithm { get; set; } /// /// 数据密文 /// public string ciphertext { get; set; } /// /// 附加数据 /// public string associated_data { get; set; } /// /// 原始回调类型,为transaction /// public string original_type { get; set; } /// /// 随机串 /// public string nonce { get; set; } } /// /// 解密出来的结果 /// public class PayNoticeResult { /// /// 微信支付系统生成的订单号。 /// public string transaction_id { get; set; } /// /// 订单金额信息 /// public Amount amount { get; set; } /// /// 商户号 /// public string mchid { get; set; } /// /* 交易状态,枚举值: SUCCESS:支付成功 REFUND:转入退款 NOTPAY:未支付 CLOSED:已关闭 REVOKED:已撤销(付款码支付) USERPAYING:用户支付中(付款码支付) PAYERROR:支付失败(其他原因,如银行返回失败) */ /// public string trade_state { get; set; } /// /// 银行类型,采用字符串类型的银行标识。 /// public string bank_type { get; set; } /// /// 优惠功能,享受优惠时返回该字段 /// public List promotion_detail { get; set; } /// /// 支付完成时间 /// public string success_time { get; set; } /// /// 支付者信息 /// public Payer payer { get; set; } /// /// 商户系统内部订单号,只能是数字、大小写字母_-*且在同一个商户号下唯一。 /// 特殊规则:最小字符长度为6 /// public string out_trade_no { get; set; } /// /// 应用ID /// public string appid { get; set; } /// /// 交易状态描述 /// public string trade_state_desc { get; set; } /// /* 交易类型,枚举值: JSAPI:公众号支付 NATIVE:扫码支付 APP:APP支付 MICROPAY:付款码支付 MWEB:H5支付 FACEPAY:刷脸支付 */ /// public string trade_type { get; set; } /// /* * 银行类型,采用字符串类型的银行标识。 */ /// public string attach { get; set; } /// /// 支付场景信息描述 /// public SceneInfo scene_info { get; set; } } public class Amount { /// /// 用户支付金额,单位为分。 /// public int payer_total { get; set; } /// /// 订单总金额,单位为分。 /// public int total { get; set; } /// /// CNY:人民币,境内商户号仅支持人民币。 /// public string currency { get; set; } /// /// 用户支付币种 /// public string payer_currency { get; set; } } public class GoodsDetail { /// /// 商品备注 /// public string goods_remark { get; set; } /// /// 商品编码 /// public int quantity { get; set; } /// /// 商品优惠金额 /// public int discount_amount { get; set; } /// /// 商品编码 /// public string goods_id { get; set; } /// /// 商品单价 /// public int unit_price { get; set; } } public class PromotionDetail { /// /// 单品列表 /// public int amount { get; set; } /// /// 微信出资 /// public int wechatpay_contribute { get; set; } /// /// 券ID /// public string coupon_id { get; set; } public string scope { get; set; } public int merchant_contribute { get; set; } /// /// 优惠名称 /// public string name { get; set; } /// /// 其他出资 /// public int other_contribute { get; set; } /// /// currency /// public string currency { get; set; } /// /// 活动ID /// public string stock_id { get; set; } /// /// 单品列表 /// public List goods_detail { get; set; } } public class Payer { /// /// 用户标识 /// public string openid { get; set; } } public class SceneInfo { /// /// 商户端设备号 /// public string device_id { get; set; } } }