代码拉取完成,页面将自动刷新
同步操作将从 bozz/微信Go SDK 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
package wechat
import (
"fmt"
"os"
"testing"
)
var (
testAppId = os.Getenv("AppID")
testSubAppId = os.Getenv("SubAppID")
testMchId = os.Getenv("MchID")
testSubMchId = os.Getenv("SubMchID")
testApiKey = os.Getenv("ApiKey")
testCertPath = os.Getenv("CertFilepath")
)
var testClient = NewClient(true, false, ServiceTypeFacilitatorDomestic, testApiKey, testCertPath, Config{
AppId: testAppId,
SubAppId: testSubAppId,
MchId: testMchId,
SubMchId: testSubMchId,
})
func TestAll(t *testing.T) {
fmt.Println("ApiKey", testApiKey)
fmt.Println("CertFile", testCertPath)
fmt.Println("AppId", testAppId)
fmt.Println("MchId", testMchId)
if testClient.isFacilitator() {
fmt.Println("SubAppId", testSubAppId)
fmt.Println("SubMchId", testSubMchId)
}
var (
outTradeNo string
transactionId string
)
// 付款码支付-撤销
transactionId, outTradeNo = testMicropay(t)
testQueryOrder(t, outTradeNo)
testReverse(t, outTradeNo)
// 付款码支付-关闭
transactionId, outTradeNo = testMicropay(t)
testQueryOrder(t, outTradeNo)
testCloseOrder(t, outTradeNo)
// 付款码支付-退款
transactionId, outTradeNo = testMicropay(t)
testQueryOrder(t, outTradeNo)
testRefund(t, outTradeNo, transactionId)
testQueryRefund(t, outTradeNo)
// 统一下单支付-撤销
outTradeNo = testUnifiedOrder(t)
testQueryOrder(t, outTradeNo)
testReverse(t, outTradeNo)
// 统一下单支付-关闭
outTradeNo = testUnifiedOrder(t)
testQueryOrder(t, outTradeNo)
testCloseOrder(t, outTradeNo)
// 统一下单支付-退款
outTradeNo = testUnifiedOrder(t)
testQueryOrder(t, outTradeNo)
testRefund(t, outTradeNo, "")
testQueryRefund(t, outTradeNo)
// 单一接口测试
testDownloadBill(t)
testReportMicropay(t)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。