diff --git a/miniprogram/README.md b/miniprogram/README.md index f2a4ac6..925be2e 100644 --- a/miniprogram/README.md +++ b/miniprogram/README.md @@ -21,7 +21,7 @@ miniprogram.GetAnalysis().GetAnalysisDailyRetain() ``` ### 小程序虚拟支付 -#### `注意:需要传入 Appkey 的值` +#### `注意:需要传入 Appkey、OfferID 的值` 相关文档:[小程序虚拟支付](https://developers.weixin.qq.com/miniprogram/dev/platform-capabilities/industry/virtual-payment.html) ```go wc := wechat.NewWechat() @@ -29,6 +29,7 @@ miniprogram := wc.GetMiniProgram(&miniConfig.Config{ AppID: "xxx", AppSecret: "xxx", AppKey: "xxx", + OfferID: "xxx", Cache: cache.NewRedis(&redis.Options{ Addr: "", }), diff --git a/miniprogram/config/config.go b/miniprogram/config/config.go index 98ffaaa..39b8c69 100644 --- a/miniprogram/config/config.go +++ b/miniprogram/config/config.go @@ -10,5 +10,6 @@ type Config struct { AppID string `json:"app_id"` // appid AppSecret string `json:"app_secret"` // appSecret AppKey string `json:"app_key"` // appKey + OfferID string `json:"offer_id"` // offerId Cache cache.Cache }