const.go 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. package wechat
  2. const (
  3. // TokenExpires token expires time 1 hours
  4. TokenExpires = 60 * 60
  5. // BaseURL api host
  6. BaseURL = `https://api.weixin.qq.com`
  7. // OpenURL open host
  8. OpenURL = `https://open.weixin.qq.com`
  9. // PayHost pay base host
  10. PayHost = `https://api.mch.weixin.qq.com`
  11. // ErrReqOk request ok
  12. ErrReqOk = 0
  13. /*
  14. // PayURLUnifiedOrder pay 付款
  15. PayURLUnifiedOrder = `/pay/unifiedorder`
  16. // PayURLPayRefund pay refund 退款
  17. PayURLPayRefund = `/secapi/pay/refund`
  18. // PayURLPapPay 委托代扣申请扣款
  19. PayURLPapPay = `/pay/pappayapply`
  20. // PayURLPapayEntrust H5 纯签约
  21. PayURLPapayEntrust = `/papay/h5entrustweb`
  22. // PayTradeTypeJS JSAPI 公众号支付
  23. PayTradeTypeJS = `JSAPI`
  24. // PayTradeTypeNative NATIVE 扫码支付
  25. PayTradeTypeNative = `NATIVE`
  26. // PayTradeTypeAPP APP APP支付
  27. PayTradeTypeAPP = `APP`
  28. // */
  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. )
  48. // text/image/voice/video/shortvideo/location/link