aa
This commit is contained in:
47
platformapi/alipayapi/pay_test.go
Normal file
47
platformapi/alipayapi/pay_test.go
Normal file
@@ -0,0 +1,47 @@
|
||||
package alipayapi
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"testing"
|
||||
)
|
||||
|
||||
func TestCreatePay(t *testing.T) {
|
||||
result, err := api.CreatePay(&CreatePayParam{
|
||||
OutTradeNo: utils.GetUUID(),
|
||||
TotalAmount: 0.01,
|
||||
Subject: "测试订单",
|
||||
StoreID: "100000",
|
||||
BuyerID: "2088912877320980",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestCreatePay2(t *testing.T) {
|
||||
result, err := api.CreatePay2(&CreatePayParam2{
|
||||
OutTradeNo: "21175111420002544",
|
||||
TotalAmount: 0.01,
|
||||
Subject: "xxx店",
|
||||
StoreID: "100000",
|
||||
QuitURL: "http://www.jxc4.com",
|
||||
ProductCode: "QUICK_WAP_WAY",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestCreatePay3(t *testing.T) {
|
||||
result, err := api.CreatePay3(&CreatePayParam3{
|
||||
TotalAmount: 0.01,
|
||||
StoreID: "2021072600077000000025212127",
|
||||
OutTradeNo: utils.GetUUID(),
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
Reference in New Issue
Block a user