This commit is contained in:
邹宗楠
2023-05-19 17:21:17 +08:00
parent d6ea1e8bd7
commit 0c024e20e0
5 changed files with 71 additions and 66 deletions

View File

@@ -72,20 +72,20 @@ func TestCreateToken(t *testing.T) {
// 快手预下单获取支付参数
func TestPreCreateOrder(t *testing.T) {
param := &PreCreateOrderReq{
OutOrderNo: "1024028220",
OpenId: "f198f59711c9785314bf5724f7ab9f47",
TotalAmount: 1,
Subject: "这是一个测试商品",
Detail: "大白菜,小白菜,中白菜",
TypeDetail: 1832, // 素菜
ExpireTime: 10 * 60,
Sign: "",
Attach: "1111",
NotifyUrl: "https://callback.jxc4.com/tictoc/tiktokMsg",
GoodsId: "1122",
GoodsDetailUrl: "/page/index/anima",
MultiCopiesGoodsInfo: "[{\"copies\":2}]",
CancelOrder: 0,
OutOrderNo: "88422209072664",
OpenId: "f198f59711c9785314bf5724f7ab9f47",
TotalAmount: 501,
Subject: "蔬菜水果日用品",
Detail: "收藏门店 赠送随机小惊喜一份1g/个 x 1件商品",
TypeDetail: 1832, // 素菜
ExpireTime: 10 * 60,
Sign: "",
//Attach: "22",
NotifyUrl: "https://callback-jxgy.jxc4.com/kuaishou/kuaiShouCallback",
//GoodsId: "1122",
//GoodsDetailUrl: "/page/index/anima",
//MultiCopiesGoodsInfo: `[{"copies":2}]`,
CancelOrder: 1,
}
data, err := api.PreCreateOrder(param)
globals.SugarLogger.Debugf("data := %s", utils.Format4Output(data, false))