AppPayModel.cs 1.0 KB

12345678910111213141516171819202122232425262728293031
  1. using System.ComponentModel.DataAnnotations;
  2. using PaySharp.Core.Utils;
  3. namespace PaySharp.Wechatpay.Domain
  4. {
  5. public class AppPayModel : BasePayModel
  6. {
  7. public AppPayModel()
  8. {
  9. TradeType = "APP";
  10. }
  11. /// <summary>
  12. /// 交易类型
  13. /// </summary>
  14. public string TradeType { get; private set; }
  15. /// <summary>
  16. /// 用户IP
  17. /// </summary>
  18. [Required(ErrorMessage = "请设置用户IP")]
  19. [StringLength(16, ErrorMessage = "用户IP最大长度为16位")]
  20. public string SpbillCreateIp { get; set; } = HttpUtil.RemoteIpAddress;
  21. /// <summary>
  22. /// 场景信息,该字段用于上报场景信息,目前支持上报实际门店信息。该字段为JSON对象数据,对象格式为{"store_info":{"id": "门店ID","name": "名称","area_code": "编码","address": "地址" }}
  23. /// </summary>
  24. [StringLength(256, ErrorMessage = "场景信息最大长度为256位")]
  25. public string SceneInfo { get; set; }
  26. }
  27. }