Skip to content

Commit 9f3535e

Browse files
committed
feat(payment): 修改签名参数错误时候抛错以及生成json参数
1 parent 3daad28 commit 9f3535e

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/payment/jssdk/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ func (comp *Client) BridgeConfig(prepayId string, isJson bool) (interface{}, err
4646
if err != nil {
4747
return nil, err
4848
}
49-
if isJson {
49+
if !isJson {
5050
return json.Marshal(options)
5151
} else {
5252
return options, nil

src/payment/kernel/baseClient.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55
"github.com/ArtisanCloud/go-libs/http/response"
66
"github.com/ArtisanCloud/go-libs/object"
77
"github.com/ArtisanCloud/power-wechat/src/kernel/support"
8-
98
http2 "net/http"
109
)
1110

@@ -81,6 +80,10 @@ func (client *BaseClient) Request(endpoint string, params *object.StringMap, met
8180
SignBody: signBody,
8281
})
8382

83+
if err != nil {
84+
return nil, err
85+
}
86+
8487
options = object.MergeHashMap(&object.HashMap{
8588
"headers": &object.HashMap{
8689
"Authorization": authorization,

0 commit comments

Comments
 (0)