Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
Y
yingtz
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
楼超奇
yingtz
Commits
3f1d7aad
Commit
3f1d7aad
authored
Jun 16, 2016
by
RobertDing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
FIX - 基本调试完成
parent
89a3b434
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
84 additions
and
6 deletions
+84
-6
borrow.py
borrow.py
+76
-3
request.py
request.py
+4
-3
settings.py
settings.py
+4
-0
No files found.
borrow.py
View file @
3f1d7aad
...
...
@@ -77,9 +77,82 @@ class CreateLoad(RunHelper):
'type'
:
121
,
'applyTime'
:
int
(
datetime
.
datetime
.
now
()
.
timestamp
()),
'amount'
:
10000
,
'periodType'
:
30
,
'periods'
:
1
,
'repayType'
:
2
,
'periodType'
:
31
,
'periods'
:
6
,
'repayType'
:
3
,
'extendInfo'
:
{
'loanApplyNo'
:
'923123998844'
}
}
self
.
endpoint
=
'createLoan'
pass
class
LoanDetail
(
RunHelper
):
def
__init__
(
self
):
self
.
params
=
{
'uid'
:
settings
.
UID
,
'loanOrderId'
:
settings
.
LOANORDERID
,
}
self
.
endpoint
=
'loanDetail'
class
LoadAuditDetail
(
RunHelper
):
def
__init__
(
self
):
self
.
params
=
{
'uid'
:
settings
.
UID
,
# 'loanId': settings.LOANID,
'loanOrderId'
:
settings
.
LOANORDERID
,
}
self
.
endpoint
=
'loanAuditDetail'
pass
class
ConfirmLoan
(
RunHelper
):
def
__init__
(
self
):
self
.
params
=
{
'uid'
:
settings
.
UID
,
'loanOrderId'
:
settings
.
LOANORDERID
,
'result'
:
1
,
}
self
.
endpoint
=
'confirmLoan'
pass
class
t
(
RunHelper
):
def
__init__
(
self
):
self
.
params
=
{
''
:
1
,
}
self
.
endpoint
=
''
pass
class
RepayLoan
(
RunHelper
):
def
__init__
(
self
):
self
.
params
=
{
'uid'
:
settings
.
UID
,
'loanOrderId'
:
settings
.
LOANORDERID
,
'isAdvance'
:
0
,
}
self
.
endpoint
=
'repayloan'
pass
class
LoanRepayDetail
(
RunHelper
):
def
__init__
(
self
):
self
.
params
=
{
'uid'
:
settings
.
UID
,
'loanOrderId'
:
settings
.
LOANORDERID
,
'isAdvance'
:
0
,
}
self
.
endpoint
=
'loanRepayDetail'
pass
request.py
View file @
3f1d7aad
...
...
@@ -41,9 +41,10 @@ class Request(object):
return
_fetch
def
encrypt_param
(
self
,
params
):
one_time_key
=
Random
.
new
()
.
read
(
1
6
)
one_time_key
=
Random
.
new
()
.
read
(
1
28
)
rsa_cipher
=
PKCS1_v1_5
.
new
(
self
.
yingtz_key
)
key
=
base64
.
b16encode
(
rsa_cipher
.
encrypt
(
one_time_key
))
key1
=
base64
.
b16encode
(
rsa_cipher
.
encrypt
(
one_time_key
[:
117
]))
key2
=
base64
.
b16encode
(
rsa_cipher
.
encrypt
(
one_time_key
[
-
11
:]))
content
=
json
.
dumps
(
params
)
r4_cipher
=
ARC4
.
new
(
one_time_key
)
...
...
@@ -52,7 +53,7 @@ class Request(object):
sign
=
hashlib
.
md5
(
raw_content
+
settings
.
MD5KEY
)
.
hexdigest
()
return
{
'key'
:
str
(
key
,
encoding
=
'utf8'
),
'key'
:
str
(
key
1
+
key2
,
encoding
=
'utf8'
),
'sign'
:
sign
,
'content'
:
str
(
encoded_content
,
encoding
=
'utf8'
),
'partner'
:
settings
.
PARTNER
...
...
settings.py
View file @
3f1d7aad
...
...
@@ -30,3 +30,7 @@ SMSCODE = '298578'
CARDID
=
'104599'
BANKCARDID
=
'1112864'
LOANID
=
0
LOANORDERID
=
69181659274051584
CONTACTNO
=
'923123998844'
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment