test
This commit is contained in:
parent
c9c91d9146
commit
e0985d04af
|
@ -22,7 +22,6 @@ func (c *Card) Order(ctx context.Context, request *Order) (*OrderResp, error) {
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fmt.Println("result:", string(result))
|
||||
var response *OrderResp
|
||||
if err = json.Unmarshal(result, &response); err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -10,11 +10,14 @@ import (
|
|||
)
|
||||
|
||||
func TestCardOrder(t *testing.T) {
|
||||
server, err := core.NewDctWServer(&core.DctWConfig{
|
||||
AppId: "1",
|
||||
AppKey: "1e2bf7a04b8b1e6be5dc78d04e8639c9",
|
||||
BaseUri: "http://test.openapi.1688sup.cn",
|
||||
})
|
||||
server, err := core.NewDctWServer(
|
||||
&core.DctWConfig{
|
||||
AppId: "1",
|
||||
AppKey: "1e2bf7a04b8b1e6be5dc78d04e8639c9",
|
||||
BaseUri: "http://test.openapi.1688sup.cn",
|
||||
},
|
||||
core.WithDebug(true),
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
|
@ -3,7 +3,6 @@ package direct
|
|||
import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"gitea.cdlsxd.cn/sdk/plugin/dctw/v1/api"
|
||||
"gitea.cdlsxd.cn/sdk/plugin/dctw/v1/core"
|
||||
"io/ioutil"
|
||||
|
@ -22,7 +21,6 @@ func (c *Direct) Order(ctx context.Context, request *Order) (*OrderResp, error)
|
|||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
fmt.Printf("result: %s\n", string(result))
|
||||
var response *OrderResp
|
||||
if err = json.Unmarshal(result, &response); err != nil {
|
||||
return nil, err
|
||||
|
|
|
@ -11,11 +11,14 @@ import (
|
|||
)
|
||||
|
||||
func TestDirect_Order(t *testing.T) {
|
||||
server, err := core.NewDctWServer(&core.DctWConfig{
|
||||
AppId: "1",
|
||||
AppKey: "1e2bf7a04b8b1e6be5dc78d04e8639c9",
|
||||
BaseUri: "http://test.openapi.1688sup.cn",
|
||||
})
|
||||
server, err := core.NewDctWServer(
|
||||
&core.DctWConfig{
|
||||
AppId: "1",
|
||||
AppKey: "1e2bf7a04b8b1e6be5dc78d04e8639c9",
|
||||
BaseUri: "http://test.openapi.1688sup.cn",
|
||||
},
|
||||
core.WithDebug(true),
|
||||
)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue