Commit a6878b64 authored by 桂秋月's avatar 桂秋月

new html

parent e3706aa2
[channnel] [channnel]
a = 1 a = 1
channnelid = 159866 channnelid = 159866
fundcorpid = 480 fundcorpid = 580
merchantid = 27 merchantid = 27
execjsonversion = {} # {'configuration_center':'1.0.1','zhongtai_hetong':'1.0.1','account':'2.0','risk':'2.0','trade':'2.0','msg':'1.0.1'} execjsonversion = {} # {'configuration_center':'1.0.1','zhongtai_hetong':'1.0.1','account':'2.0','risk':'2.0','trade':'2.0','msg':'1.0.1'}
issimple = 1 issimple = 1
...@@ -10,7 +10,7 @@ issimple = 1 ...@@ -10,7 +10,7 @@ issimple = 1
usered = qa usered = qa
defaluttime = 2 defaluttime = 2
timeout = 20 timeout = 20
phone_no = 13211111240 phone_no = 13683241115
environment = qa3 environment = qa3
term = 6 term = 6
amount = 10000 amount = 10000
...@@ -22,10 +22,10 @@ amounts = [2000,4000,6000,10000,20000,30000] ...@@ -22,10 +22,10 @@ amounts = [2000,4000,6000,10000,20000,30000]
productids = [1,4] productids = [1,4]
repaymenttypes = [微信,支付宝,银行卡] repaymenttypes = [微信,支付宝,银行卡]
counter = 0 counter = 0
totalamount = 6875.33 totalamount = 10000.0
loanid = 5 loanid = 41
totalloanamount = 1004.61 totalloanamount = 1004.61
termno = 5 termno = 9
verificationid = BK751417141686117278698537 verificationid = BK751417141686117278698537
applyno = AN000000144618983447142400 applyno = AN000000144618983447142400
...@@ -33,23 +33,23 @@ applyno = AN000000144618983447142400 ...@@ -33,23 +33,23 @@ applyno = AN000000144618983447142400
password = 123456aaa password = 123456aaa
biztype = 0 biztype = 0
token = eb298e58-b438-4437-ab29-70973e7210a2 token = eb298e58-b438-4437-ab29-70973e7210a2
passportapitoken = a78e9038-92e6-46a3-a66e-309edf189019 passportapitoken = 9b5b6b22-8d8a-4097-98c3-8f0aa9e98621
opapitoken = 5375b6c5-527e-4c3a-8c66-b9ef96a7412d opapitoken = 5375b6c5-527e-4c3a-8c66-b9ef96a7412d
cardnoprovider = ICBC cardnoprovider = ICBC
apitoken = 87ff232a-d8bd-427d-9455-43e41146703a apitoken = ed02234f-27e5-4f50-9cda-3457ab98fce0
mapitoken = ddf2c21774ea6741f278a7b7172dbe9a3dd7 mapitoken = b8e155bc7024774a3a7af747407d9ecbdf2d
quotarecordorderno = {'msg': None, 'code': '0000', 'data': []} quotarecordorderno = {'msg': None, 'code': '0000', 'data': []}
hetongtoken = 190db434e2e91c21086623c0b7cc22af hetongtoken = 190db434e2e91c21086623c0b7cc22af
cardno = 6222020218008727171 cardno = 6222020221310916540
msgtoken = {token} msgtoken = {token}
sceneid = 5 sceneid = 6
deadline = 1589946187000 deadline = 1590479477000
paymenttoken = 62979fec-b060-4b0f-85b8-d01691b5b9e1 paymenttoken = 62979fec-b060-4b0f-85b8-d01691b5b9e1
requestid = 63119890137088 requestid = 63119890137088
vcode = 238345 vcode = 238345
applyno = AN000000143183669801000960 applyno = AN000000143183669801000960
voicetoken = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODgxNTE1OTgsInVzZXJuYW1lIjoidHgueHlxYiJ9.W4fKn-tdbOORELBfUd6KOjrygjzWWFY0zf6dmcqsjiI voicetoken = eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE1ODgxNTE1OTgsInVzZXJuYW1lIjoidHgueHlxYiJ9.W4fKn-tdbOORELBfUd6KOjrygjzWWFY0zf6dmcqsjiI
logindata = phone=18801012591 logindata = phone=13683241115
[testsuit] [testsuit]
cases_numbertemp = [{'passportapi':[816,817,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,574,575,577,576,368,371,372,374,375,376,378,363,364,369,370,409,373,410,412,411,413,387, 388,389,390, 391, 392,389, 390, 394, 395, 396, 397]}] cases_numbertemp = [{'passportapi':[816,817,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,574,575,577,576,368,371,372,374,375,376,378,363,364,369,370,409,373,410,412,411,413,387, 388,389,390, 391, 392,389, 390, 394, 395, 396, 397]}]
...@@ -85,5 +85,5 @@ case_number_case_fengkong = [{'koala_risk':[699]},{'usercenter':[500]},{'risk':[ ...@@ -85,5 +85,5 @@ case_number_case_fengkong = [{'koala_risk':[699]},{'usercenter':[500]},{'risk':[
case_number_case_fangkuan = [{'ka_koala_loan':[801,818,802,798,799,800,820]}] case_number_case_fangkuan = [{'ka_koala_loan':[801,818,802,798,799,800,820]}]
[sqldata] [sqldata]
sqldata = [404, '6222020243457719151', 0, 0, 0, 0, '沈博裕', '12011019670327487X', '13805732771'] sqldata = [404, '6222989064429387', 'xyqb', '沈博裕', '12011019670327487X', '13805732771']
...@@ -127,6 +127,8 @@ class requestResult: ...@@ -127,6 +127,8 @@ class requestResult:
casejson = dealbodyHeaderType(self.config, self.casefile, sqlData) casejson = dealbodyHeaderType(self.config, self.casefile, sqlData)
#print("+++"*20)
casejson =dealSign(casejson) casejson =dealSign(casejson)
#print(casejson) #print(casejson)
header=casejson.get('header')or casejson.get('Headers') header=casejson.get('header')or casejson.get('Headers')
...@@ -693,10 +695,10 @@ if __name__ == '__main__': ...@@ -693,10 +695,10 @@ if __name__ == '__main__':
#cases_number= [323, 382, 383, 384, 385,361, 402, 403, 404, 405,401] #cases_number= [323, 382, 383, 384, 385,361, 402, 403, 404, 405,401]
cases_number= [323, 382, 383, 384, 385,361, 402, 403, 404, 405] cases_number= [323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,574,575,577,576,368,371,372,374,375,376,378,363,364,369,370,409,373,410,412,411]
cases_number=[787] #cases_number=[609]
#cases_number = [6377] #cases_number = [6377]
#cases_number=[852] cases_number=[787]
#cases_number = [369,370,409,373] #cases_number = [369,370,409,373]
#cases_number=[358, 359, 360,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,368,371,372,374,375,376,378,363,364,369,370] #cases_number=[358, 359, 360,323, 382, 383, 384, 385,361, 402, 403, 404, 405,401,399,407,367,368,371,372,374,375,376,378,363,364,369,370]
...@@ -704,7 +706,7 @@ if __name__ == '__main__': ...@@ -704,7 +706,7 @@ if __name__ == '__main__':
#casefile = [{'passportapi':['323.json', '382.json','383.json', '384.json', '385.json']},{'payment': t.split(',')}] #casefile = [{'passportapi':['323.json', '382.json','383.json', '384.json', '385.json']},{'payment': t.split(',')}]
casefile =[{'trade': t.split(',')}] #casefile =[{'passportapi': t.split(',')}]
casefile = [{'ka_koala_repay': t.split(',')}] casefile = [{'ka_koala_repay': t.split(',')}]
......
...@@ -118,19 +118,24 @@ def getGlobalParam(config,usered): ...@@ -118,19 +118,24 @@ def getGlobalParam(config,usered):
def dealSign(casejson): def dealSign(casejson):
security_code='security_code=6jby7jiy4tv3scaj8pw6sgyxips05afe' security_code='security_code=6jby7jiy4tv3scaj8pw6sgyxips05afe'
body=casejson.get('body') body=casejson.get('body')
appId=body.get('app_id')
if body and isinstance(body,dict): if body and isinstance(body,dict):
if body.get('sign'): #print("+++" * 20)
body=dict(sorted(body.items()))
if len(str(body.get('sign')))>=0 and type=='md5': if body.get('sign') or body.get('sign')==0:
body=dict(sorted(body.items()))
#print("+++"*20)
if len(str(body.get('sign')))>=0:# and type=='md5':
temp='' temp=''
for k,v in body.items(): for k,v in body.items():
if not k=='sign': if not k=='sign':
t=k+"="+str(v)+"&" t=k+"="+str(v)+"&"
temp+=t temp+=t
temp=temp+security_code if appId and appId=='xyqb':
#print('temp=====', temp) temp=temp+'security_code=cd6yFfEgI0t67JaOYtLxTqXvumfJbsZi'
else:
temp=temp+security_code
print('temp=====', temp)
casejson['body']['sign']=hashlib.md5(temp.encode()).hexdigest() casejson['body']['sign']=hashlib.md5(temp.encode()).hexdigest()
#print(casejson) #print(casejson)
return casejson return casejson
......
...@@ -20,7 +20,8 @@ ...@@ -20,7 +20,8 @@
"reservePhoneNumber": "{{phone_no}}", "reservePhoneNumber": "{{phone_no}}",
"userId": "%s" "userId": "%s"
}, },
"env":"test1",
"header": { "header": {
"Content-Type": "application/json" "Content-Type": "application/json"
} }
} }
\ No newline at end of file
...@@ -3,14 +3,16 @@ ...@@ -3,14 +3,16 @@
"commit": "发起还款(API)(POST)", "commit": "发起还款(API)(POST)",
"url": "/v1/repayment/pay", "url": "/v1/repayment/pay",
"casename": "token", "casename": "token",
"sql": "select distinct d.`loan_application_history_id`,p1.card_no, 0 as noncestr,0 as timestamp ,\r\n0 as sign,0 as app_id,c.`name`,c.`id_no`,c.`phone_no` from xyqb_user.`user_detail`c\r\ninner join xyqb.`loan_application_manifest_history` d\r\nINNER JOIN xyqb.loan_application_history a\r\nINNER JOIN xyqb.repayment_plan e \r\nINNER JOIN payment_center.card_bind_info p1\r\nINNER JOIN payment_center.user p2\r\non a.id=d.loan_application_history_id and p1.user_id=p2.id and p2.xyqb_uid=c.user_id and p2.xyqb_uid=a.user_id and \r\ne.loan_application_history_id=d.loan_application_history_id\r\nwhere d.`funding_corp_id`=100010 and d.`loan_application_history_id`={{sqldata_0}} and a.progress=15 order by rand() limit 1;", "sql": "select distinct d.`loan_application_history_id`,p1.card_no,'xyqb' as app_id,c.`name`,c.`id_no`,c.`phone_no` from xyqb_user.`user_detail`c\r\ninner join xyqb.`loan_application_manifest_history` d\r\nINNER JOIN xyqb.loan_application_history a\r\nINNER JOIN xyqb.repayment_plan e \r\nINNER JOIN payment_center.card_bind_info p1\r\nINNER JOIN payment_center.user p2\r\non a.id=d.loan_application_history_id and p1.user_id=p2.id and p2.xyqb_uid=c.user_id and p2.xyqb_uid=a.user_id and \r\ne.loan_application_history_id=d.loan_application_history_id\r\nwhere d.`funding_corp_id`=100010 and d.`loan_application_history_id`={{sqldata_0}} and a.progress=15 order by rand() limit 1;",
"db": "xyqb", "db": "xyqb",
"result": { "result": {
"code": "0" "code": "0"
}, },
"type": "koala", "type": "koala",
"rule": { "rule": {
"ip": "fakeinfo('ip')" "ip": "fakeinfo('ip')",
"noncestr":"fakeinfo('random')",
"timestamp":"gettime(0,flag=1)"
}, },
"body": { "body": {
"loan_id": "%s", "loan_id": "%s",
...@@ -20,11 +22,11 @@ ...@@ -20,11 +22,11 @@
"ip": "%s", "ip": "%s",
"noncestr": "%s", "noncestr": "%s",
"timestamp": "%s", "timestamp": "%s",
"sign": "%s",
"app_id": "%s", "app_id": "%s",
"user_name": "%s", "user_name": "%s",
"id_no": "%s", "id_no": "%s",
"reserved_phone": "%s" "reserved_phone": "%s",
"sign": "%s"
}, },
"header": { "header": {
"Content-Type": "application/x-www-form-urlencoded" "Content-Type": "application/x-www-form-urlencoded"
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
"repayOrderNo": "%s", "repayOrderNo": "%s",
"ip": "%s", "ip": "%s",
"cardNo": "%s", "cardNo": "%s",
"merchantId": "10002", "merchantId": "10007",
"xyqbUserId": "%s", "xyqbUserId": "%s",
"repaymentDescription": "%s", "repaymentDescription": "%s",
"divideParam": "[{'ledgerNo':64,'divideValue':'2568.68'},{'ledgerNo':1008,'divideValue':'252.00'}]", "divideParam": "[{'ledgerNo':64,'divideValue':'2568.68'},{'ledgerNo':1008,'divideValue':'252.00'}]",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment