Skip to content

Commit

Permalink
fix: 修复payment/jssdk中的isJson参数问题
Browse files Browse the repository at this point in the history
【影响范围】微信支付的wxPayConfig

【代码走查】Matrix-X
  • Loading branch information
zhanghaoxm committed Jul 11, 2023
1 parent b44cb5b commit a65dc13
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/payment/jssdk/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@ import (
"crypto/sha1"
"encoding/json"
"fmt"
"github.com/ArtisanCloud/PowerLibs/v3/object"
"github.com/ArtisanCloud/PowerWeChat/v3/src/basicService/jssdk"
kernel2 "github.com/ArtisanCloud/PowerWeChat/v3/src/kernel"
"net/http"
"net/url"
"time"

"github.com/ArtisanCloud/PowerLibs/v3/object"
"github.com/ArtisanCloud/PowerWeChat/v3/src/basicService/jssdk"
kernel2 "github.com/ArtisanCloud/PowerWeChat/v3/src/kernel"
)

type Client struct {
Expand Down Expand Up @@ -49,7 +50,7 @@ func (comp *Client) BridgeConfigForPartner(ctx context.Context, prepayID string,
if err != nil {
return nil, err
}
if !isJson {
if isJson {
return json.Marshal(options)
} else {
return options, nil
Expand Down Expand Up @@ -81,7 +82,7 @@ func (comp *Client) BridgeConfig(prepayID string, isJson bool) (interface{}, err
if err != nil {
return nil, err
}
if !isJson {
if isJson {
return json.Marshal(options)
} else {
return options, nil
Expand Down

0 comments on commit a65dc13

Please sign in to comment.