Example #1
0
    def IUMSCUTS0010(self):
        """IUMSCUTS0010 绑卡签约信息登记"""
        seqno = generate_random_str(17)
        calseqno = "LN" + generate_random_num(12)
        custna = get_name()
        random_sex = random.randint(1, 2)
        certno = IdNumber.generate_id(random_sex)
        cardno = get_card_id()
        tel = get_tel()

        header = {
            "api_id": "IUMSCUTS0010",
            "country": "cn",
            "calseqno": seqno,
            "dapplication": "81001",
            "service": "IUMSCUTS0010",
            "callseqno": calseqno,
            "dgroup": "onl01",
            "dversion": "1.0",
            "busiseqno": calseqno,
            "Content-Type": "application/json"
        }
        data = {
            "input": {
                "custna": custna,
                "certtp": "101",
                "certno": certno,
                "channalId": "JDJR",
                "out_user_id": "",
                "cardNo": cardno,
                "cardBin": "621661",
                "cardType": "0",
                "bankNo": "01040000",
                "bankName": "中国银行",
                "registe_type": "1",
                "bankProvince": "天津",
                "bankCity": "天津市",
                "mobileNo": tel,
                "bindCardId": calseqno,
            },
            "comm_req": {
                "xcopfg": "0",
                "inpucd": "985",
                "counts": "0",
                "busisq": calseqno,
                "corpno": "985",
                "xdcnfg": "1",
                "tranus": "9852001",
                "servtp": "TE",
                "servno": "004",
                "pageno": "1",
                "pgsize": "10",
                "tranbr": "985000",
                "channel_id": "JDJR"
            }
        }
        return Requester(headers=header, json=data)
Example #2
0
    def creditApply_encrvption(self):
        '''授信申请接口加密'''
        applyno = generate_random_num(17)
        custName = get_name()
        mobileNo = get_tel()
        custNo = "test" + generate_random_num(11)
        openId = generate_random_str(10)
        random_sex = random.randint(0, 1)
        applyTime = get_time()
        idNo = IdNumber.generate_id(random_sex)
        # idNo = "130132198602163926oo"
        data = {
            "bizContent": {
                "applyNo": applyno,
                "idNo": idNo,
                "mobileNo": mobileNo,
                "custNo": custNo,
                "openId": openId,
                "occupation": "其他",
                "nation": "汉",
                "residentAddr": "",
                "ipAddr": "",
                "gpsAddr": "234,232",
                "trustId": "000000000",
                "workCity": "",
                "certValidDate": "20100801-20300801",
                "addr": "中国台湾台北市",
                "applyTime": applyTime,
                "channelCode": "MUCF",
                "address": "OCR",
                "workAddr": "上海市",
                "suggestLimit": "49999",
                "custName": custName,
                "extendInfo":
                "{\"cardLmtNear6mUsed\":\"0\",\"card24mHstrOvdMax\":\"000000000000000000000000\",\"class5StateGuaLoan\":\"否\",\"cardOvdAmtTot\":\"0\",\"loanOvdAmtTot\":\"0\",\"loan24mHstrOvdCnt\":\"000000000000000000000000\",\"loanQueryOrgCnt1m\":\"0\",\"selfQueryCnt1m\":\"0\",\"badDebtRecords\":\"否\",\"loanBalance\":\"0\",\"loanAbnormalCnt\":\"0\",\"houseFundBase\":\"5\",\"ovdMonthMax\":\"0\",\"houseLoanPrcp\":\"0\",\"reportCreateTime\":\"0\",\"cardLmtUsed\":\"\",\"cardAbnormalCnt\":\"0\",\"loanOrgCnt\":\"0\",\"cardTotLmt\":\"0\",\"cardUsingHstrAvg\":\"0\",\"card24mHstrOvdCnt\":\"000000000000000000000000\",\"cardQueryOrgCnt1m\":\"0\",\"loan24mHstrOvdMax\":\"000000000000000000000000\",\"monthIncome\":\"10000\",\"loanPayAmt1m\":\"0\"}",
                "workCompany": "",
                "residentCity": "",
                "bioCompareRs": "true",
                "merchantNo": "000000000"
            },
            "appId": "merchCreditApply",
            "channelCode": "MUCF",
            "encoding": "UTF-8",
            "encryptKey":
            "cAzHFcdZaSbNaV57dCCr4n+Y+4rh0K3AZdcFwP/0GUukI3ZjpG3XqZgANWe9j8QRd4nXeVPnS2W2Vh7hb3ykTa6jeSTKRJYhe8ZWWrSwJqYriTSleoUwRBNBLoR9XI5a22PsjrTJBa6AKtaBmo4kS9NXEe3j13ka5SOg7zeeVSU=",
            "encryptType": "AES",
            "flowNo": "000006",
            "merchantId": "000000",
            "reqDateTime": "2020-10-15 01:35:22",
            "reqServiceId": "merchCreditApply",
            "sign":
            "JMvAl1F472juRss0SBm5Md7mA4VsKt4ZGLtLPqnli07ERfl91GUyOtB2/p9OouuyBdD0fvHlPbTU3Et+lCnYgHdMOV0bhIRQFLpCA4lExjmfDQWuu0HSMBN+kiUoemHJBDVFJ8RAODIFeDRxSQGCjMwZTJrZKwez+XnIXvhIHcI=",
            "subMerchantId": "000000"
        }

        return Requester(json=data)
Example #3
0
 def PATSCMSS6003(self):
     '''乐信借款审批结果查询'''
     header = {}
     data = {
         "input": {
             "applyNo": "",
             "channelCode": "LXIN",
             "prodCode": "02050015"
         },
     }
     return Requester(headers=header, json=data)
Example #4
0
    def ICMSJKSS0002(self,applyNo,applid):
        '''进件中心发起影像件'''
        calseqno = "LN" + generate_random_num(12)

        header = {
            "dserviceId":"ICMSJKSS0002",
            "api_id":"ICMSJKSS0002",
            "country":"cn",
            "dapplication":"01001",
            "callseqno":calseqno,
            "dgroup":"01",
            "dversion":"1.0",
            "busiseqno":calseqno,
            "Content-Type":"application/json"
        }
        data ={
            "input":{
                "applid":applid,
                "applyNo":applyNo,
                "tarFilePath":"",
                "downStatus":"",
                "tarFileNa":"",
                "fileList":[
                ]
            },
            "comm_req":{
                "servtp":"TE",
                "xcopfg":"0",
                "inpucd":"985",
                "servno":"004",
                "pageno":"1",
                "counts":"0",
                "busisq":calseqno,
                "pgsize":"10",
                "corpno":"985",
                "tranbr":"985000",
                "xdcnfg":"1",
                "tranus":"9852001"
            }
        }

        return Requester(headers=header, json=data)
Example #5
0
    def IUMSCUTS0009(self, custid, certno):
        """IUMSCUTS0009 卡信息查询"""
        seqno = generate_random_str(17)
        calseqno = "LN" + generate_random_num(12)

        header = {
            "api_id": "IUMSCUTS0009",
            "country": "cn",
            "calseqno": seqno,
            "dapplication": "81001",
            "service": "IUMSCUTS0009",
            "callseqno": calseqno,
            "dgroup": "onl01",
            "dversion": "1.0",
            "busiseqno": calseqno,
            "Content-Type": "application/json"
        }
        data = {
            "input": {
                "custid": custid,
                "certtp": "101",
                "certno": certno,
                "out_user_id": "",
                "channalId": "JDJR",
            },
            "comm_req": {
                "xcopfg": "0",
                "inpucd": "985",
                "counts": "0",
                "busisq": calseqno,
                "corpno": "985",
                "xdcnfg": "1",
                "tranus": "9852001",
                "servtp": "TE",
                "servno": "004",
                "pageno": "1",
                "pgsize": "10",
                "tranbr": "985000",
                "channel_id": "JDJR"
            }
        }
        return Requester(headers=header, json=data)
Example #6
0
 def apoccu(self, crdlno, exordr, ordrid, appday):
     """额度占用"""
     seqno = generate_random_num(17)
     header = {
         "dserviceId": "CORECLTS1045",
         "api_id": "CORECLTS1045",
         "country": "cn",
         "dapplication": "01001",
         "callseqno": seqno,
         "dgroup": "01",
         "dversion": "1.0",
         "busiseqno": seqno,
         "Content-Type": "application/json"
     }
     data = {
         "input": {
             "busisq": ordrid,
             "apocam": "1000",
             "occust": "A",
             "exordr": exordr,
             "crdlno": crdlno,
             "aplydt": appday
         },
         "comm_req": {
             "xcopfg": "0",
             "inpucd": "985",
             "counts": "0",
             "busisq": seqno,
             "corpno": "985",
             "xdcnfg": "1",
             "tranus": "9852001",
             "servtp": "TE",
             "servno": "004",
             "pageno": "1",
             "pgsize": "10",
             "tranbr": "985000",
             "channel_id": "TOUTIAO"
         }
     }
     return Requester(headers=header, json=data)
Example #7
0
    def queryApply(self, applyNo):
        '''授信结果查询'''
        data = {
            "appId": "merchQueryApplyResult",
            "bizContent": {
                "applyNo": applyNo
            },
            "channelCode": "0APP",
            "encoding": "UTF-8",
            "encryptKey":
            "cAzHFcdZaSbNaV57dCCr4n+Y+4rh0K3AZdcFwP/0GUukI3ZjpG3XqZgANWe9j8QRd4nXeVPnS2W2Vh7hb3ykTa6jeSTKRJYhe8ZWWrSwJqYriTSleoUwRBNBLoR9XI5a22PsjrTJBa6AKtaBmo4kS9NXEe3j13ka5SOg7zeeVSU=",
            "encryptType": "AES",
            "flowNo": "000001",
            "merchantId": "000000",
            "reqDateTime": "2020-10-15 01:35:22",
            "reqServiceId": "merchQueryApplyResult",
            "sign":
            "JMvAl1F472juRss0SBm5Md7mA4VsKt4ZGLtLPqnli07ERfl91GUyOtB2/p9OouuyBdD0fvHlPbTU3Et+lCnYgHdMOV0bhIRQFLpCA4lExjmfDQWuu0HSMBN+kiUoemHJBDVFJ8RAODIFeDRxSQGCjMwZTJrZKwez+XnIXvhIHcI=",
            "subMerchantId": "000000",
        }

        return Requester(json=data)
Example #8
0
    def PATSJDSS1004(self):
        '''实时额度查询'''
        seqno = generate_random_str(17)
        calseqno = "LN" + generate_random_num(12)

        header = {
            "api_id": "PATSJDSS1004",
            "country": "cn",
            "calseqno": seqno,
            "dapplication": "81001",
            "service": "PATSJDSS1004",
            "callseqno": calseqno,
            "dgroup": "onl01",
            "dversion": "1.0",
            "busiseqno": calseqno,
            "Content-Type": "application/json"
        }
        data = {
            "input": {
                "applyNo": "1201209348270621",
                "userId": "9a3b9fb0ab704e8d83a5c1b5521377de",
                "username": "******",
                "certNo": "210422198001252943",
                "userTel": "18885752217",
                "applyTime": "20201209150307",
                "channelCode": "CRPL_ZHONGYIN",
                "applyProduct": "zhongyin_001",
            },
            "comm_req": {
                "trantm": "844568",
                "initiator_system": "301",
                "app_version": "1.0",
                "trxn_branch": "06924",
                "call_seq": seqno,
                "trxn_teller": "07988122",
                "sponsor_system": "810",
                "auth_user_id": "153148",
                "servtp": "TE",
                "sys_version": "1.0",
                "inpudt": "20200604",
                "servno": "004",
                "busi_seq": seqno,
                "page_start": "1",
                "trxn_seq": seqno,
                "tranbr": "985000",
                "trandt": "20200604",
                "longitude": "31.2579921",
                "page_size": "10",
                "orderSeq": seqno,
                "phone_type": "0",
                "initiator_date": "20200711",
                "inpucd": "985",
                "busisq": calseqno,
                "rsa_key": "77777777777777",
                "inpusq": seqno,
                "corpno": "985",
                "ip_address": "127.0.0.1",
                "busi_org_id": "025",
                "busiseqno": seqno,
                "terminal_os_type": "0",
                "tranus": "xadmin",
                "initiator_seq": seqno,
                "pageIndex": "1",
                "pageno": "1",
                "pgsize": "1",
                "callseqno": seqno,
                "channel_id": "JDJR"
            }
        }
        return Requester(headers=header, json=data)
Example #9
0
 def PATSJDSS1001(self, ):
     '''授信申请'''
     seqno = generate_random_str(17)
     calseqno = "LN" + generate_random_num(12)
     name = get_name()
     mobile = get_tel()
     userid = "user" + generate_random_num(9)
     applyNo = "J" + generate_random_num(10)
     random_sex = random.randint(1, 2)
     idnumber = IdNumber.generate_id(random_sex)
     """影像件上传"""
     cmd_mk = "mkdir " + userid
     cmd_cp = "cp -r " + userid + " /upload/crpl_zhongyin/20200917/ocr"
     cmd_rm = "rm -rf " + userid
     exec_commands(cmd_mk)
     exec_commands(cmd_cp)
     exec_commands(cmd_rm)
     upload("D:\\Python_work\\walnuts_api\\api_test\\img\\1.txt",
            "/upload/crpl_zhongyin/20200917/ocr/" + userid + "/1.txt")
     upload("D:\\Python_work\\walnuts_api\\api_test\\img\\2.txt",
            "/upload/crpl_zhongyin/20200917/ocr/" + userid + "/2.txt")
     upload("D:\\Python_work\\walnuts_api\\api_test\\img\\3.txt",
            "/upload/crpl_zhongyin/20200917/ocr/" + userid + "/3.txt")
     """报文头信息"""
     header = {
         "api_id": "PATSJDSS1001",
         "country": "cn",
         "calseqno": seqno,
         "dapplication": "81001",
         "service": "PATSJDSS1001",
         "callseqno": calseqno,
         "dgroup": "onl01",
         "dversion": "1.0",
         "busiseqno": calseqno,
         "Content-Type": "application/json"
     }
     data = {
         "input": {
             "ocrInfo": {
                 "signPlace": "上海",
                 "address": "上海",
                 "validDate": "20190306_20390306",
                 "sex": "男",
                 "name": name,
                 "ethnicGroups": "汉",
                 "idNumber": idnumber
             },
             "userInfo": {
                 "homeAddressCountry":
                 "黄埔",
                 "workAddressDetail":
                 "滇池路756号",
                 "profession":
                 "PROFESSION_001",
                 "homeAddressDetail":
                 "滇池路135号",
                 "workAddressCity":
                 "上海",
                 "education":
                 "UNDERGRADUATE",
                 "unitName":
                 "上海中银消费",
                 "userTel":
                 mobile,
                 "userId":
                 userid,
                 "certNo":
                 idnumber,
                 "homeAddressProvince":
                 "上海",
                 "homeAddressArea":
                 "黄埔",
                 "school":
                 "北京大学",
                 "homeAddressCity":
                 "上海",
                 "workAddressCountry":
                 "黄埔",
                 "workAddressProvince":
                 "上海",
                 "workAddressArea":
                 "黄埔",
                 "unitTel":
                 "17369777481",
                 "emergList": [{
                     "emergRelation": "PARENT",
                     "emergTel": "15215314777",
                     "emergName": "客户之父"
                 }, {
                     "emergRelation": "PARENT",
                     "emergTel": "15810943875",
                     "emergName": "客户之母"
                 }],
                 "username":
                 name,
                 "monthlyIncome":
                 "LEVEL_5"
             },
             "applyProduct": "zhongyin_001",
             "applyNo": applyNo,
             "notifyUrl":
             "https://jie.baitiao.com/inv/crpl/loan/checkApplyResult",
             "applyTime": "20200917",
             "applyPeriod": "12",
             "channelCode": "CRPL_ZHONGYIN",
             "applyAmount": "300000"
         },
         "comm_req": {
             "trantm": "844568",
             "initiator_system": "301",
             "app_version": "1.0",
             "trxn_branch": "06924",
             "call_seq": seqno,
             "trxn_teller": "07988122",
             "sponsor_system": "810",
             "auth_user_id": "153148",
             "servtp": "TE",
             "sys_version": "1.0",
             "inpudt": "20200604",
             "servno": "004",
             "busi_seq": seqno,
             "page_start": "1",
             "trxn_seq": seqno,
             "tranbr": "985000",
             "trandt": "20200604",
             "longitude": "31.2579921",
             "page_size": "10",
             "orderSeq": seqno,
             "phone_type": "0",
             "initiator_date": "20200711",
             "inpucd": "985",
             "busisq": calseqno,
             "rsa_key": "77777777777777",
             "inpusq": seqno,
             "corpno": "985",
             "ip_address": "127.0.0.1",
             "busi_org_id": "025",
             "busiseqno": seqno,
             "terminal_os_type": "0",
             "tranus": "xadmin",
             "initiator_seq": seqno,
             "pageIndex": "1",
             "pageno": "1",
             "pgsize": "1",
             "callseqno": seqno,
             "channel_id": "JDJR"
         }
     }
     return Requester(headers=header, json=data)
Example #10
0
 def mifi_pay_query(self,paymentNo, openId):
     '''用信结果查询'''
     seqno = generate_random_str(10)
     calseqno = "LN" + generate_random_num(12)
     header ={
         "api_id":"PATSMISS2002",
         "country":"cn",
         "calseqno":calseqno,
         "dapplication":"81001",
         "service":"PATSMISS2002",
         "callseqno":calseqno,
         "dgroup":"onl01",
         "dversion":"1.0",
         "busiseqno":calseqno,
         "Content-Type":"application/json"
     }
     data = {
         "input":{
             "paymentNo":paymentNo,
             "openId":openId
         },
         "comm_req":{
             "trantm":"093941",
             "initiator_system":"301",
             "app_version":"1.0",
             "trxn_branch":"09451",
             "call_seq":calseqno,
             "trxn_teller":"45319371",
             "sponsor_system":"810",
             "auth_user_id":"068503",
             "servtp":"TE",
             "sys_version":"1.0",
             "inpudt":"20200604",
             "servno":"004",
             "busi_seq":calseqno,
             "page_start":"1",
             "trxn_seq":calseqno,
             "tranbr":"985000",
             "trandt":"20200604",
             "longitude":"31.2579921",
             "page_size":"10",
             "orderSeq":seqno,
             "phone_type":"0",
             "initiator_date":"20200711",
             "inpucd":"985",
             "busisq":calseqno,
             "rsa_key":"77777777777777",
             "inpusq":calseqno,
             "corpno":"985",
             "ip_address":"127.0.0.1",
             "busi_org_id":"025",
             "busiseqno":seqno,
             "terminal_os_type":"0",
             "tranus":"xadmin",
             "initiator_seq":calseqno,
             "pageIndex":"1",
             "pageno":"1",
             "pgsize":"1",
             "callseqno":seqno,
             "channel_id":"MIFI"
         }
     }
     return Requester(headers=header, json=data)
Example #11
0
    def mifi_pay(self, idnum, applyId):
        '''用信申请'''
        seqno = generate_random_str(17)
        calseqno = "LN" + generate_random_num(12)
        paymentNo = "pay" + generate_random_num(10)
        mobile1 = get_tel()
        mobile2 = get_tel()

        # 读取excel,获取客户信息
        custinfo = readExcel(idnum)

        name = custinfo[0]
        mobile = custinfo[1]
        idnumber = custinfo[2]
        applyNo = custinfo[3]
        openId = custinfo[4]
        applyImgPath = custinfo[5]

        header = {
            "api_id":"PATSMISS2001",
            "country":"cn",
            "calseqno":calseqno,
            "dapplication":"81001",
            "service":"PATSMISS2001",
            "callseqno":calseqno,
            "dgroup":"onl01",
            "dversion":"1.0",
            "busiseqno":calseqno,
            "Content-Type":"application/json"
        }
        data = {
                "input":{
                    "paymentNo": paymentNo,
                    "applyId": applyId,
                    "applyNo": applyNo,
                    "idNum": idnumber,
                    "idType": "CNI",
                    "openId": openId,
                    "mobile": mobile,
                    "userName": name,
                    "loanUse":"1",
                    "contact1Name":"张三",
                    "contact1Relation": "01",
                    "contact1MobileNo": mobile1,
                    "contact2Name":"李四",
                    "contact2Relation":"02",
                    "contact2MobileNo": mobile2,
                    "riskData":{
                        "associateDeviceCount":"0",
                        "devicePrintAssociateAccountCount":"0",
                        "gPSConsistency":"0",
                        "devicePrintNull":"0",
                        "isMobileTypeChange":"0",
                        "deviceIsBlack":"0",
                        "associateDevicePrintCount":"0",
                        "isFrequentlyUsedDevicePrint":"0",
                        "devicePrintIsBlack":"0",
                        "deviceAssociateAccountCount":"0",
                        "deviceNull":"0",
                        "deviceSystem":"0",
                        "iPConsistency":"0",
                        "iPConcentration":"0",
                        "gPSConcentration":"0",
                        "mobileTypeNull":"0",
                        "isFrequentlyUsedDevice":"0"
                    },
                    "loanAmount":"100000",
                    "firstRepayDay":"",
                    "extInfo":{
                        "faceCmpScore":"",
                        "industry":{
                        "firstCode":"",
                        "firstName":"",
                        "secondCode":"",
                        "secondName":""
                    },
                        "career":{
                        "firstCode":"",
                        "firstName":"",
                        "secondCode":"",
                        "secondName":""
                    },
                        "companyName":"",
                        "applyAuthPath":"",
                        "applyImgPath":"",
                        "incomeLevel":"",
                    },
                    "bankAmount":"300000",
                    "bankCardNum":"6216610200016587010",
                    "term":"12",
                    "loanRate":"23.900000",
                    "channelCode":"MIFI"
                },
                "comm_req":{
                    "trantm":"065575",
                    "initiator_system":"301",
                    "app_version":"1.0",
                    "trxn_branch":"51636",
                    "call_seq":"393713849625",
                    "trxn_teller":"79632141",
                    "sponsor_system":"810",
                    "auth_user_id":"419195",
                    "servtp":"TE",
                    "sys_version":"1.0",
                    "inpudt":"20200604",
                    "servno":"004",
                    "busi_seq":seqno,
                    "page_start":"1",
                    "trxn_seq":seqno,
                    "tranbr":"985000",
                    "trandt":"20200604",
                    "longitude":"31.2579921",
                    "page_size":"10",
                    "orderSeq":seqno,
                    "phone_type":"0",
                    "initiator_date":"20200711",
                    "inpucd":"985",
                    "busisq":seqno,
                    "rsa_key":"77777777777777",
                    "inpusq":seqno,
                    "corpno":"985",
                    "ip_address":"127.0.0.1",
                    "busi_org_id":"025",
                    "busiseqno":seqno,
                    "terminal_os_type":"0",
                    "tranus":"xadmin",
                    "initiator_seq":seqno,
                    "pageIndex":"1",
                    "pageno":"1",
                    "pgsize":"1",
                    "callseqno":seqno,
                    "channel_id":"MIFI"
                }
            }
        return Requester(headers=header, json=data)
Example #12
0
 def addcll(self, custac, idtfno, name, phone, ordrid, crdlam, appday):
     """新增额度交易"""
     seqno = generate_random_num(17)
     merchn = "B0000008"
     header = {
         "dserviceId": "CORECLTS1037",
         "api_id": "CORECLTS1037",
         "country": "cn",
         "dapplication": "01001",
         "callseqno": seqno,
         "dgroup": "01",
         "dversion": "1.0",
         "busiseqno": seqno,
         "Content-Type": "application/json"
     }
     data = {
         "input": {
             "prodcd":
             "1001",
             "magena":
             "王二",
             "crcycd":
             "CNY",
             "custac":
             custac,
             "irflvl":
             "",
             "exusid":
             "",
             "intrvl":
             "",
             "irfltp":
             "0",
             "idtfno":
             idtfno,
             "dateam":
             "",
             "merchn":
             merchn,  #合作商编号
             "exordr":
             "",
             "cardno":
             "",
             "idtftp":
             "101",
             "incftp":
             "",
             "custna":
             name,
             "abrtdt":
             "",
             "phonno":
             phone,
             "mageno":
             "34718659",
             "effedt":
             "20401117",
             "brchno":
             "",
             "appday":
             appday,
             "addlst": [{
                 "bapdcd": "02040005",
                 "ordrid": ordrid,
                 "crdlam": crdlam,
                 "busino": "02040005",
                 "cllevl": "P",
                 "crdlno": "",
                 "cltpcd": "02040005"
             }],
         },
         "comm_req": {
             "xcopfg": "0",
             "inpucd": "985",
             "counts": "0",
             "busisq": seqno,
             "corpno": "985",
             "xdcnfg": "1",
             "tranus": "9852001",
             "servtp": "TE",
             "servno": "004",
             "pageno": "1",
             "pgsize": "10",
             "tranbr": "985000",
             "channel_id": "TOUTIAO"
         }
     }
     return Requester(headers=header, json=data)
Example #13
0
    def PATSJBSS1001(self):
        '''授信申请'''
        seqno = generate_random_str(17)
        calseqno = "LN" + generate_random_num(12)
        name = get_name()
        mobile = get_tel()
        applyNo = generate_random_num(18) +"A"
        creditNo = applyNo
        random_sex = random.randint(1, 2)
        applyTime = get_time()
        idnumber = IdNumber.generate_id(random_sex)

        header = {
            "api_id":"PATSJBSS1001",
            "country":"cn",
            "calseqno":seqno,
            "dapplication":"81001",
            "service":"PATSJBSS1001",
            "callseqno":calseqno,
            "dgroup":"onl01",
            "dversion":"1.0",
            "busiseqno":calseqno,
            "Content-Type":"application/json"
        }
        data = {
            "input":{
                "applyNo":applyNo,
                "creditNo":creditNo,
                "productCode":"JB",
                "bizMode":"PLATFORM_1",
                "bizType":"ADMIT_APPLY",
                "source":"USER",
                "creditFlag":"N",
                "repayMode":"1",
                "pricingRating":"7",
                "consumingScore":"100.0",
                "name":name,
                "mobileNo":mobile,
                "certType":"01",
                "certNo":idnumber,
                "certValidEndDate":"长期",
                "cardNo":"6225880118085993",
                "applyExpiredDate":"2020-12-31",
                "addr":{
                    "prov": "浙江省",
                    "city": "杭州市",
                    "area": "⻄湖区",
                    "address": "5a2m6Zmi6LevMTI45Y+3LUEx5bqnMTLivKnpgq7lsYA="
                },
                "riskInfo":{
                    "joinRisk":1,
                    "riskRating":"A",
                    "solvencyRatings":"B",
                    "apolloInfo":{"have_car_prob_grade":"02","have_fang_prob_grade":"01","xfdc_index":"07","mobile_fixed_grade":"08",
                    "adr_stability_grade":"09","occupation":"军人","tot_pay_amt_6m_grade":"08","last_6m_avg_asset_total_grade":"06",
                    "ovd_order_cnt_6m_grade": "01","ovd_order_amt_6m_grade": "01","positive_biz_cnt_1y_grade": "10","risk_score": "980",
                    "cust_seg":"A","dev_stability_grade":"A","ovd_order_days_6m_grade":"01","first_loan_length_grade":"05","repay_amt_6m_grade":"07"
                    },
                },
                "extInfo":{
                    "securityId": "cadfasdf-fasdfasdf-fapsdfiprteuensd-34"
                    },
            },
            "comm_req":{
                "trantm":"844568",
                "initiator_system":"301",
                "app_version":"1.0",
                "trxn_branch":"06924",
                "call_seq":seqno,
                "trxn_teller":"07988122",
                "sponsor_system":"810",
                "auth_user_id":"153148",
                "servtp":"TE",
                "sys_version":"1.0",
                "inpudt":"20200604",
                "servno":"004",
                "busi_seq":seqno,
                "page_start":"1",
                "trxn_seq":seqno,
                "tranbr":"985000",
                "trandt":"20200604",
                "longitude":"31.2579921",
                "page_size":"10",
                "orderSeq":seqno,
                "phone_type":"0",
                "initiator_date":"20200711",
                "inpucd":"985",
                "busisq":calseqno,
                "rsa_key":"77777777777777",
                "inpusq":seqno,
                "corpno":"985",
                "ip_address":"127.0.0.1",
                "busi_org_id":"025",
                "busiseqno":seqno,
                "terminal_os_type":"0",
                "tranus":"xadmin",
                "initiator_seq":seqno,
                "pageIndex":"1",
                "pageno":"1",
                "pgsize":"1",
                "callseqno":seqno,
                "channel_id":"JIEB"
            },
        }

        return Requester(headers=header, json=data)
Example #14
0
 def creditApply(self):
     '''授信申请接口'''
     fun = Encrvption()
     data = fun.creditApply_encrvption().json()
     return Requester(json=data)
Example #15
0
 def PATSCMSS8002(self):
     '''乐信提前还款试算'''
     seqno = generate_random_num(17)
     calseqno = "LN" + generate_random_num(12)
     date = get_date()
     header = {
         "api_id": "PATSCMSS8002",
         "country": "cn",
         "calseqno": seqno,
         "dapplication": "81001",
         "service": "PATSCMSS8002",
         "callseqno": seqno,
         "dgroup": "onl01",
         "dversion": "1.0",
         "busiseqno": seqno,
         "Content-Type": "application/json"
     }
     data = {
         "input": {
             "loanNo": "",
             "channelCode": "",
             "repayType": "",
             "mode": "",
             "repayAmt": "",
             "paymentApplyNo": "",
         },
         "comm_req": {
             "trantm": "752512",
             "initiator_system": "301",
             "app_version": "1.0",
             "trxn_branch": "77710",
             "call_seq": calseqno,
             "trxn_teller": "95068241",
             "sponsor_system": "810",
             "auth_user_id": "587046",
             "servtp": "TE",
             "sys_version": "1.0",
             "inpudt": date,
             "servno": "004",
             "busi_seq": seqno,
             "page_start": "1",
             "trxn_seq": seqno,
             "tranbr": date,
             "trandt": date,
             "longitude": "31.2579921",
             "page_size": "10",
             "orderSeq": calseqno,
             "phone_type": "0",
             "initiator_date": date,
             "inpucd": "985",
             "busisq": seqno,
             "rsa_key": "77777777777777",
             "inpusq": calseqno,
             "corpno": "985",
             "ip_address": "127.0.0.1",
             "busi_org_id": "025",
             "busiseqno": seqno,
             "terminal_os_type": "0",
             "tranus": "xadmin",
             "initiator_seq": calseqno,
             "pageIndex": "1",
             "pageno": "1",
             "pgsize": "1",
             "callseqno": calseqno,
             "channel_id": "LXIN"
         }
     }
     return Requester(headers=header, json=data)
Example #16
0
 def login(self, account, password):
     """
     登录接口
     """
     data = {'account': account, 'password': password}
     return Requester(data=data)
Example #17
0
 def PATSCMSS6001(self, applyNo):
     '''借款申请-标准'''
     seqno = generate_random_num(17)
     calseqno = "LN" + generate_random_num(12)
     date = get_date()
     applyTime = get_time()
     paymentApplyNo = "L" + generate_random_num(13)
     """报文头信息"""
     header = {
         "api_id": "PATSCMSS6001",
         "country": "cn",
         "calseqno": seqno,
         "dapplication": "81001",
         "service": "PATSCMSS6001",
         "callseqno": seqno,
         "dgroup": "onl01",
         "dversion": "1.0",
         "busiseqno": seqno,
         "Content-Type": "application/json"
     }
     data = {
         "applyNo": applyNo,
         "paymentApplyNo": paymentApplyNo,
         "channelCode": "LXIN",
         "userId": "",
         "applyTime": applyTime,
         "prodCode": "02050015",
         "applyAmt": "2000",
         "applTnr": "12",
         "repytp": "1",
         "intRate": "",
         "loanPurpose": "",
         "insureNo": "",
         "busiScen": "0",
         "extInfo": {
             "busiType": "3"
         },
         "comm_req": {
             "trantm": "752512",
             "initiator_system": "301",
             "app_version": "1.0",
             "trxn_branch": "77710",
             "call_seq": calseqno,
             "trxn_teller": "95068241",
             "sponsor_system": "810",
             "auth_user_id": "587046",
             "servtp": "TE",
             "sys_version": "1.0",
             "inpudt": date,
             "servno": "004",
             "busi_seq": seqno,
             "page_start": "1",
             "trxn_seq": seqno,
             "tranbr": date,
             "trandt": date,
             "longitude": "31.2579921",
             "page_size": "10",
             "orderSeq": calseqno,
             "phone_type": "0",
             "initiator_date": date,
             "inpucd": "985",
             "busisq": seqno,
             "rsa_key": "77777777777777",
             "inpusq": calseqno,
             "corpno": "985",
             "ip_address": "127.0.0.1",
             "busi_org_id": "025",
             "busiseqno": seqno,
             "terminal_os_type": "0",
             "tranus": "xadmin",
             "initiator_seq": calseqno,
             "pageIndex": "1",
             "pageno": "1",
             "pgsize": "1",
             "callseqno": calseqno,
             "channel_id": "LXIN"
         }
     }
     return Requester(headers=header, json=data)
Example #18
0
 def PATSCMSS5005(self):
     '''乐信授信申请'''
     seqno = generate_random_num(17)
     calseqno = "LN" + generate_random_num(12)
     name = get_name()
     mobile = get_tel()
     mail = get_email()
     cardNo = "6216610200016587010"
     applyNo = generate_random_num(18)
     userid = "user" + generate_random_num(9)
     random_sex = random.randint(1, 2)
     applyTime = get_time()
     date = get_date()
     idnumber = IdNumber.generate_id(random_sex)
     birthDate = IdNumber(idnumber).get_birthday()
     """影像件上传155 SFTP"""
     tar = get_tar(applyNo=applyNo)
     src = "D:\\Python_work\\walnuts_api\\api_test\\img\\" + tar
     # path = "/upload/LXIN/photo/20201208/" + tar
     path = "/upload/LXIN/photo/" + date + "/" + tar
     upload_LXIN(src, path)
     time.sleep(1)
     os.remove(src)
     """报文头信息"""
     header = {
         "api_id": "PATSCMSS5005",
         "country": "cn",
         "calseqno": seqno,
         "dapplication": "81001",
         "service": "PATSCMSS5005",
         "callseqno": calseqno,
         "dgroup": "onl01",
         "dversion": "1.0",
         "busiseqno": calseqno,
         "Content-Type": "application/json"
     }
     data = {
         "input": {
             "applyNo": applyNo,
             "channelCode": "LXIN",
             "applyTime": applyTime,
             "prodCode": "LXIN001",
             "applyAmt": "20000",
             "applyPeriod": "12",
             "userInfo": {
                 "userId":
                 userid,
                 "custName":
                 name,
                 "certNo":
                 idnumber,
                 "gender":
                 random_sex,
                 "cardNo":
                 cardNo,
                 "mobileNo":
                 mobile,
                 "emaill":
                 mail,
                 "certType":
                 "101",
                 "certValidStart":
                 "20200810",
                 "certValidEnd":
                 "99991231",
                 "birthDate":
                 birthDate,
                 "marryStatus":
                 "10",
                 "eduLevel":
                 "010",
                 "degree":
                 "5",
                 "monthIncome":
                 "5",
                 "inctry":
                 "156",
                 "liveStatus":
                 "5",
                 "liveYear":
                 "5",
                 "liveAddProvince":
                 "上海",
                 "liveAddCity":
                 "上海",
                 "liveAddArea":
                 "黄浦",
                 "liveAddress":
                 "滇池路81号嘉煜外滩中心",
                 "cardTpye":
                 "C",
                 "workInfo": {
                     "empName": "上海中银消费",
                     "empTelNo": "010-88888888",
                     "empIndustry": "J",
                     "empProp": "0",
                     "workAddProvince": "上海",
                     "workAddCity": "上海",
                     "workAddArea": "黄浦",
                     "workAddDetail": "滇池路74号中银消费",
                     "empZipCode": "200120",
                     "profession": "0",
                     "jobTit": "9",
                     "jobPos": "9",
                 },
                 "emergList": [{
                     "emergName": "马保国",
                     "emergRelation": "PARENT",
                     "emergTel": "15936617570",
                     "emergCertNo": "440300196308081042"
                 }]
             }
         },
         "comm_req": {
             "trantm": "752512",
             "initiator_system": "301",
             "app_version": "1.0",
             "trxn_branch": "77710",
             "call_seq": calseqno,
             "trxn_teller": "95068241",
             "sponsor_system": "810",
             "auth_user_id": "587046",
             "servtp": "TE",
             "sys_version": "1.0",
             "inpudt": date,
             "servno": "004",
             "busi_seq": seqno,
             "page_start": "1",
             "trxn_seq": seqno,
             "tranbr": date,
             "trandt": date,
             "longitude": "31.2579921",
             "page_size": "10",
             "orderSeq": calseqno,
             "phone_type": "0",
             "initiator_date": date,
             "inpucd": "985",
             "busisq": seqno,
             "rsa_key": "77777777777777",
             "inpusq": calseqno,
             "corpno": "985",
             "ip_address": "127.0.0.1",
             "busi_org_id": "025",
             "busiseqno": seqno,
             "terminal_os_type": "0",
             "tranus": "xadmin",
             "initiator_seq": calseqno,
             "pageIndex": "1",
             "pageno": "1",
             "pgsize": "1",
             "callseqno": calseqno,
             "channel_id": "LXIN"
         }
     }
     return Requester(headers=header, json=data)
Example #19
0
    def VIPS_apply(self):
        '''授信申请接口加密'''
        seqno = generate_random_str(9)
        userBirthDate = get_birthday()
        todaydate = get_date()

        # 客户信息
        custName = get_name()  # 客户名称
        usertel = get_tel()  # 电话号码
        spname = get_name()  # 配偶名称
        emergTel = get_tel()  # 配偶联系安话
        email = get_email()  # 邮件地址
        random_sex = random.randint(0, 1)
        idnumber = IdNumber.generate_id(random_sex)  # 客户身份证号码
        # 申请单号
        referno = "BO" + generate_random_num(16)
        """影像件上传"""
        applyImgPath = "/lttsdata/ICMS/VIPS" + referno + "/1.jpg"
        src_file = '/img\\'
        src_file = rename(src_file, referno)
        src_file = src_file + "\\1.jpg"
        upload(src_file, applyImgPath)

        data = {
            "header": {
                "requestNo": seqno,
                "timestamp": seqno,
                "merchantId": "VIP",
            },
            "body": {
                "openAccountOrderNo": referno,
                "userBaseInfo": {
                    "userName": custName,
                    "userMobile": usertel,
                    "idType": "0",
                    "userIdNo": idnumber,
                    "userIdIssueOrg": "公安局",
                    "userIdStartDate": "20180916",
                    "userIdExpiryDate": "20280916",
                    "userNation": "01",
                    "userSex": random_sex + 1,
                    "userBirthDate": userBirthDate,
                    "education": "DOCTOR",
                    "userMaritalStatus": "MARRIED_NO_CHILDREN",
                    "userOccupation": "020403",
                    "userCardNo": "622202649761688358",
                    "userCardType": "10",
                    "spouseName": spname,
                    "spouseMobile": emergTel,
                    "spouseCertType": "0",
                    "spouseIdNo": "110101199210015111",
                    "spouseExpiryDate": "20280916",
                    "spouseCorp": "上海市棉花糖厂",
                    "userCorp": "上海市棉花糖厂",
                    "userCorpAddr": "上海市浦东新区蓝天路778号",
                    "userCorpType": "",
                    "userCorpZip": "",
                    "userEmail": email,
                    "userResidenceAddrProvince": "上海市",
                    "userResidenceAddrCity": "上海市",
                    "userResidenceAddrCounty": "浦东新区",
                    "userResidenceAddr": "上海市浦东新区蓝天路233号",
                    "userLiveAddrProvince": "上海市",
                    "userLiveAddrCity": "上海市",
                    "userLiveAddrCounty": "浦东新区",
                    "userLiveAddr": "上海市浦东新区蓝天路233号",
                    "userLiveZip": "200120",
                    "userLiveStatus": "TENEMENT",
                },
                "contactInfo": {
                    "emergencyContactName": spname,
                    "emergencyContactMobile": emergTel,
                    "emergencyContactRelType": "SPOUSE",
                },
                "incomeInfo": {
                    "monthIncome": "6",
                    "yearIncome": "",
                    "familyIncom": "",
                    "moreIncome": "",
                    "taxIdCode": "",
                },
                "riskInfo": {
                    "limit": "20000",
                    "dailyIntRate": "",
                    "yearIntRate": "0.237600",
                    "vipApplyScore": "",
                },
                "extraInfo": {
                    "bizDate": todaydate,
                    "ocrType": "01",
                }
            }
        }

        return Requester(json=data)
Example #20
0
 def login(self, email, password):
     """
     登录接口
     """
     data = {'email': email, 'password': password}
     return Requester(data=data)
Example #21
0
 def queryApplyResult(self, applyNo):
     '''授信申请接口'''
     fun = Query_mingwen()
     data = fun.queryApply(applyNo).json()
     return Requester(json=data)
Example #22
0
    def ICMSLNTS0001(self,reqid):
        calseqno = generate_random_num(12)
        seqno = get_time()
        '''富士通回调'''
        header = {
            "Content-Type":"application/json;charset=UTF-8",
            "callseqno":calseqno,
            "consumercallseqno":calseqno,
            "busiseqno":calseqno,
            "Accept":"application/json;charset=UTF-8",
        }

        data = {
                "input":{
                "is_cust_tel_flag":"1",
                "req_id":reqid,
                "survey_records":[
                    {
                        "answer_text":"模拟结果",
                        "consistency":"0",
                        "survey_id":"JB0101"
                    },
                    {
                        "answer_text":"模拟结果",
                        "consistency":"0",
                        "survey_id":"JB0102"
                    },
                    {
                        "answer_text":"模拟结果",
                        "consistency":"0",
                        "survey_id":"JB0103"
                    },
                    {
                        "answer_text":"模拟结果",
                        "consistency":"0",
                        "survey_id":"JB0104"
                    },
                    {
                        "answer_text":"模拟结果",
                        "consistency":"0",
                        "survey_id":"JB0105"
                    },
                    {
                        "answer_text":"模拟结果",
                        "consistency":"0",
                        "survey_id":"JB0106"
                    },
                    {
                        "answer_text":"模拟结果",
                        "consistency":"0",
                        "survey_id":"JB0107"
                    }
                ],
                "tel_group":"2"
            },
            "sys":{
                "prcscd":"FASTReceiveTelverf",
                "servicecode":"FASTReceiveTelverf"
            },
            "comm_req":{
                "trantm":"094009",
                "authpw":"",
                "smryds":"",
                "initiator_system":"810",
                "trxn_branch":"42839",
                "rviast":"",
                "counts":"0",
                "trxn_teller":"000",
                "authtp":"",
                "trxn_code":"PO.POJD101",
                "consumercallseqno":seqno,
                "scenid":"",
                "servtp":"TE",
                "sms_send_info":[

                ],
                "inpudt":"20200711",
                "busi_seq":seqno,
                "page_start":"1",
                "computer_date":"20200824",
                "auto_chrg_info":{

                },
                "trxn_seq":seqno,
                "devitp":"",
                "trandt":"20200825",
                "page_size":"1",
                "authlv":"",
                "computer_time":"09:40:09 175",
                "spcapi":"",
                "initiator_date":"20200711",
                "custac":"",
                "encrypted_info":[

                ],
                "inpucd":"985",
                "custom_fields":[

                ],
                "inpusq":seqno,
                "corpno":"985",
                "gl_entries":[

                ],
                "authsq":"",
                "aubrlv":"",
                "trxn_desc":"TODO",
                "transq":seqno,
                "smrycd":"",
                "main_trxn_seq":seqno,
                "favalu":"",
                "passwd":"",
                "pageno":"1",
                "channel_id":"JIEB",
                "device":"",
                "warning_info":[

                ],
                "call_out_seq":seqno,
                "smsvrf":"",
                "routtp":"",
                "authfg":"",
                "sponsor_system":"810",
                "trxn_date":"20200824",
                "sub_system_id":"81001",
                "auth_user_id":"091743",
                "sessid":"",
                "aptrtp":"",
                "auth_reason":[

                ],
                "routky":"",
                "finance_info":{

                },
                "servno":"004",
                "authbr":"",
                "zonetp":"",
                "pagesize":"1",
                "tranbr":"985000",
                "cletid":"",
                "retrtm":"",
                "busisq":seqno,
                "authif":"",
                "ip_address":"127.0.0.1",
                "busi_org_id":"985",
                "authus":"",
                "fatype":"",
                "tranus":"xadmin",
                "terminal_os_type":"0",
                "workflowInfo":{

                },
                "consumersysid":"",
                "surefg":"",
                "pgsize":"",
                "spared":""
            }
        }

        return Requester(headers=header, json=data)
Example #23
0
 def get_book_list(self):
     return Requester()
Example #24
0
    def mifi_apply(self):
        '''授信申请'''
        seqno = generate_random_str(17)
        calseqno = "LN" + generate_random_num(12)
        name = get_name()
        mobile = get_tel()
        openId = generate_random_num(9)
        applyNo = "GU" + generate_random_num(10)
        random_sex = random.randint(1, 2)
        applyTime = get_time()
        idnumber = IdNumber.generate_id(random_sex)

        """sit2影像件上传"""
        filename = "IMG_" + applyNo + "_" + applyTime + ".tar.gz"
        src_file = 'D:\\Python_work\\walnuts_api\\api_test\\resources\\'
        applyImgPath = "/lttsdata/MIFI/img/" + filename
        src_file = rename(src_file,filename)
        upload(src_file, applyImgPath)

        # """sit影像件上传"""
        # filename = "IMG_" + applyNo + "_" + applyTime + ".tar.gz"
        # src_file = 'D:\\Python_work\\walnuts_api\\api_test\\resources\\'
        # applyImgPath = "/pc_zyxj/credit/img/20201102/" + filename
        # src_file = rename(src_file, filename)
        # upload_MI(src_file, applyImgPath)

        """存储客户信息"""
        custinfo = [name, mobile, idnumber, applyNo, openId, applyImgPath]
        writeExcel(sheetname=idnumber, custinfo=custinfo)
        """定义请求header和body"""
        header = {
            "api_id":"PATSMISS1001",
            "country":"cn",
            "calseqno":seqno,
            "dapplication":"81001",
            "service":"PATSMISS1001",
            "callseqno":calseqno,
            "dgroup":"onl01",
            "dversion":"1.0",
            "busiseqno":calseqno,
            "Content-Type":"application/json"
        }
        data = {
            "input":{
                "openId":openId,
                "applyNo":applyNo,
                "applyTime":applyTime,
                "channelCode":"MIFI",
                "timestamp":"",
                "bankInfo": {
                    "certNo": idnumber,
                    "name": name,
                    "mobile": mobile,
                    "bankName": "中国银行",
                    "cardNo": "6216610200016587010",
                    "idNum": idnumber
                },
                "userInfo": {
                    "name": name,
                    "mobile": mobile,
                    "idNum": idnumber,
                    "openId": openId
                },
                "extInfo":{
                    "incomeLevel":"6",
                    "applyImgPath":applyImgPath,
                    "applyAuthPath":"",
                    "industry":{
                        "firstCode":"B",
                        "firstName":"采矿业",
                        "secondCode":"C",
                        "secondName":"制造业"
                    },
                    "career":{
                        "firstCode":"Y",
                        "firstName":"不便分类的其他从业人员",
                        "secondCode":"Z",
                        "secondName":"未知"
                    },
                    "faceCmpScore":"",
                    "companyName":"棉花糖厂",
                    "riskData":{
                        "associateDeviceCount":"",
                        "devicePrintAssociateAccountCount":"",
                        "gPSConsistency":"",
                        "devicePrintNull":"",
                        "isMobileTypeChange":"",
                        "deviceIsBlack":"",
                        "associateDevicePrintCount":"",
                        "isFrequentlyUsedDevicePrint":"",
                        "devicePrintIsBlack":"",
                        "deviceAssociateAccountCount":"",
                        "deviceNull":"",
                        "deviceSystem":"",
                        "iPConsistency":"",
                        "iPConcentration":"",
                        "gPSConcentration":"",
                        "mobileTypeNull":"",
                        "isFrequentlyUsedDevice":""
                    },
                    "ocr":{
                        "nameOcr":name,
                        "numberOcr":idnumber,
                        "addressOcr":"上海",
                        "ethnicOcr":"汉",
                        "dueTimeOcr":"20100801_20300801",
                        "sexOcr":"male",
                        "issueOrgOcr":"公安局"
                    },
                }
            },
            "comm_req":{
                "trantm":"752512",
                "initiator_system":"301",
                "app_version":"1.0",
                "trxn_branch":"77710",
                "call_seq":calseqno,
                "trxn_teller":"95068241",
                "sponsor_system":"810",
                "auth_user_id":"587046",
                "servtp":"TE",
                "sys_version":"1.0",
                "inpudt":"20200604",
                "servno":"004",
                "busi_seq":seqno,
                "page_start":"1",
                "trxn_seq":seqno,
                "tranbr":"985000",
                "trandt":"20200604",
                "longitude":"31.2579921",
                "page_size":"10",
                "orderSeq":calseqno,
                "phone_type":"0",
                "initiator_date":"20200711",
                "inpucd":"985",
                "busisq":seqno,
                "rsa_key":"77777777777777",
                "inpusq":calseqno,
                "corpno":"985",
                "ip_address":"127.0.0.1",
                "busi_org_id":"025",
                "busiseqno":seqno,
                "terminal_os_type":"0",
                "tranus":"xadmin",
                "initiator_seq":calseqno,
                "pageIndex":"1",
                "pageno":"1",
                "pgsize":"1",
                "callseqno":calseqno,
                "channel_id":"MIFI"
            }
        }
        return Requester(headers=header, json=data)
Example #25
0
    def miun_apply(self):
        '''小米联合贷授信申请'''
        seqno = generate_random_str(7)
        calseqno = "LN" + generate_random_num(12)
        name = get_name()
        mobile = get_tel()
        userid = generate_random_str(9)
        applyNo = "GU" + generate_random_num(10)
        random_sex = random.randint(1, 2)
        applyTime = get_time()
        idnumber = IdNumber.generate_id(random_sex)

        # """影像件上传"""
        # filename = "IMG_" + applyNo + "_" + applyTime + ".tar.gz"
        # src_file = 'D:\\Python_work\\walnuts_api\\api_test\\resources\\'
        # applyImgPath = "/lttsdata/MIUN/20201105/" + "IMG_" + applyNo + "_" + applyTime + ".tar.gz"
        # src_file = rename(src_file, filename)
        # upload(src_file, applyImgPath)
        # """存储客户信息"""
        # custinfo = [name, mobile, idnumber, applyNo, applyImgPath]
        # writeExcel(sheetname=idnumber, custinfo=custinfo)
        """定义请求header和body"""
        header = {
            "api_id": "ICMSJKTS0102",
            "country": "cn",
            "calseqno": calseqno,
            "dapplication": "81001",
            "service": "ICMSJKTS0102",
            "callseqno": calseqno,
            "dgroup": "onl01",
            "dversion": "1.0",
            "busiseqno": calseqno,
            "Content-Type": "application/json"
        }
        data = {
            "input": {
                "businessMode": "1",
                "decReason": "",
                "extraData": {
                    "birthday": "19930506",
                    "signPlace": "上海市黄浦区滇池路街道办事处",
                    "career": {
                        "firstName": "国家机关、党群组织、企业、事业单位负责人",
                        "firstCode": "0",
                        "secondCode": "04",
                        "secondName": "事业单位负责人"
                    },
                    "education": "999",
                    "gender": "1",
                    "city": "上海",
                    "nation": "汉",
                    "industryes": "J",
                    "cardsday": "20190315",
                    "industry": {
                        "firstName": "金融业",
                        "firstCode": "J",
                        "secondCode": "67",
                        "secondName": "资本市场服务"
                    },
                    "faceScore": "90",
                    "nataddhomeAddressCity": "上海",
                    "province": "上海",
                    "pbcQuery": "",
                    "marriage": "-1",
                    "expireDate": "20240315",
                    "issueDate": "20190315",
                    "enterpriseName": "未知",
                    "monthlyIncome": "5",
                    "cardData":
                    "/lttsdata/MIUN/20201105/IMG_402071594408083456_20180809102350.tar.gz",
                    "area": "浦东新区",
                    "profession": "0",
                    "natadd": "上海市黄浦区滇池路81号",
                    "marrys": "90",
                    "address": "上海市黄浦区滇池路81号",
                    "race": "汉",
                    "unitName": "未知",
                    "sex": "男",
                    "liveCondition": "未知",
                    "authProtocol": "上海市黄浦区滇池路81号",
                    "cardeday": "20240315",
                    "incomeLevel": "5",
                    "nataddAddressArea": "浦东新区",
                    "pbcScore":
                    "{\"guar_cnt\":\"0\",\"cur_loan_rpm_amt\":\"0\",\"consu_cur_ovd_amt\":\"0\",\"car_ovdcnt_6mth\":\"0\",\"busi_account_cnt_12mth\":\"0\",\"ccard_cur_avg_amt\":\"0\",\"ccard_amtl_arp\":\"0\",\"scard_agency_cnt\":\"0\",\"agency_cnt_12mth\":\"0\",\"ccard_ovd_cnt_6mth\":\"0\",\"scard_cur_total_amt\":\"0\",\"acct_age\":\"0\",\"consu_cur_account_cnt\":\"0\",\"consu_cur_ovd_tm\":\"0\",\"busi_ovdcnt_12mth\":\"0\",\"loan_ovdmax_12mth\":\"0\",\"consu_ovdcnt_12mth\":\"0\",\"house_cur_bal\":\"0\",\"ccard_acct_age\":\"0\",\"loan_query_num_1mth\":\"0\",\"car_cur_ovd_tm\":\"0\",\"ccard_rpm_cnt\":\"0\",\"loan_account_cnt\":\"0\",\"ccard_arp_cnt\":\"0\",\"fund_amt\":\"0\",\"query_num_3mth\":\"0\",\"reports_time\":\"20201105\",\"loan_query_num_6mth\":\"0\",\"ovd_maxterm_3mth\":\"0\",\"consu_account_cnt_12mth\":\"0\",\"loan_ovdcnt_12mth\":\"0\",\"ccard_ovd_bal\":\"0\",\"enfore_cnt\":\"0\",\"house_cur_total_amt\":\"0\",\"ccard_disnormal_cnt\":\"0\",\"house_cur_account_cnt\":\"0\",\"avg_hfamt_12mth\":\"0\",\"ccard_ovd_maxamt_12mth\":\"0\",\"cur_loan_ovd_tm\":\"0\",\"ccard_amtc_utl\":\"0\",\"ovd_maxterm_6mth\":\"0\",\"scard_cur_avgbal_6mth\":\"0\",\"scard_cnt_12mth\":\"0\",\"car_cur_bal\":\"0\",\"house_ovdcnt_12mth\":\"0\",\"ccard_cnt_12mth\":\"0\",\"ccard_amtc_aut_p6m\":\"0\",\"scard_total_amt\":\"0\",\"scard_ovd_cnt\":\"0\",\"query_age\":\"0\",\"consu_cur_bal\":\"0\",\"scard_amtl_rpm\":\"0\",\"busi_cur_rpm_amt\":\"0\",\"scard_cnt\":\"0\",\"car_cur_total_amt\":\"0\",\"loan_total_amt\":\"0\",\"consu_ovdcnt_6mth\":\"0\",\"busi_cur_bal\":\"0\",\"ccard_ovd_amt\":\"0\",\"ccard_cnt_6mth\":\"0\",\"query_num_6mth\":\"0\",\"car_cur_account_cnt\":\"0\",\"house_cur_rpm_amt\":\"0\",\"loan_acct_age\":\"0\",\"agency_cnt_6mth\":\"0\",\"ccard_ovd_cnt_12mth\":\"0\",\"ovd_cnt_3mth\":\"0\",\"ccard_ovd_tm\":\"0\",\"car_cur_rpm_amt\":\"0\",\"ovd_cnt_12mth\":\"0\",\"scard_cur_avg_amt\":\"0\",\"guar_lvlmax\":\"0\",\"consu_cur_rpm_amt\":\"0\",\"car_account_cnt_12mth\":\"0\",\"loan_ovdmax\":\"0\",\"query_num_1mth\":\"0\",\"ccard_credit_cnt\":\"0\",\"ccard_query_num_1mth\":\"0\",\"last_query_age\":\"0\",\"ovd_cnt_6mth\":\"0\",\"cur_loan_account_cnt\":\"0\",\"house_ovdcnt_6mth\":\"0\",\"disp_cnt\":\"0\",\"per_query_num_1mth\":\"0\",\"ccard_cur_cnt\":\"0\",\"ccard_amtl_rpm\":\"0\",\"cur_loan_bal\":\"0\",\"loan_ovdcnt_6mth\":\"0\",\"scard_ovd_amt\":\"0\",\"busi_ovdcnt_6mth\":\"0\",\"consu_cur_total_amt\":\"0\",\"scard_od_amt_180up\":\"0\",\"busi_cur_ovd_amt\":\"0\",\"busi_cur_account_cnt\":\"0\",\"ccard_normal_cnt\":\"0\",\"ccard_query_num_6mth\":\"0\",\"loan_ovdmax_6mth\":\"0\",\"loan_query_num_3mth\":\"0\",\"ccard_ovd_cnt\":\"0\",\"car_ovdcnt_12mth\":\"0\",\"ccard_bad_bal\":\"0\",\"cur_loan_total_amt\":\"0\",\"scard_disnormal_cnt\":\"0\",\"ovd_maxterm_12mth\":\"0\",\"cur_loan_ovd_amt\":\"0\",\"ccard_query_num_3mth\":\"0\",\"compen_cnt\":\"0\",\"ccard_cnt\":\"0\",\"per_query_num_6mth\":\"0\",\"busi_cur_total_amt\":\"0\",\"ccard_ovd_maxamt_6mth\":\"0\",\"scard_acct_age\":\"0\",\"car_cur_ovd_amt\":\"0\",\"account_cnt\":\"0\",\"scard_amtl_arp\":\"0\",\"house_cur_ovd_tm\":\"0\",\"house_account_cnt_12mth\":\"0\",\"scard_cur_cnt\":\"0\",\"house_cur_ovd_amt\":\"0\",\"per_query_num_3mth\":\"0\",\"cur_account_cnt\":\"0\",\"ccard_avg_amt\":\"0\",\"consu_account_cnt_6mth\":\"0\",\"scard_max_bal\":\"0\",\"busi_cur_ovd_tm\":\"0\",\"scard_overdraft_cnt\":\"0\",\"scard_normal_cnt\":\"0\"}",
                    "authority": "上海市黄浦区滇池路街道办事处",
                    "nataddAddressProvince": "上海"
                },
                "bankMobile": "15014486030",
                "loanBefore": "Y",
                "userTel": "15014486030",
                "custName": "客户920177667",
                "userId": "A6386353928",
                "cardNo": "6216610200016587010",
                "certNo": "130101199111230127",
                "applyAmont": "20000",
                "rateType": "D",
                "applyProduct": "02050012",
                "certtp": "101",
                "dyrate": "0.03",
                "creditResult": "PAS",
                "applyNo": "622944023103",
                "applyTime": "19760527101051",
                "loanCategory": "0",
                "channelCode": "MIUN"
            },
            "comm_req": {
                "trantm": "818557",
                "initiator_system": "301",
                "app_version": "1.0",
                "trxn_branch": "79470",
                "call_seq": seqno,
                "trxn_teller": "29502258",
                "sponsor_system": "810",
                "auth_user_id": "062169",
                "servtp": "TE",
                "sys_version": "1.0",
                "inpudt": "20200604",
                "servno": "004",
                "busi_seq": seqno,
                "page_start": "1",
                "trxn_seq": seqno,
                "tranbr": "985000",
                "trandt": "20200604",
                "longitude": "31.2579921",
                "page_size": "10",
                "orderSeq": seqno,
                "phone_type": "0",
                "initiator_date": "20200711",
                "inpucd": "985",
                "busisq": seqno,
                "rsa_key": "77777777777777",
                "inpusq": seqno,
                "corpno": "985",
                "ip_address": "127.0.0.1",
                "busi_org_id": "025",
                "busiseqno": seqno,
                "terminal_os_type": "0",
                "tranus": "xadmin",
                "initiator_seq": seqno,
                "pageIndex": "1",
                "pageno": "1",
                "pgsize": "1",
                "callseqno": seqno,
                "channel_id": "MIUN"
            }
        }
        return Requester(headers=header, json=data)
Example #26
0
 def nxloan(self, name, custac, idtfno, ordrid, cntrno, acctno, appday,
            chcksq):
     """放款"""
     seqno = generate_random_num(17)
     header = {
         "dserviceId": "CORELNTS1903",
         "api_id": "CORELNTS1903",
         "country": "cn",
         "dapplication": "01001",
         "callseqno": seqno,
         "dgroup": "01",
         "dversion": "1.0",
         "busiseqno": seqno,
         "Content-Type": "application/json"
     }
     data = {
         "input": {
             "rpacno": acctno,
             "irrvtp": "0",
             "acctbr": "076060301",
             "guarty": "4",
             "irflvl": "",
             "exusid": "",
             "chckdt": appday,
             "frstmd": "1",
             "cgacno": "",
             "repyfm": "1MAD",
             "repyls": [],
             "trgtbr": "",
             "ordrid": ordrid,
             "loandt": appday,
             "trgtfn": "",
             "pychnl": "JDJR",
             "loanus": "",
             "irrvfm": "",
             "tocgrt": "",
             "irdyfg": "Y",
             "cntrno": cntrno,
             "sprdna": "微贷款",
             "acctna": name,
             "prodcd": "0204",
             "period": "12M",
             "lnacno": acctno,
             "lnrtir": "27.375",
             "custac": custac,
             "crcycd": "CNY",
             "trgtac": "",
             "matudt": "",
             "schdtp": "3",
             "idtfno": idtfno,
             "corpno": "985",
             "idtftp": "101",
             "cardno": acctno,
             "incftp": "2",
             "tranam": "1000",
             "intrcd": "",
             "sprdid": "0204",
             "trgtna": "",
             "chcksq": chcksq,
             "bkintr": "",
             "grprdy": "5"
         },
         "comm_req": {
             "xcopfg": "0",
             "inpucd": "985",
             "counts": "0",
             "busisq": seqno,
             "corpno": "985",
             "xdcnfg": "1",
             "tranus": "9852001",
             "servtp": "TE",
             "servno": "004",
             "pageno": "1",
             "pgsize": "10",
             "tranbr": "985000",
             "channel_id": "JDJR"
         }
     }
     return Requester(headers=header, json=data)
Example #27
0
    def ADMIT_APPLY(self,creditRate,checkStatus):
        """授信终审回调"""
        seqno = generate_random_str(17)
        calseqno = "LN" + generate_random_num(12)
        applid = "BO"+generate_random_num(16)

        header = {
            "dserviceId": "PATSJBSS1002",
            "api_id": "PATSJBSS1002",
            "country": "cn",
            "dapplication": "01001",
            "callseqno": calseqno,
            "dgroup": "01",
            "dversion": "1.0",
            "busiseqno": calseqno,
            "Content-Type": "application/json"
        }

        data = {
            "input": {
                "applid": "BO2020112400000773",
                "bizType": "ADMIT_APPLY",
                "crdtno": "7010000000370",
                "creditRate": creditRate,
                "resultCode": "RA_APPROVAL",
                "source": "USER",
                "serialNo": "20201205153900000000000000001345",
                "resultMsg": "成功",
                "requestTime": "2020-12-05 15:39:00",
                "partnerNo": "C0000002",
                "certNo": "362329198604053365",
                "checkStatus": checkStatus,
                "productCode": "JB",
                "checkTime": "20201205153810",
                "checkAmount": "5000000",
                "applyNo": "208084027184396882A",
                "expiryTime": "20210605",
                "custId": "B00000000416",
                "checkOperator": "chenyiruo",
                "creditAmt": "5000000",
                "creditNo": "208084027184396882A",
                "bizMode": "PLATFORM_1"
            },
            "comm_req": {
                "trantm": "844568",
                "initiator_system": "301",
                "app_version": "1.0",
                "trxn_branch": "06924",
                "call_seq": seqno,
                "trxn_teller": "07988122",
                "sponsor_system": "810",
                "auth_user_id": "153148",
                "servtp": "TE",
                "sys_version": "1.0",
                "inpudt": "20200604",
                "servno": "004",
                "busi_seq": seqno,
                "page_start": "1",
                "trxn_seq": seqno,
                "tranbr": "985000",
                "trandt": "20200604",
                "longitude": "31.2579921",
                "page_size": "10",
                "orderSeq": seqno,
                "phone_type": "0",
                "initiator_date": "20200711",
                "inpucd": "985",
                "busisq": calseqno,
                "rsa_key": "77777777777777",
                "inpusq": seqno,
                "corpno": "985",
                "ip_address": "127.0.0.1",
                "busi_org_id": "025",
                "busiseqno": seqno,
                "terminal_os_type": "0",
                "tranus": "xadmin",
                "initiator_seq": seqno,
                "pageIndex": "1",
                "pageno": "1",
                "pgsize": "1",
                "callseqno": seqno,
                "channel_id": "JIEB"
            },
        }
        return Requester(headers=header, json=data)
Example #28
0
    def miun_pay(self):
        '''用信申请'''
        seqno = generate_random_str(7)
        calseqno = "LN" + generate_random_num(12)

        header = {
            "api_id": "ICMSJKTS0103",
            "country": "cn",
            "calseqno": calseqno,
            "dapplication": "81001",
            "service": "ICMSJKTS0103",
            "callseqno": calseqno,
            "dgroup": "onl01",
            "dversion": "1.0",
            "busiseqno": calseqno,
            "Content-Type": "application/json"
        }
        data = {
            "input": {
                "dailyIntRate": "0.002376",
                "userTel": "15014486030",
                "custName": "客户920177667",
                "riskData": {
                    "loaninterestscore": "",
                    "locationscore": "",
                    "travelinterestscore": "",
                    "financeinterestcore": "",
                    "shoppinginterestscore": "",
                    "lifeserviceinterestscore": "",
                    "lthrepaymonthsscore": "",
                    "totalrepaymonthsscore": "",
                    "launchdauscore": "",
                    "socialinterestscore": "",
                    "generalscore": "",
                    "readinginterestscore": "",
                    "gameinterestscore": ""
                },
                "userId": "A6386353928",
                "cardNo": "6216606301234560403",
                "loanAmount": "1000",
                "paymentNo": "768304095060",
                "certNo": "130101199111230133",
                "bankAmount": "10000",
                "certtp": "101",
                "loanPurpose": "20",
                "orderProduct": "02050012",
                "loanPeriod": "12",
                "channelCode": "MIUN"
            },
            "comm_req": {
                "trantm": "065575",
                "initiator_system": "301",
                "app_version": "1.0",
                "trxn_branch": "51636",
                "call_seq": "393713849625",
                "trxn_teller": "79632141",
                "sponsor_system": "810",
                "auth_user_id": "419195",
                "servtp": "TE",
                "sys_version": "1.0",
                "inpudt": "20200604",
                "servno": "004",
                "busi_seq": seqno,
                "page_start": "1",
                "trxn_seq": seqno,
                "tranbr": "985000",
                "trandt": "20200604",
                "longitude": "31.2579921",
                "page_size": "10",
                "orderSeq": seqno,
                "phone_type": "0",
                "initiator_date": "20200711",
                "inpucd": "985",
                "busisq": seqno,
                "rsa_key": "77777777777777",
                "inpusq": seqno,
                "corpno": "985",
                "ip_address": "127.0.0.1",
                "busi_org_id": "025",
                "busiseqno": seqno,
                "terminal_os_type": "0",
                "tranus": "xadmin",
                "initiator_seq": seqno,
                "pageIndex": "1",
                "pageno": "1",
                "pgsize": "1",
                "callseqno": seqno,
                "channel_id": "MIFI"
            }
        }
        return Requester(headers=header, json=data)