示例#1
0
        public void LoanApplySuccess()
        {
            ZZXClient     zzxclient = new ZZXClient(url, channelId, privateKey, publicKey, charset);
            ZZXApiRequest request   = new ZZXApiRequest();

            request.Method = "loanApply";

            var   orders = new List <Order>();
            Order order  = null;

            for (int i = 1; i < 10; i++)
            {
                order                 = new Order();
                order.OrderId         = $"DDBH{i}";
                order.Name            = $"订单名称{i}";
                order.OrganizationId  = $"DWBH{i}";
                order.Organization    = $"单位名称{i}";
                order.Mobile          = $"1590000000{i}";
                order.CardNO          = $"32038100000000000{i}";
                order.DivideRate      = i / 10;
                order.Level           = $"套餐档次{i}";
                order.OrderDate       = $"2017-09-1{i}";
                order.PackageDuration = "24";
                order.Type            = "iPhone X";

                orders.Add(order);
            }

            var parms = new
            {
                amount    = 100000,
                productId = "ef0fa7b2e2564f3fb8308caac4be90c0",
                orders    = orders
            };

            request.Params = JsonConvert.SerializeObject(parms);
            ZZXApiResponse response = zzxclient.Execute(request);

            dynamic t = response.Params;

            //var tt = t.loanId;
            loadId = t.loanId;

            Assert.AreEqual(response.StatusCode, 200);
        }
示例#2
0
        public void loanApplySubmitSuccess()
        {
            var           tmp_loadId = "20170919095249000038";
            ZZXClient     zzxclient  = new ZZXClient(url, channelId, privateKey, publicKey, charset);
            ZZXApiRequest request    = new ZZXApiRequest();

            request.Method = "loanApplySubmit";

            var parms = new
            {
                loanId = tmp_loadId
            };

            request.Params = JsonConvert.SerializeObject(parms);
            ZZXApiResponse response = zzxclient.Execute(request);

            Assert.AreEqual(response.StatusCode, 200);
        }
示例#3
0
        public void loanContractConfirmSuccess()
        {
            var           tmp_loadId = "20170919091725000037";
            ZZXClient     zzxclient  = new ZZXClient(url, channelId, privateKey, publicKey, charset);
            ZZXApiRequest request    = new ZZXApiRequest();

            request.Method = "loanContractConfirm";

            var parms = new
            {
                loanId       = tmp_loadId,
                confirmation = 2
            };

            request.Params = JsonConvert.SerializeObject(parms);
            ZZXApiResponse response = zzxclient.Execute(request);

            Assert.AreNotEqual(response.StatusCode, 200);
        }
示例#4
0
        public void UploadAttachmentFail()
        {
            var           tmp_loadId = "123";
            ZZXClient     zzxclient  = new ZZXClient(url, channelId, privateKey, publicKey, charset);
            ZZXApiRequest request    = new ZZXApiRequest();

            request.Method = "uploadAttachment";

            var parms = new
            {
                id       = tmp_loadId,
                filename = "test.jpg",
                data     = "/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDAAgGBgcGBQgHBwcJCQgKDBQNDAsLDBkSEw8UHRofHh0aHBwgJC4nICIsIxwcKDcpLDAxNDQ0Hyc5PTgyPC4zNDL/2wBDAQkJCQwLDBgNDRgyIRwhMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjL/wAARCADIAMgDASIAAhEBAxEB/8QAHwAAAQUBAQEBAQEAAAAAAAAAAAECAwQFBgcICQoL/8QAtRAAAgEDAwIEAwUFBAQAAAF9AQIDAAQRBRIhMUEGE1FhByJxFDKBkaEII0KxwRVS0fAkM2JyggkKFhcYGRolJicoKSo0NTY3ODk6Q0RFRkdISUpTVFVWV1hZWmNkZWZnaGlqc3R1dnd4eXqDhIWGh4iJipKTlJWWl5iZmqKjpKWmp6ipqrKztLW2t7i5usLDxMXGx8jJytLT1NXW19jZ2uHi4+Tl5ufo6erx8vP09fb3+Pn6/8QAHwEAAwEBAQEBAQEBAQAAAAAAAAECAwQFBgcICQoL/8QAtREAAgECBAQDBAcFBAQAAQJ3AAECAxEEBSExBhJBUQdhcRMiMoEIFEKRobHBCSMzUvAVYnLRChYkNOEl8RcYGRomJygpKjU2Nzg5OkNERUZHSElKU1RVVldYWVpjZGVmZ2hpanN0dXZ3eHl6goOEhYaHiImKkpOUlZaXmJmaoqOkpaanqKmqsrO0tba3uLm6wsPExcbHyMnK0tPU1dbX2Nna4uPk5ebn6Onq8vP09fb3+Pn6/9oADAMBAAIRAxEAPwD2sZpaQUdunNZmgHpzR+FBooAM0ZpKU9KACgHnGSa5bxj42s/CNtGZ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per/m0UVCJeookpRIKKKYhQ9ODiiigBd9FFFAH//Z"
            };

            request.Params = JsonConvert.SerializeObject(parms);
            ZZXApiResponse response = zzxclient.Execute(request);

            Assert.AreNotEqual(response.StatusCode, 200);
        }
示例#5
0
        public void refundNotify()
        {
            var           tmp_loadId = "20170919091725000037";
            ZZXClient     zzxclient  = new ZZXClient(url, channelId, privateKey, publicKey, charset);
            ZZXApiRequest request    = new ZZXApiRequest();

            request.Method = "refundNotify";

            var parms = new RefundNotify()
            {
                RefundType   = (int)RefundType.到期正常还款,
                LoanId       = tmp_loadId,
                Amount       = 100000,
                ReriodNumber = 1
            };

            request.Params = JsonConvert.SerializeObject(parms);
            ZZXApiResponse response = zzxclient.Execute(request);

            Assert.AreNotEqual(response.StatusCode, 200);
        }