Skip to content

Commit fa7417b

Browse files
author
Matrix-X
committed
feat(payment): add custom notify handler
1 parent eec5e5d commit fa7417b

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/payment/notify/custom_handler.go renamed to src/payment/notify/costom/handler.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
package notify
1+
package costom
22

33
import (
44
"bytes"
55
"encoding/json"
66
"errors"
77
"fmt"
8+
"github.com/ArtisanCloud/PowerWeChat/v3/src/payment/notify"
89
"io"
910
"net/http"
1011

@@ -57,10 +58,10 @@ func (handler *CustomHandler) RespondWith(attributes *object.StringMap, sign boo
5758
}
5859
func (handler *CustomHandler) ToResponse() (response *http.Response, err error) {
5960

60-
returnCode := SUCCESS
61+
returnCode := notify.SUCCESS
6162
returnMsg := "成功"
6263
if handler.fail != "" {
63-
returnCode = FAIL
64+
returnCode = notify.FAIL
6465
returnMsg = handler.fail
6566
err = errors.New(handler.fail)
6667
}

src/payment/notify/custom.go renamed to src/payment/notify/costom/notify.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package notify
1+
package costom
22

33
import (
44
"io"

0 commit comments

Comments
 (0)