当前仓库属于暂停状态,部分功能使用受限,详情请查阅 仓库状态说明
1 Star 0 Fork 98

flanche/微信Go SDK
暂停

forked from bozz/微信Go SDK
暂停
 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
wx_refund_test.go 600 Bytes
一键复制 编辑 原始数据 按行查看 历史
shallot 提交于 2019-08-19 18:25 .
package wechat
import (
"fmt"
"testing"
)
// 测试申请退款
func testRefund(t *testing.T, outTradeNo string, transactionId string) {
fmt.Println("----------申请退款----------")
outRefundNo := GetRandomString(32)
// 初始化参数
body := RefundBody{}
if transactionId != "" {
body.TransactionId = transactionId
}
body.OutTradeNo = outTradeNo
body.OutRefundNo = outRefundNo
body.TotalFee = 100 // 必须用100
body.RefundFee = 1
// 请求申请退款
wxRsp, err := testClient.Refund(body)
if err != nil {
t.Error(err)
return
}
fmt.Printf("返回值: %+v\n", wxRsp)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/flanche/wechat.git
git@gitee.com:flanche/wechat.git
flanche
wechat
微信Go SDK
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385