7 Star 53 Fork 22

北京小程科技有限公司 / 支付宝

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
ap_trade_create_test.go 584 Bytes
一键复制 编辑 原始数据 按行查看 历史
shallot 提交于 2020-04-09 22:23 . 重新整理说明文档。
package alipay
import (
"fmt"
"testing"
)
func TestTradeCreate(t *testing.T) {
fmt.Println("----------统一收单交易创建接口----------")
// 初始化参数
body := TradeCreateBody{}
body.OutTradeNo = "GYWX201910311240354444"
body.SellerId = "2088102178986262"
body.TotalAmount = 2.00
body.Subject = "测试车场阿里支付-停车费"
body.BuyerId = "2088102179285843"
notifyUrl := "http://www.example.com"
// 请求支付
aliRsp, err := testClient.TradeCreate(body, notifyUrl)
if err != nil {
t.Error(err)
return
}
t.Logf("返回值: %+v\n", aliRsp)
}
Go
1
https://gitee.com/xiaochengtech/alipay.git
git@gitee.com:xiaochengtech/alipay.git
xiaochengtech
alipay
支付宝
master

搜索帮助