Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhichan
Overview
Overview
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
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
蒋勇
zhichan
Commits
051e9b00
Commit
051e9b00
authored
Dec 10, 2019
by
宋毅
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tj
parent
35473eec
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
9 deletions
+45
-9
igirl-web/app/base/api/impl/testApi.js
+12
-9
igirl-web/app/base/service/impl/utilstlbankSve.js
+33
-0
No files found.
igirl-web/app/base/api/impl/testApi.js
View file @
051e9b00
...
@@ -9,6 +9,7 @@ var moment = require('moment');
...
@@ -9,6 +9,7 @@ var moment = require('moment');
const
md5
=
require
(
"MD5"
);
const
md5
=
require
(
"MD5"
);
class
TestApi
{
class
TestApi
{
constructor
()
{
constructor
()
{
this
.
utilstlbankSve
=
System
.
getObject
(
"service.utilstlbankSve"
);
this
.
bytmmonitSve
=
System
.
getObject
(
"service.bytmmonitSve"
);
this
.
bytmmonitSve
=
System
.
getObject
(
"service.bytmmonitSve"
);
this
.
utilscloudSve
=
System
.
getObject
(
"service.utilscloudSve"
);
this
.
utilscloudSve
=
System
.
getObject
(
"service.utilscloudSve"
);
this
.
trademarkSve
=
System
.
getObject
(
"service.trademarkSve"
);
this
.
trademarkSve
=
System
.
getObject
(
"service.trademarkSve"
);
...
@@ -40,15 +41,17 @@ class TestApi {
...
@@ -40,15 +41,17 @@ class TestApi {
return
y
+
"-"
+
m
.
substring
(
m
.
length
-
2
,
m
.
length
)
+
"-"
+
d
.
substring
(
d
.
length
-
2
,
d
.
length
);
return
y
+
"-"
+
m
.
substring
(
m
.
length
-
2
,
m
.
length
)
+
"-"
+
d
.
substring
(
d
.
length
-
2
,
d
.
length
);
}
}
async
test
(
obj
)
{
async
test
(
obj
)
{
// try {
try
{
// var result = await this.businesscompanySve.recycleBusiness();
// // var result = await this.businesscompanySve.freeClaimOperation({ id: 41, company_id: 4 }, "xz", [1095, 1113]);
var
result
=
await
this
.
utilstlbankSve
.
getH5Url
();
// // var result = await this.businesscompanySve.protectBus({ id: 41, company_id: 4 }, "xz", ["RL20190429114493kNw4", "RL2019042911449mftfK"]);
// var result = await this.businesscompanySve.recycleBusiness();
// console.log(result, "result..................");
// var result = await this.businesscompanySve.freeClaimOperation({ id: 41, company_id: 4 }, "xz", [1095, 1113]);
// return result;
// var result = await this.businesscompanySve.protectBus({ id: 41, company_id: 4 }, "xz", ["RL20190429114493kNw4", "RL2019042911449mftfK"]);
// } catch (e) {
console
.
log
(
result
,
"result.................."
);
// console.log(e.stack, "e.......................");
return
result
;
// }
}
catch
(
e
)
{
console
.
log
(
e
.
stack
,
"e......................."
);
}
}
}
async
callSign
()
{
async
callSign
()
{
var
tmpSignObj
=
{
var
tmpSignObj
=
{
...
...
igirl-web/app/base/service/impl/utilstlbankSve.js
View file @
051e9b00
...
@@ -28,6 +28,39 @@ class utilsTlBankSve {
...
@@ -28,6 +28,39 @@ class utilsTlBankSve {
this
.
tlorderDao
=
System
.
getObject
(
"db.tlorderDao"
);
this
.
tlorderDao
=
System
.
getObject
(
"db.tlorderDao"
);
}
}
//-------------------------------------------h5支付-----------------开始
async
getH5Url
()
{
// appid:00000003,商户号(mch_id):990440148166000,md5key(pay_key):a0ea3fa20dbd7bb4d5abf1d59d63bae8
var
timestamp
=
Date
.
now
();
var
jsonObj
=
{
appid
:
"0017ww22t86ddd"
,
cusid
:
"56059508873992Z6G"
,
version
:
12
,
trxamt
:
1
,
//单位为分
reqsn
:
"990440148166000_004"
,
//order_num + "_" + company_id.toString(),
charset
:
"UTF-8"
,
returl
:
"http://zhichan.gongsibao.com/"
,
notify_url
:
this
.
notifyUrl
,
body
:
"测试支付1"
,
randomstr
:
timestamp
.
toString
()
//随机字符串,不长于32位
}
var
param_result
=
await
this
.
getReqBeforeParam
(
jsonObj
,
"1352105537612345789"
);
if
(
param_result
.
code
!=
1
)
{
return
param_result
;
}
var
paramStr
=
Object
.
keys
(
jsonObj
).
sort
().
map
(
key
=>
{
return
`
${
encodeURIComponent
(
key
)}
=
${
encodeURIComponent
(
jsonObj
[
key
])}
`
}).
join
(
'&'
);
return
paramStr
;
}
//-------------------------------------------h5支付-----------------结束
//----------------------------------------------------------------------------------------请求银行接口开始---------------------------------------------------
//----------------------------------------------------------------------------------------请求银行接口开始---------------------------------------------------
/*
/*
...
...
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