微信分账接口
This commit is contained in:
@@ -44,7 +44,7 @@ func TestCreateUnifiedOrder(t *testing.T) {
|
||||
OutTradeNo: orderNo,
|
||||
SpbillCreateIP: "114.114.114.114",
|
||||
TradeType: TradeTypeNative,
|
||||
TotalFee: 1,
|
||||
TotalFee: 2,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -101,3 +101,47 @@ func TestXml2Json(t *testing.T) {
|
||||
}
|
||||
t.Log(utils.Format4Output(mv, false))
|
||||
}
|
||||
|
||||
func TestMultiProfitSharing(t *testing.T) {
|
||||
result, err := api.MultiProfitSharing(&MultiProfitSharing{
|
||||
TransactionID: "4200000508202002040201497455",
|
||||
OutOrderNo: "6E74BA38472F11EA8BB87824AF852DFE",
|
||||
Receivers: `[{"type":"PERSONAL_WECHATID","account":"wxid_r93tvy06srbp22","amount":10,"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(&Transfers{
|
||||
PartnerTradeNo: orderNo,
|
||||
OpenID: "oylsKxEeRKJSdo1OE2aA1fRloaN4",
|
||||
CheckName: "FORCE_CHECK",
|
||||
ReUserName: "苏尹岚",
|
||||
Amount: 100,
|
||||
Desc: "测试",
|
||||
SpbillCreateIP: "114.114.114.114",
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
func TestAddProfitSharingReceiver(t *testing.T) {
|
||||
result, err := api.AddProfitSharingReceiver(&AddProfitSharingReceiver{
|
||||
Receiver: `{
|
||||
"type": "PERSONAL_WECHATID",
|
||||
"account":"wxid_r93tvy06srbp22",
|
||||
"name": "苏尹岚",
|
||||
"relation_type": "STAFF"
|
||||
}`,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
t.Log(utils.Format4Output(result, false))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user