const.go 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. package wechat
  2. const (
  3. // TokenExpires token expires time 1 hours
  4. TokenExpires = 90 * 60
  5. // TicketExpires ticket expires time 1 hours
  6. TicketExpires = 60 * 60
  7. // BaseURL api host
  8. BaseURL = `https://api.weixin.qq.com`
  9. // OpenURL open host
  10. OpenURL = `https://open.weixin.qq.com`
  11. // PayHost pay base host
  12. PayHost = `https://api.mch.weixin.qq.com`
  13. // ErrReqOk request ok
  14. ErrReqOk = 0
  15. // PayURLUnifiedOrder pay 付款
  16. PayURLUnifiedOrder = `/pay/unifiedorder`
  17. // PayURLPayRefund pay refund 退款
  18. PayURLPayRefund = `/secapi/pay/refund`
  19. // PayURLPapPay 委托代扣申请扣款
  20. PayURLPapPay = `/pay/pappayapply`
  21. // PayURLPapayEntrust H5 纯签约
  22. PayURLPapayEntrust = `/papay/h5entrustweb`
  23. // PayTradeTypeJS JSAPI 公众号支付
  24. PayTradeTypeJS = `JSAPI`
  25. // PayTradeTypeNative NATIVE 扫码支付
  26. PayTradeTypeNative = `NATIVE`
  27. // PayTradeTypeAPP APP APP支付
  28. PayTradeTypeAPP = `APP`
  29. // MsgText text message
  30. MsgText = `text`
  31. // MsgImage image message
  32. MsgImage = `image`
  33. // MsgVoice voice message
  34. MsgVoice = `voice`
  35. // MsgVideo video message
  36. MsgVideo = `video`
  37. // MsgShortVideo shortvideo message
  38. MsgShortVideo = `shortvideo`
  39. // MsgLocation location message
  40. MsgLocation = `location`
  41. // MsgLink link message
  42. MsgLink = `link`
  43. // MsgNews news
  44. MsgNews = `news`
  45. // MsgMusic music
  46. MsgMusic = `music`
  47. // MsgEvent event
  48. MsgEvent = `event`
  49. // subscribe
  50. // subscribe 事件 EventKey 不为空的, 为扫描带参数二维码事件关注
  51. //
  52. // MsgEventSubscribe subscribe 订阅
  53. MsgEventSubscribe = `subscribe`
  54. // MsgEventUnSubscribe unsubscribe 取消订阅
  55. MsgEventUnSubscribe = `unsubscribe`
  56. // MsgEventSCAN 已关注用户扫码事件
  57. MsgEventSCAN = `SCAN`
  58. // MsgEventLOCATION 上报地理位置事件
  59. MsgEventLOCATION = `LOCATION`
  60. // MsgEventCLICK 自定义菜单点击事件
  61. MsgEventCLICK = `CLICK`
  62. // MsgEventVIEW 点击自定义菜单跳转链接时的事件
  63. MsgEventVIEW = `VIEW`
  64. // MsgEventTEMPLATESENDJOBFINISH 模版消息发送任务结果事件
  65. MsgEventTEMPLATESENDJOBFINISH = `TEMPLATESENDJOBFINISH`
  66. )
  67. // text/image/voice/video/shortvideo/location/link