调整AccessPlatformAPIWithRetry中的调试输出信息

+wxpayapi.CloseOrder
This commit is contained in:
gazebo
2019-12-20 09:46:27 +08:00
parent d95a14d314
commit 1c4ae2582e
4 changed files with 111 additions and 51 deletions

View File

@@ -36,8 +36,8 @@ func TestOrderQuery(t *testing.T) {
}
func TestCreateUnifiedOrder(t *testing.T) {
orderNo := "367609100BA711EAAA20186590E02977" // utils.GetUUID()
// t.Log(orderNo)
orderNo := utils.GetUUID()
t.Log(orderNo)
result, err := api.CreateUnifiedOrder(&CreateOrderParam{
Body: "这里一个测试商品",
NotifyURL: "http://callback.test.jxc4.com/wxpay/msg/",
@@ -52,6 +52,15 @@ func TestCreateUnifiedOrder(t *testing.T) {
t.Log(utils.Format4Output(result, false))
}
func TestCloseOrder(t *testing.T) {
orderNo := "5CA4BC5E22C611EA9AB9186590E02977" // utils.GetUUID()
// t.Log(orderNo)
err := api.CloseOrder(orderNo)
if err != nil {
t.Fatal(err)
}
}
func TestPayRefund(t *testing.T) {
result, err := api.PayRefund(&PayRefundParam{
TransactionID: "",