This commit is contained in:
李子铭 2024-10-11 19:00:49 +08:00
parent 0896fecd85
commit 0e0116250a
2 changed files with 5 additions and 3 deletions

View File

@ -97,6 +97,8 @@ func notifyResp(in po.Notify, appKey string) (*proto.NotifyResponse, error) {
if len(parts) > 1 {
car.Number = parts[0]
car.Password = parts[1]
} else {
car.Password = s
}
b, _ := json.Marshal(car)
pb.Result.Extra = b

View File

@ -13,8 +13,8 @@ var zltx = &ZLTXCardService{}
func config() []byte {
c := &Config{
AppId: "23329",
AppKey: "8db16e8cc8363ed4eb4c14f9520bcc32",
AppId: "23369",
AppKey: "837c7a898810160ce5aab4c42bf22bc4",
BaseUri: "http://test.openapi.1688sup.cn",
NotifyUrl: "http://test.openapi.1688sup.cn",
}
@ -82,7 +82,7 @@ func TestNotify(t *testing.T) {
Config: config(),
Queries: nil,
Headers: nil,
Body: []byte(`{"merchantId":23329,"outTradeNo":"202410081741521448720005","status":"01","sign":"6AE0A09FA40CFE34280615DFA80C6E22"}`),
Body: []byte(`{"merchantId":23369,"outTradeNo":"202410111811015310010016","status":"01","cardCode":"2BFP3O53mSkWs3UzAlTMbg==","sign":"7EA395A982FD950296E4776369FA29B5"}`),
}
t.Run("TestNotify", func(t *testing.T) {
got, err := zltx.Notify(context.Background(), in)