const.go 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. )
  50. // text/image/voice/video/shortvideo/location/link