Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
MiyaFrogFastCashApp
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
jiangjiantao
MiyaFrogFastCashApp
Commits
e48f8025
Commit
e48f8025
authored
Sep 15, 2020
by
jiangjiantao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
支付接口调试
支付接口调试
parent
187cc156
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
30 additions
and
25 deletions
+30
-25
app.js
app.js
+1
-1
balance.js
pages/balance/balance.js
+27
-22
miyapay4.js
utils/miyapay4.js
+2
-2
No files found.
app.js
View file @
e48f8025
...
...
@@ -11,6 +11,6 @@ App({
version
:
"1.0.6.20200310"
,
BASE_URL
:
"https://hhms.miyapay.com/"
,
localAccountInfo
:
null
,
useTestPayInfo
:
tru
e
useTestPayInfo
:
fals
e
}
})
\ No newline at end of file
pages/balance/balance.js
View file @
e48f8025
...
...
@@ -35,7 +35,7 @@ Page({
var
localAccountInfo
=
getApp
().
globalData
.
localAccountInfo
;
console
.
info
(
"localAccountInfo==>"
+
JSON
.
stringify
(
localAccountInfo
));
if
(
localAccountInfo
.
success
==
true
&&
localAccountInfo
.
data
!=
null
)
{
if
(
localAccountInfo
.
code
==
200
&&
localAccountInfo
.
data
!=
null
)
{
this
.
data
.
saasid
=
localAccountInfo
.
data
.
store
.
saasid
;
if
(
localAccountInfo
.
data
.
store
.
marketid
!=
null
)
{
this
.
data
.
marketId
=
localAccountInfo
.
data
.
store
.
marketid
;
...
...
@@ -45,8 +45,9 @@ Page({
this
.
data
.
posId
=
localAccountInfo
.
data
.
store
.
posId
;
this
.
data
.
cashierCode
=
localAccountInfo
.
data
.
store
.
operatorId
;
this
.
data
.
signKey
=
localAccountInfo
.
data
.
store
.
miyaPayPlatformSignKey
;
this
.
data
.
baseUrl
=
localAccountInfo
.
data
.
store
.
miyaPayPlatformUrl
+
""
;
this
.
data
.
baseUrl
=
localAccountInfo
.
data
.
store
.
miyaPayPlatformUrl
+
"
miya/miyapay_response.action
"
;
this
.
data
.
apiVersion
=
localAccountInfo
.
data
.
store
.
miyaPayApiVersion
;
console
.
log
(
'1112'
)
if
(
getApp
().
globalData
.
useTestPayInfo
==
true
)
{
//just for test
this
.
data
.
signKey
=
"nbz9ww27sx4ou6dkr61mf63tth3s6e2d"
;
...
...
@@ -64,10 +65,17 @@ Page({
/**
* 刷脸支付
*/
facePay
:
function
(){
this
.
doPay
(
"23444764646446464644646446"
)
facePay
:
function
()
{
var
that
=
this
;
// 只允许从相机扫码
wx
.
scanCode
({
onlyFromCamera
:
true
,
success
(
res
)
{
if
(
null
!=
res
&&
res
.
result
!=
null
&&
res
.
result
!==
''
){
that
.
doPay
(
res
.
result
)
}
}
})
},
/**
...
...
@@ -99,7 +107,8 @@ Page({
version
:
"1.5"
,
orderNo
:
orderNo
,
token
:
payCode
,
payPrice
:
miyapay
.
fen2Yuan
(
parseInt
(
this
.
data
.
payPriceYuan
)),
payPrice
:
"1"
,
// payPrice:miyapay.yuan2Fen(this.data.payPriceYuan),
signKey
:
this
.
data
.
signKey
,
callback
:
(
res
)
=>
{
...
...
@@ -137,21 +146,17 @@ Page({
*/
payFail
(
msg
)
{
wx
.
redirectTo
({
url
:
'/pages/pay_result/pay_result?payPriceYuan='
+
this
.
data
.
payPriceYuan
+
"&description=支付成功"
,
})
// if (this.data.show) {
// this.setData({
// scanPayError: msg
// })
// } else {
// wx.showToast({
// title: msg,
// icon: 'none',
// duration: 2000
// })
// }
if
(
this
.
data
.
show
)
{
this
.
setData
({
scanPayError
:
msg
})
}
else
{
wx
.
showToast
({
title
:
msg
,
icon
:
'none'
,
duration
:
2000
})
}
}
...
...
utils/miyapay4.js
View file @
e48f8025
...
...
@@ -365,7 +365,7 @@ function requestPay({ baseUrl, type, saasid, marketId, posId, cashierCode, versi
payRequest
.
data
.
B2
=
token
;
}
//B3 描述信息
payRequest
.
data
.
B3
=
"
蜻蜓
IOT支付"
;
payRequest
.
data
.
B3
=
"
青蛙
IOT支付"
;
//B4 支付金额,分
if
(
payPrice
!=
null
)
{
...
...
@@ -388,7 +388,7 @@ function requestPay({ baseUrl, type, saasid, marketId, posId, cashierCode, versi
console
.
log
(
"payRequestXmlStr==>"
+
payRequestXmlStr
);
wx
.
request
({
headers
:
{
'content-type'
:
'
application
/xml'
'content-type'
:
'
text
/xml'
},
method
:
'POST'
,
url
:
baseUrl
,
...
...
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