plugin wx rename srv
This commit is contained in:
parent
362f38989c
commit
8e2fac56ba
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue