饿先达扒网页接口,微信支付新增接口
This commit is contained in:
@@ -44,7 +44,7 @@ func TestCreateUnifiedOrder(t *testing.T) {
|
||||
OutTradeNo: orderNo,
|
||||
SpbillCreateIP: "114.114.114.114",
|
||||
TradeType: TradeTypeNative,
|
||||
TotalFee: 10,
|
||||
TotalFee: 20,
|
||||
ProfitSharing: OptYes,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -105,8 +105,8 @@ func TestXml2Json(t *testing.T) {
|
||||
|
||||
func TestMultiProfitSharing(t *testing.T) {
|
||||
result, err := api.MultiProfitSharing(&MultiProfitSharingParam{
|
||||
TransactionID: "4200000519202002065628033681",
|
||||
OutOrderNo: "1895BA2948A411EA88B97824AF852DFE",
|
||||
TransactionID: "4200000506202002122465150534",
|
||||
OutOrderNo: "A18546A84D6111EA8D8A7824AF852DFE",
|
||||
Receivers: `[{"type":"PERSONAL_OPENID","account":"ojWb10ND2JBY_hOic5phWQNChWC0","amount":1,"description":"分到个人"}]`,
|
||||
})
|
||||
if err != nil {
|
||||
@@ -115,14 +115,25 @@ func TestMultiProfitSharing(t *testing.T) {
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestFinishProfitSharing(t *testing.T) {
|
||||
result, err := api.FinishProfitSharing(&FinishProfitSharingParam{
|
||||
TransactionID: "4200000506202002122465150534",
|
||||
OutOrderNo: "A18546A84D6111EA8D8A7824AF852DFE",
|
||||
Description: "测试",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestTransfers(t *testing.T) {
|
||||
orderNo := utils.GetUUID()
|
||||
result, err := api.Transfers(&TransfersParam{
|
||||
PartnerTradeNo: orderNo,
|
||||
OpenID: "ojWb10ND2JBY_hOic5phWQNChWC0",
|
||||
CheckName: "FORCE_CHECK",
|
||||
ReUserName: "苏尹岚",
|
||||
Amount: 10,
|
||||
OpenID: "ojWb10M_8kV8NT0aZJa6A5umG1c8",
|
||||
CheckName: "NO_CHECK",
|
||||
Amount: 100,
|
||||
Desc: "测试",
|
||||
SpbillCreateIP: "114.114.114.114",
|
||||
})
|
||||
@@ -158,3 +169,19 @@ func TestDeleteProfitSharingReceiver(t *testing.T) {
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestReturnProfitSharing(t *testing.T) {
|
||||
orderNo := utils.GetUUID()
|
||||
result, err := api.ReturnProfitSharing(&ReturnProfitSharingParam{
|
||||
OutOrderNo: "A18546A84D6111EA8D8A7824AF852DFE",
|
||||
OutReturnNo: orderNo,
|
||||
ReturnAccountType: "MERCHANT_ID",
|
||||
ReturnAccount: "1390686702",
|
||||
ReturnAmount: 1000,
|
||||
Description: "测试",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user