Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
D
doublescreen-front
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
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
pengguangpu
doublescreen-front
Commits
8065328e
Commit
8065328e
authored
Feb 13, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Plain Diff
支付调试
parents
1c8029ce
137c5dcb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
balance.js
pages/balance/balance.js
+4
-4
payUtils.js
utils/payUtils.js
+2
-0
No files found.
pages/balance/balance.js
View file @
8065328e
...
...
@@ -50,8 +50,7 @@ Page({
this
.
setData
({
orderNo
:
res
.
data
});
this
.
payWithOpenCashier
();
this
.
payWithOpenCashier
(
res
.
data
);
}
}
}.
bind
(
this
));
...
...
@@ -59,7 +58,7 @@ Page({
//调用收款接口
doPay
(
orderNo
,
payCode
)
{
console
.
log
(
"doPay调用"
);
console
.
log
(
"doPay调用"
+
orderNo
);
this
.
setData
({
isPaying
:
true
});
//使用barCode来当面付
payUtils
.
startPay
(
orderNo
,
payCode
,
1
,
this
.
data
.
list
,
function
(
res
){
...
...
@@ -69,7 +68,7 @@ Page({
if
(
res
==
null
){
return
;
}
if
(
res
.
code
>
0
){
if
(
res
.
resultCode
==
1
){
//成功
console
.
log
(
"支付回调成功,跳转 "
);
// if(data.isCashierClosed == true){
...
...
@@ -94,6 +93,7 @@ Page({
* 打开收银台,进行扫码收款
*/
payWithOpenCashier
(
orderNo
){
try
{
console
.
info
(
"收银台版本"
+
my
.
ix
.
getVersionSync
({
packageName
:
'zoloz.phone.android.alipay.com.dragonfly'
...
...
utils/payUtils.js
View file @
8065328e
...
...
@@ -192,6 +192,7 @@ function pay(tradeNo, payCode, payPrice, list, callback, retryCount){
timeout
:
30000
,
data
:
payRequest
,
success
:
(
res
)
=>
{
console
.
log
(
"支付接口回掉 ==>"
+
JSON
.
stringify
(
res
));
//增加数据判断,增加重试
if
(
res
==
null
||
res
.
data
==
null
||
res
.
data
.
success
!=
true
||
res
.
data
.
data
==
null
)
{
console
.
log
(
"支付未成功 ==>"
+
res
.
data
.
message
);
...
...
@@ -262,6 +263,7 @@ function queryPayStateWithRetry(tradeNo, callback, retryCount){
timeout
:
30000
,
data
:
queryStateRequest
,
success
:
(
res
)
=>
{
console
.
log
(
"支付结果回掉"
+
JSON
.
stringify
(
res
));
//增加数据判断,增加重试
if
(
res
==
null
||
res
.
data
==
null
||
res
.
data
.
success
!=
true
||
res
.
data
.
data
==
null
)
{
//不知名原因导致失败,直接报失败
console
.
log
(
"查询失败,支付失败"
);
...
...
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