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)
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)
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)
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)
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)
def PATSCMSS7001(self): '''借款支用申请-标准''' seqno = generate_random_num(17) calseqno = "LN" + generate_random_num(12) date = get_date() applyTime = get_time() 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 = { "input": { "applyNo": "", "paymentApplyNo": "", "channelCode": "LXIN", "userId": "", "applyTime": "", "payDayRule": "", "payDay": "", "cashPayFlag": "", "payType": "", "acctName": "", "acctNo": "", "acctType": "", "openAcctBank": "", "mobileNo": "" }, "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)
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)
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)