TestZc_DctWServer

This commit is contained in:
李子铭 2024-11-15 13:47:51 +08:00
parent 990030fff3
commit 1b3162df5d
3 changed files with 9 additions and 9 deletions

View File

@ -29,7 +29,7 @@ func TestCard_Order(t *testing.T) {
OutTradeNo: "test_card_zltx_1",
ProductId: "222",
Mobile: "18666666666",
NotifyUrl: "http://test.openapi.1688sup.cn",
NotifyUrl: "https://gateway.dev.cdlsxd.cn/yxh5api/v1/order/direct/notify",
Version: "1.0",
}
resp, err := a.Order(context.Background(), req)
@ -90,7 +90,7 @@ func TestCard_Notify(t *testing.T) {
headers.Set("Content-Type", core.ApplicationJSON)
var httpRequest = &http.Request{
Header: http.Header{},
Header: headers,
Body: ioutil.NopCloser(bytes.NewBuffer(body)),
}
resp, err := a.Notify(context.Background(), httpRequest)

View File

@ -25,12 +25,12 @@ func TestDirect_Order(t *testing.T) {
a := &Direct{DctWServer: server}
req := &Order{
Number: 1,
MerchantId: "23329",
OutTradeNo: "test_direct_zltx_7",
ProductId: "106",
MerchantId: "25537",
OutTradeNo: "test_zltx_direct_1",
ProductId: "101",
AccountType: 1,
RechargeAccount: "18666666666",
NotifyUrl: "http://test.openapi.1688sup.cn",
NotifyUrl: "https://gateway.dev.cdlsxd.cn/yxh5api/v1/order/direct/notify",
Version: "1.0",
}
resp, err := a.Order(context.Background(), req)
@ -57,7 +57,7 @@ func TestDirect_Query(t *testing.T) {
a := &Direct{DctWServer: server}
req := &Query{
MerchantId: "23329",
OutTradeNo: "test_direct_zltx_7",
OutTradeNo: "test_zltx__direct_1",
Version: "1.0",
}
resp, err := a.Query(context.Background(), req)
@ -91,7 +91,7 @@ func TestDirect_Notify(t *testing.T) {
headers.Set("Content-Type", core.ApplicationJSON)
var httpRequest = &http.Request{
Header: http.Header{},
Header: headers,
Body: ioutil.NopCloser(bytes.NewBuffer(body)),
}
resp, err := a.Notify(context.Background(), httpRequest)

View File

@ -14,7 +14,7 @@ import (
const (
DeBug = true
SignType = "md5"
SignType = "MD5"
SignKeyName = "Authorization"
ApplicationJSON = "application/json"
)