Beispiel #1
0
        public void ModifyComplaintNotifyUrlAsyncTest()
        {
            // 此处输入notify_url
            var notify_url  = "{notify_url}";
            var requestData = new ModifyComplaintNotifyUrlRequestData(notify_url);

            var complaintApis = new ComplaintApis();
            var result        = complaintApis.ModifyComplaintNotifyUrlAsync(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>商户通过调用此接口更新投诉通知的回调URL。</para>
        /// <para>更多详细请参考 https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter10_2_4.shtml </para>
        /// </summary>
        /// <param name="data">微信支付需要POST的Data数据</param>
        /// <param name="timeOut">超时时间,单位为ms</param>
        /// <returns></returns>
        public async Task <ModifyComplaintNotifyUrlReturnJson> ModifyComplaintNotifyUrlAsync(ModifyComplaintNotifyUrlRequestData data, int timeOut = Config.TIME_OUT)
        {
            var url = ReurnPayApiUrl("https://api.mch.weixin.qq.com/{0}v3/merchant-service/complaint-notifications");

            TenPayApiRequest tenPayApiRequest = new(_tenpayV3Setting);

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