exit_kiosk.go 1.8 KB

123456789101112131415161718192021222324252627
  1. package config
  2. // ExitKiosk 是出口自助终端(扫码支付出场)的运行配置。
  3. type ExitKiosk struct {
  4. // Channel 默认支付渠道:mock(联调)或 wechat。
  5. Channel string `mapstructure:"channel" json:"channel" yaml:"channel"`
  6. // Token 非空时,出口屏接口必须携带 X-Kiosk-Token 请求头。
  7. Token string `mapstructure:"token" json:"token" yaml:"token"`
  8. // OrderTTLMinutes 订单未支付自动过期的时间,过期后屏幕重新计费。
  9. OrderTTLMinutes int `mapstructure:"order-ttl-minutes" json:"order-ttl-minutes" yaml:"order-ttl-minutes"`
  10. // QueryIntervalSeconds 页面轮询触发渠道查单的最小间隔(秒)。
  11. QueryIntervalSeconds int `mapstructure:"query-interval-seconds" json:"query-interval-seconds" yaml:"query-interval-seconds"`
  12. // JobIntervalSeconds 服务端兜底查单定时任务的间隔(秒)。
  13. JobIntervalSeconds int `mapstructure:"job-interval-seconds" json:"job-interval-seconds" yaml:"job-interval-seconds"`
  14. }
  15. // WechatPay 是微信支付 Native 下单的商户配置,凭据齐全时出口自助支付自动切换到真实渠道。
  16. type WechatPay struct {
  17. Enabled bool `mapstructure:"enabled" json:"enabled" yaml:"enabled"`
  18. AppID string `mapstructure:"app-id" json:"app-id" yaml:"app-id"`
  19. MchID string `mapstructure:"mch-id" json:"mch-id" yaml:"mch-id"`
  20. SerialNo string `mapstructure:"serial-no" json:"serial-no" yaml:"serial-no"`
  21. PrivateKeyPath string `mapstructure:"private-key-path" json:"private-key-path" yaml:"private-key-path"`
  22. APIV3Key string `mapstructure:"api-v3-key" json:"api-v3-key" yaml:"api-v3-key"`
  23. NotifyURL string `mapstructure:"notify-url" json:"notify-url" yaml:"notify-url"`
  24. Currency string `mapstructure:"currency" json:"currency" yaml:"currency"`
  25. }