public void DeleteProfitsharingAsyncTest()
        {
            var key          = TenPayHelper.GetRegisterKey(Config.SenparcWeixinSetting);
            var TenPayV3Info = TenPayV3InfoCollection.Data[key];

            var openId      = "{openId}";//TODO: 此处填入分账接受个人的openid
            var requestData = new DeleteProfitsharingReceiverRequestData(TenPayV3Info.AppId, "PERSONAL_OPENID", openId);

            var profitsharingApis = new ProfitsharingApis();
            var result            = profitsharingApis.DeleteProfitsharingAsync(requestData).GetAwaiter().GetResult();

            Console.WriteLine("微信支付 V3 删除分账接收方接口测试结果:" + result.ToJson(true));

            Assert.IsNotNull(result);
            Assert.IsTrue(result.ResultCode.Success);
            Assert.IsTrue(result.VerifySignSuccess == true);//通过验证
        }
Beispiel #2
0
        /// <summary>
        /// 删除分账接收方接口
        /// <para>商户发起删除分账接收方请求。删除后,不支持将分账方商户结算后的资金,分到该分账接收方</para>
        /// <para>更多详细请参考 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter8_1_9.shtml </para>
        /// </summary>
        /// <param name="data">微信支付需要POST的Data数据</param>
        /// <param name="timeOut">超时时间,单位为ms </param>
        /// <returns></returns>
        public async Task <DeleteProfitsharingReceiverReturnJson> DeleteProfitsharingAsync(DeleteProfitsharingReceiverRequestData data, int timeOut = Config.TIME_OUT)
        {
            var url = ReurnPayApiUrl("https://api.mch.weixin.qq.com/{0}v3/profitsharing/receivers/delete");
            TenPayApiRequest tenPayApiRequest = new(_tenpayV3Setting);

            return(await tenPayApiRequest.RequestAsync <DeleteProfitsharingReceiverReturnJson>(url, data, timeOut));
        }