Ejemplo n.º 1
0
        public void QueryComplaintNotifyUrlAsyncTest()
        {
            var complaintApis = new ComplaintApis();
            var result        = complaintApis.QueryComplaintNotifyUrlAsync().GetAwaiter().GetResult();

            Console.WriteLine("微信支付 V3 查询投诉通知回调地址接口测试结果:" + result.ToJson(true));

            Assert.IsNotNull(result);
            Assert.IsTrue(result.ResultCode.Success);
            Assert.IsTrue(result.VerifySignSuccess == true);//通过验证
        }
Ejemplo n.º 2
0
        public void DeleteComplaintNotifyUrlAsyncTest()
        {
            // 此处输入notify_url
            var complaintApis = new ComplaintApis();
            var result        = complaintApis.DeleteComplaintNotifyUrlAsync().GetAwaiter().GetResult();

            // TODO: 此处唯一使用了DELETE动词 需要重点测试
            Console.WriteLine("微信支付 V3 删除投诉通知回调地址接口测试结果:" + result.ToJson(true));

            Assert.IsNotNull(result);
            Assert.IsTrue(result.ResultCode.Success);
            Assert.IsTrue(result.VerifySignSuccess == true);//通过验证
        }
Ejemplo n.º 3
0
        public void QueryNegotiationHistorysAsyncTest()
        {
            // 此处输入投诉id
            var complaint_id = "{complaint_id}";

            var complaintApis = new ComplaintApis();
            var result        = complaintApis.QueryNegotiationHistorysAsync(complaint_id).GetAwaiter().GetResult();

            Console.WriteLine("微信支付 V3 查询投诉协商历史接口测试结果:" + result.ToJson(true));

            Assert.IsNotNull(result);
            Assert.IsTrue(result.ResultCode.Success);
            Assert.IsTrue(result.VerifySignSuccess == true);//通过验证
        }
Ejemplo n.º 4
0
        public void QueryComplaintsAsyncTest()
        {
            var key          = TenPayHelper.GetRegisterKey(Config.SenparcWeixinSetting);
            var TenPayV3Info = TenPayV3InfoCollection.Data[key];

            var complaintApis = new ComplaintApis();
            var result        = complaintApis.QueryComplaintsAsync(new TenpayDateTime(DateTime.Parse("2021-9-30")), new TenpayDateTime(DateTime.Now), TenPayV3Info.MchId).GetAwaiter().GetResult();

            Console.WriteLine("微信支付 V3 查询投诉单列表测试结果:" + result.ToJson(true));

            Assert.IsNotNull(result);
            Assert.IsTrue(result.ResultCode.Success);
            Assert.IsTrue(result.VerifySignSuccess == true);//通过验证
        }
Ejemplo n.º 5
0
        public void CreateComplaintNotifyUrlAsyncTest()
        {
            // 此处输入notify_url
            var notify_url  = "{notify_url}";
            var requestData = new CreateComplaintNotifyUrlRequestData(notify_url);

            var complaintApis = new ComplaintApis();
            var result        = complaintApis.CreateComplaintNotifyUrlAsync(requestData).GetAwaiter().GetResult();

            Console.WriteLine("微信支付 V3 创建投诉通知回调地址接口测试结果:" + result.ToJson(true));

            Assert.IsNotNull(result);
            Assert.IsTrue(result.ResultCode.Success);
            Assert.IsTrue(result.VerifySignSuccess == true);//通过验证
        }
Ejemplo n.º 6
0
        public void CompleteComplaintAsyncTest()
        {
            var key          = TenPayHelper.GetRegisterKey(Config.SenparcWeixinSetting);
            var TenPayV3Info = TenPayV3InfoCollection.Data[key];

            // 此处输入投诉id
            var complaint_id = "{complaint_id}";
            var requestData  = new CompleteComplaintRequestData(complaint_id, TenPayV3Info.MchId);

            var complaintApis = new ComplaintApis();
            var result        = complaintApis.CompleteComplaintAsync(requestData).GetAwaiter().GetResult();

            Console.WriteLine("微信支付 V3 反馈处理完成接口测试结果:" + result.ToJson(true));

            Assert.IsNotNull(result);
            Assert.IsTrue(result.ResultCode.Success);
            Assert.IsTrue(result.VerifySignSuccess == true);//通过验证
        }