微信支付CreateUnifiedOrder
微信API,入统一为struct,出统一用mxj再转struct
This commit is contained in:
@@ -29,3 +29,18 @@ func TestOrderQuery(t *testing.T) {
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestCreateUnifiedOrder(t *testing.T) {
|
||||
result, err := api.CreateUnifiedOrder(&CreateOrderParam{
|
||||
Body: "这里一个测试商品",
|
||||
NotifyURL: "http://callback.test.jxc4.com/wxpay/msg/",
|
||||
OutTradeNo: utils.GetUUID(),
|
||||
SpbillCreateIP: "114.114.114.114",
|
||||
TradeType: TradeTypeNative,
|
||||
TotalFee: 1,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user