Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_epay
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
zhenfei.zhang
fmp_epay
Commits
00bdc4d5
Commit
00bdc4d5
authored
Feb 03, 2018
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 修复POS传来金额带小数时支付金额错误Bug。
parent
741dc34f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
fmp_epay_p.cpp
+3
-3
No files found.
fmp_epay_p.cpp
View file @
00bdc4d5
...
...
@@ -170,13 +170,13 @@ void FMPePayPrivate::Init()
hash
[
FMP_EPAY_BUSINESSDATE
]
=
_origin_request
[
FMP_EPAY_BUSINESSDATE
].
toVariant
();
QJsonObject
trans
=
_origin_request
[
"transactions"
].
toObject
();
if
(
_origin_request
[
"fm_cmd"
].
toInt
()
==
10031
)
{
hash
[
"amount"
]
=
trans
[
"order_amount"
].
toInt
()
-
trans
[
"paid_amount"
].
toInt
(
);
hash
[
"amount"
]
=
(
int
)(
trans
[
"order_amount"
].
toDouble
()
+
0.005
)
-
(
int
)(
trans
[
"paid_amount"
].
toDouble
()
+
0.005
);
}
else
if
(
_origin_request
[
"fm_cmd"
].
toInt
()
==
10041
)
{
hash
[
"amount"
]
=
trans
[
"refund_amount"
].
toVariant
(
);
hash
[
"amount"
]
=
(
int
)(
trans
[
"refund_amount"
].
toDouble
()
+
0.005
);
hash
[
FMP_JKEY_FM_ORDERID
]
=
trans
[
FMP_JKEY_FM_ORDERID
].
toVariant
();
if
(
trans
.
contains
(
"refund_amount"
)
&&
trans
[
"refund_amount"
].
toInt
(
)
!=
0
if
(
trans
.
contains
(
"refund_amount"
)
&&
(
int
)(
trans
[
"refund_amount"
].
toDouble
()
+
0.005
)
!=
0
&&
trans
.
contains
(
FMP_JKEY_FM_ORDERID
)
&&
!
trans
[
FMP_JKEY_FM_ORDERID
].
toString
().
isEmpty
()
||
trans
.
contains
(
FMP_JKEY_PAY_TRANSID
)
&&
!
trans
[
FMP_JKEY_PAY_TRANSID
].
toString
().
isEmpty
())
{
connect
(
this
,
&
FMPePayPrivate
::
finished
,
this
,
&
FMPePayPrivate
::
confirmClicked
);
...
...
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