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
96dc1dcb
Commit
96dc1dcb
authored
Sep 28, 2020
by
pengguangpu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug;手机端自测流程;
parent
00ccd3d6
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
14 deletions
+33
-14
app.js
app.js
+1
-1
img_refund_guide.png
images/img_refund_guide.png
+0
-0
balance.js
pages/balance/balance.js
+9
-12
functioncenter.js
pages/functioncenter/functioncenter.js
+9
-0
refund.js
pages/refund/refund.js
+10
-0
refund.wxml
pages/refund/refund.wxml
+1
-1
miyapay4.js
utils/miyapay4.js
+3
-0
No files found.
app.js
View file @
96dc1dcb
...
@@ -11,6 +11,6 @@ App({
...
@@ -11,6 +11,6 @@ App({
version
:
"1.0.6.20200310"
,
version
:
"1.0.6.20200310"
,
BASE_URL
:
"https://hhms.miyapay.com/"
,
BASE_URL
:
"https://hhms.miyapay.com/"
,
localAccountInfo
:
null
,
localAccountInfo
:
null
,
useTestPayInfo
:
fals
e
useTestPayInfo
:
tru
e
}
}
})
})
\ No newline at end of file
images/img_refund_guide.png
0 → 100644
View file @
96dc1dcb
17.5 KB
pages/balance/balance.js
View file @
96dc1dcb
...
@@ -31,8 +31,6 @@ Page({
...
@@ -31,8 +31,6 @@ Page({
*/
*/
initData
(){
initData
(){
this
.
data
.
baseUrl
=
getApp
().
globalData
.
BASE_URL
;
var
localAccountInfo
=
getApp
().
globalData
.
localAccountInfo
;
var
localAccountInfo
=
getApp
().
globalData
.
localAccountInfo
;
console
.
info
(
"localAccountInfo==>"
+
JSON
.
stringify
(
localAccountInfo
));
console
.
info
(
"localAccountInfo==>"
+
JSON
.
stringify
(
localAccountInfo
));
if
(
localAccountInfo
.
code
==
200
&&
localAccountInfo
.
data
!=
null
)
{
if
(
localAccountInfo
.
code
==
200
&&
localAccountInfo
.
data
!=
null
)
{
...
@@ -45,7 +43,7 @@ Page({
...
@@ -45,7 +43,7 @@ Page({
this
.
data
.
posId
=
localAccountInfo
.
data
.
store
.
posId
;
this
.
data
.
posId
=
localAccountInfo
.
data
.
store
.
posId
;
this
.
data
.
cashierCode
=
localAccountInfo
.
data
.
store
.
operatorId
;
this
.
data
.
cashierCode
=
localAccountInfo
.
data
.
store
.
operatorId
;
this
.
data
.
signKey
=
localAccountInfo
.
data
.
store
.
miyaPayPlatformSignKey
;
this
.
data
.
signKey
=
localAccountInfo
.
data
.
store
.
miyaPayPlatformSignKey
;
this
.
data
.
baseUrl
=
localAccountInfo
.
data
.
store
.
miyaPayPlatformUrl
+
"miya/miyapay_response.action"
;
this
.
data
.
baseUrl
=
localAccountInfo
.
data
.
store
.
miyaPayPlatformUrl
;
this
.
data
.
apiVersion
=
localAccountInfo
.
data
.
store
.
miyaPayApiVersion
;
this
.
data
.
apiVersion
=
localAccountInfo
.
data
.
store
.
miyaPayApiVersion
;
console
.
log
(
'1112'
)
console
.
log
(
'1112'
)
if
(
getApp
().
globalData
.
useTestPayInfo
==
true
)
{
if
(
getApp
().
globalData
.
useTestPayInfo
==
true
)
{
...
@@ -55,7 +53,7 @@ Page({
...
@@ -55,7 +53,7 @@ Page({
this
.
data
.
marketId
=
"slzf"
;
this
.
data
.
marketId
=
"slzf"
;
this
.
data
.
posId
=
"1"
;
this
.
data
.
posId
=
"1"
;
this
.
data
.
cashierCode
=
"1"
;
this
.
data
.
cashierCode
=
"1"
;
this
.
data
.
baseUrl
=
"https://
paytest
.miyapay.com/miya/miyapay_response.action"
;
this
.
data
.
baseUrl
=
"https://
miniprograms-165
.miyapay.com/miya/miyapay_response.action"
;
}
}
}
}
},
},
...
@@ -97,6 +95,7 @@ Page({
...
@@ -97,6 +95,7 @@ Page({
})
})
//todo
//todo
var
orderNo
=
(
new
Date
()).
getTime
()
+
""
;
var
orderNo
=
(
new
Date
()).
getTime
()
+
""
;
var
tempThis
=
this
;
miyapay
.
requestPay
({
miyapay
.
requestPay
({
baseUrl
:
this
.
data
.
baseUrl
,
baseUrl
:
this
.
data
.
baseUrl
,
type
:
miyapay
.
TYPE_BARCODE_PAY
,
type
:
miyapay
.
TYPE_BARCODE_PAY
,
...
@@ -107,22 +106,20 @@ Page({
...
@@ -107,22 +106,20 @@ Page({
version
:
"1.5"
,
version
:
"1.5"
,
orderNo
:
orderNo
,
orderNo
:
orderNo
,
token
:
payCode
,
token
:
payCode
,
payPrice
:
"1"
,
payPrice
:
miyapay
.
yuan2Fen
(
this
.
data
.
payPriceYuan
),
// payPrice:miyapay.yuan2Fen(this.data.payPriceYuan),
signKey
:
this
.
data
.
signKey
,
signKey
:
this
.
data
.
signKey
,
callback
:
(
res
)
=>
{
callback
:
(
res
)
=>
{
wx
.
hideLoading
({
success
:
(
res
)
=>
{},
})
console
.
log
(
"支付回调==>"
+
JSON
.
stringify
(
res
));
console
.
log
(
"支付回调==>"
+
JSON
.
stringify
(
res
));
if
(
res
.
code
==
0
)
{
if
(
res
.
code
==
0
)
{
//支付成功
//支付成功
this
.
paySuccess
();
t
empT
his
.
paySuccess
();
}
else
{
}
else
{
t
his
.
payFail
(
res
.
data
);
tempT
his
.
payFail
(
res
.
data
);
}
}
wx
.
hideLoading
({
success
:
(
res
)
=>
{},
})
}
}
});
});
},
},
...
...
pages/functioncenter/functioncenter.js
View file @
96dc1dcb
...
@@ -109,6 +109,15 @@ Page({
...
@@ -109,6 +109,15 @@ Page({
})
})
},
},
onLogoutClicked
:
function
(){
getApp
().
globalData
.
localAccountInfo
=
null
wx
.
setStorageSync
(
'localAccountInfo'
,
null
)
wx
.
setStorageSync
(
'loginInfo'
,
null
)
wx
.
redirectTo
({
url
:
'/pages/login/login'
,
})
},
onCloseClicked
:
function
(){
onCloseClicked
:
function
(){
wx
.
navigateBack
()
wx
.
navigateBack
()
}
}
...
...
pages/refund/refund.js
View file @
96dc1dcb
...
@@ -50,6 +50,16 @@ Page({
...
@@ -50,6 +50,16 @@ Page({
// }
// }
// })
// })
//被扫码回调事件,just for test
wx
.
scanCode
({
onlyFromCamera
:
true
,
success
(
res
)
{
console
.
log
(
res
)
startRefund
(
res
.
result
)
}
})
},
},
onImageClicked
:
function
(){
onImageClicked
:
function
(){
...
...
pages/refund/refund.wxml
View file @
96dc1dcb
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
<!--提示文字-->
<!--提示文字-->
<text style="color:black;font-weight:bold;font-size:40rpx;margin-left:auto;margin-right:auto;margin-top:112rpx;">请扫描订单条码退款</text>
<text style="color:black;font-weight:bold;font-size:40rpx;margin-left:auto;margin-right:auto;margin-top:112rpx;">请扫描订单条码退款</text>
<image src="
" style="width:567rpx;height:567rpx;background-color:black
;margin-left:auto;margin-right:auto;margin-top:224rpx;" bindtap="onImageClicked"></image>
<image src="
../../images/img_refund_guide.png" style="width:567rpx;height:567rpx
;margin-left:auto;margin-right:auto;margin-top:224rpx;" bindtap="onImageClicked"></image>
...
...
utils/miyapay4.js
View file @
96dc1dcb
...
@@ -121,6 +121,7 @@ function checkOrderState({ baseUrl, saasid, marketId, posId, cashierCode, versio
...
@@ -121,6 +121,7 @@ function checkOrderState({ baseUrl, saasid, marketId, posId, cashierCode, versio
//请求
//请求
var
checkOrderRequestXmlStr
=
"<xml>"
+
json2xml
(
checkOrderRequest
)
+
"</xml>"
;
var
checkOrderRequestXmlStr
=
"<xml>"
+
json2xml
(
checkOrderRequest
)
+
"</xml>"
;
console
.
log
(
"payUrl==>"
+
baseUrl
);
console
.
log
(
"checkOrderRequestXmlStr==>"
+
checkOrderRequestXmlStr
);
console
.
log
(
"checkOrderRequestXmlStr==>"
+
checkOrderRequestXmlStr
);
wx
.
request
({
wx
.
request
({
headers
:
{
headers
:
{
...
@@ -385,6 +386,7 @@ function requestPay({ baseUrl, type, saasid, marketId, posId, cashierCode, versi
...
@@ -385,6 +386,7 @@ function requestPay({ baseUrl, type, saasid, marketId, posId, cashierCode, versi
//请求
//请求
payRequestXmlStr
=
"<xml>"
+
json2xml
(
payRequest
)
+
"</xml>"
;
payRequestXmlStr
=
"<xml>"
+
json2xml
(
payRequest
)
+
"</xml>"
;
console
.
log
(
"payUrl==>"
+
baseUrl
);
console
.
log
(
"payRequestXmlStr==>"
+
payRequestXmlStr
);
console
.
log
(
"payRequestXmlStr==>"
+
payRequestXmlStr
);
wx
.
request
({
wx
.
request
({
headers
:
{
headers
:
{
...
@@ -508,6 +510,7 @@ function refund({ baseUrl, saasid, marketId, posId, cashierCode, version, orderN
...
@@ -508,6 +510,7 @@ function refund({ baseUrl, saasid, marketId, posId, cashierCode, version, orderN
refundRequest
.
request
.
A8
=
getSign
(
refundRequest
,
signKey
);
refundRequest
.
request
.
A8
=
getSign
(
refundRequest
,
signKey
);
refundRequestXmlStr
=
"<xml>"
+
json2xml
(
refundRequest
)
+
"</xml>"
;
refundRequestXmlStr
=
"<xml>"
+
json2xml
(
refundRequest
)
+
"</xml>"
;
console
.
log
(
"payUrl==>"
+
baseUrl
);
console
.
log
(
"refundRequestXmlStr==>"
+
refundRequestXmlStr
);
console
.
log
(
"refundRequestXmlStr==>"
+
refundRequestXmlStr
);
wx
.
request
({
wx
.
request
({
headers
:
{
headers
:
{
...
...
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