const.go 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. /*
  16. // PayURLUnifiedOrder pay 付款
  17. PayURLUnifiedOrder = `/pay/unifiedorder`
  18. // PayURLPayRefund pay refund 退款
  19. PayURLPayRefund = `/secapi/pay/refund`
  20. // PayURLPapPay 委托代扣申请扣款
  21. PayURLPapPay = `/pay/pappayapply`
  22. // PayURLPapayEntrust H5 纯签约
  23. PayURLPapayEntrust = `/papay/h5entrustweb`
  24. // PayTradeTypeJS JSAPI 公众号支付
  25. PayTradeTypeJS = `JSAPI`
  26. // PayTradeTypeNative NATIVE 扫码支付
  27. PayTradeTypeNative = `NATIVE`
  28. // PayTradeTypeAPP APP APP支付
  29. PayTradeTypeAPP = `APP`
  30. // */
  31. // MsgText text message
  32. MsgText = `text`
  33. // MsgImage image message
  34. MsgImage = `image`
  35. // MsgVoice voice message
  36. MsgVoice = `voice`
  37. // MsgVideo video message
  38. MsgVideo = `video`
  39. // MsgShortVideo shortvideo message
  40. MsgShortVideo = `shortvideo`
  41. // MsgLocation location message
  42. MsgLocation = `location`
  43. // MsgLink link message
  44. MsgLink = `link`
  45. // MsgNews news
  46. MsgNews = `news`
  47. // MsgMusic music
  48. MsgMusic = `music`
  49. // MsgEvent event
  50. MsgEvent = `event`
  51. // subscribe
  52. // subscribe 事件 EventKey 不为空的, 为扫描带参数二维码事件关注
  53. //
  54. // MsgEventSubscribe subscribe 订阅
  55. MsgEventSubscribe = `subscribe`
  56. // MsgEventUnSubscribe unsubscribe 取消订阅
  57. MsgEventUnSubscribe = `unsubscribe`
  58. // MsgEventSCAN 已关注用户扫码事件
  59. MsgEventSCAN = `SCAN`
  60. // MsgEventLOCATION 上报地理位置事件
  61. MsgEventLOCATION = `LOCATION`
  62. // MsgEventCLICK 自定义菜单点击事件
  63. MsgEventCLICK = `CLICK`
  64. // MsgEventVIEW 点击自定义菜单跳转链接时的事件
  65. MsgEventVIEW = `VIEW`
  66. // MsgEventTEMPLATESENDJOBFINISH 模版消息发送任务结果事件
  67. MsgEventTEMPLATESENDJOBFINISH = `TEMPLATESENDJOBFINISH`
  68. )
  69. // text/image/voice/video/shortvideo/location/link