补充微信支付官方手机端接口支持

This commit is contained in:
2026-03-11 13:08:15 +08:00
parent 7fe415de63
commit 3dc9bc5b1d
3 changed files with 22 additions and 90 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/wechatpay-apiv3/wechatpay-go/core/auth/verifiers"
"github.com/wechatpay-apiv3/wechatpay-go/core/notify"
"github.com/wechatpay-apiv3/wechatpay-go/core/option"
"github.com/wechatpay-apiv3/wechatpay-go/services/partnerpayments/h5"
"github.com/wechatpay-apiv3/wechatpay-go/services/payments/native"
"github.com/wechatpay-apiv3/wechatpay-go/utils"
)
@@ -18,6 +19,7 @@ var WechatPay *WechatPayClient
type WechatPayClient struct {
Native *native.NativeApiService
H5 *h5.H5ApiService
Notify *notify.Handler
}
@@ -71,6 +73,7 @@ func initWechatPay() error {
// 创建 WechatPay 服务
WechatPay = &WechatPayClient{
Native: &native.NativeApiService{Client: client},
H5: &h5.H5ApiService{Client: client},
Notify: handler,
}
return nil