plugin wx rename srv

This commit is contained in:
李子铭 2024-07-16 11:49:39 +08:00
parent 362f38989c
commit 8e2fac56ba
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ import (
"github.com/wechatpay-apiv3/wechatpay-go/utils"
)
func apiSrv(ctx context.Context, config *Config) (*cashcoupons.CouponApiService, error) {
func getSrv(ctx context.Context, config *Config) (*cashcoupons.CouponApiService, error) {
mchPrivateKey, err := utils.LoadPrivateKeyWithPath(config.PrivateKeyPath)
if err != nil {
return nil, fmt.Errorf("load merchant private key error:%v", err)

View File

@ -21,7 +21,7 @@ func (p *WeiXinCpnService) Order(ctx context.Context, request *proto.OrderReques
if err != nil {
return nil, err
}
svc, err := apiSrv(ctx, config)
svc, err := getSrv(ctx, config)
if err != nil {
return nil, err
}
@ -41,7 +41,7 @@ func (p *WeiXinCpnService) Order(ctx context.Context, request *proto.OrderReques
func (p *WeiXinCpnService) Query(ctx context.Context, request *proto.QueryRequest) (*proto.QueryResponse, error) {
config, err := transConfig(request.Config)
svc, err := apiSrv(ctx, config)
svc, err := getSrv(ctx, config)
if err != nil {
return nil, err
}