From ff13bb40776cc70fe1bb2dae0d1d0e1a79d0ceed Mon Sep 17 00:00:00 2001 From: Jerry Date: Mon, 18 Feb 2019 18:34:58 +0800 Subject: [PATCH] fix --- wechat_client_test.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wechat_client_test.go b/wechat_client_test.go index 52060bcd..eda4ed7d 100644 --- a/wechat_client_test.go +++ b/wechat_client_test.go @@ -59,7 +59,7 @@ func TestWeChatClient_QueryOrder(t *testing.T) { //初始化参数结构体 body := make(BodyMap) - body.Set("out_trade_no", "MfZC2segKxh0bnJSELbvKNeH3d9oWvvQ") + body.Set("out_trade_no", "GYWX201901301040355706100401") body.Set("nonce_str", GetRandomString(32)) body.Set("sign_type", SignType_MD5) @@ -103,17 +103,17 @@ func TestWeChatClient_Refund(t *testing.T) { //初始化参数结构体 body := make(BodyMap) - body.Set("out_trade_no", "MfZC2segKxh0bnJSELbvKNeH3d9oWvvQ") + body.Set("out_trade_no", "GYWX201808300559489073925369") body.Set("nonce_str", GetRandomString(32)) body.Set("sign_type", SignType_MD5) s := GetRandomString(64) fmt.Println("s:", s) body.Set("out_refund_no", s) - body.Set("total_fee", 101) - body.Set("refund_fee", 101) + body.Set("total_fee", 18) + body.Set("refund_fee", 18) //请求申请退款,沙箱环境下,证书路径参数可传空 - wxRsp, err := client.Refund(body, "", "", "") + wxRsp, err := client.Refund(body, "cert/apiclient_cert.pem", "cert/apiclient_key.pem", "cert/apiclient_cert.p12") if err != nil { fmt.Println("Error:", err) }