微信
This commit is contained in:
@@ -23,7 +23,7 @@ func init() {
|
||||
baseapi.Init(sugarLogger)
|
||||
certPEMBlock, _ := ioutil.ReadFile("1390686702_20190115_cert/apiclient_cert.pem")
|
||||
keyPEMBlock, _ := ioutil.ReadFile("1390686702_20190115_cert/apiclient_key.pem")
|
||||
api = NewWithCertificate("wx2bb99eb5d2c9b82c", "XKJPOIHJ233adf01KJIXlIeQDSDKFJAD", "1390686702", certPEMBlock, keyPEMBlock)
|
||||
api = NewWithCertificate("wx4b5930c13f8b1170", "XKJPOIHJ233adf01KJIXlIeQDSDKFJAD", "1390686702", certPEMBlock, keyPEMBlock)
|
||||
// api = New("wx4b5930c13f8b1170", "XKJPOIHJ233adf01KJIXlIeQDSDKFJAD", "1390686702")
|
||||
}
|
||||
|
||||
@@ -104,10 +104,10 @@ func TestXml2Json(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestMultiProfitSharing(t *testing.T) {
|
||||
result, err := api.MultiProfitSharing(&MultiProfitSharing{
|
||||
TransactionID: "4200000503202002048392355582",
|
||||
OutOrderNo: "1730C9A5473311EAAAEA7824AF852DFE",
|
||||
Receivers: `[{"type":"PERSONAL_WECHATID","account":"wxid_r93tvy06srbp22","amount":1,"description":"分到个人"}]`,
|
||||
result, err := api.MultiProfitSharing(&MultiProfitSharingParam{
|
||||
TransactionID: "4200000519202002065628033681",
|
||||
OutOrderNo: "1895BA2948A411EA88B97824AF852DFE",
|
||||
Receivers: `[{"type":"PERSONAL_OPENID","account":"ojWb10ND2JBY_hOic5phWQNChWC0","amount":1,"description":"分到个人"}]`,
|
||||
})
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
@@ -117,12 +117,12 @@ func TestMultiProfitSharing(t *testing.T) {
|
||||
|
||||
func TestTransfers(t *testing.T) {
|
||||
orderNo := utils.GetUUID()
|
||||
result, err := api.Transfers(&Transfers{
|
||||
result, err := api.Transfers(&TransfersParam{
|
||||
PartnerTradeNo: orderNo,
|
||||
OpenID: "oYN_usv1RPvrSxCvo1WsbwI8lZa0",
|
||||
OpenID: "ojWb10ND2JBY_hOic5phWQNChWC0",
|
||||
CheckName: "FORCE_CHECK",
|
||||
ReUserName: "苏尹岚",
|
||||
Amount: 100,
|
||||
Amount: 10,
|
||||
Desc: "测试",
|
||||
SpbillCreateIP: "114.114.114.114",
|
||||
})
|
||||
@@ -133,11 +133,10 @@ func TestTransfers(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestAddProfitSharingReceiver(t *testing.T) {
|
||||
result, err := api.AddProfitSharingReceiver(&ProfitSharingReceiver{
|
||||
result, err := api.AddProfitSharingReceiver(&ProfitSharingReceiverParam{
|
||||
Receiver: `{
|
||||
"type": "PERSONAL_WECHATID",
|
||||
"account":"wxid_r93tvy06srbp22",
|
||||
"name": "苏尹岚",
|
||||
"type": "PERSONAL_OPENID",
|
||||
"account":"ojWb10ND2JBY_hOic5phWQNChWC0",
|
||||
"relation_type": "STAFF"
|
||||
}`,
|
||||
})
|
||||
@@ -148,10 +147,10 @@ func TestAddProfitSharingReceiver(t *testing.T) {
|
||||
}
|
||||
|
||||
func TestDeleteProfitSharingReceiver(t *testing.T) {
|
||||
result, err := api.DeleteProfitSharingReceiver(&ProfitSharingReceiver{
|
||||
result, err := api.DeleteProfitSharingReceiver(&ProfitSharingReceiverParam{
|
||||
Receiver: `{
|
||||
"type": "PERSONAL_WECHATID",
|
||||
"account":"wxid_r93tvy06srbp22"
|
||||
"type": "PERSONAL_OPENID",
|
||||
"account":"ojWb10ND2JBY_hOic5phWQNChWC0"
|
||||
}`,
|
||||
})
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user