Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
fmp_vip
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_vip
Commits
d0440f70
Commit
d0440f70
authored
Jun 15, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1. 修复支付接口返回数据错误。
parent
fe2dd05d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
6 deletions
+18
-6
task/taskpay.cpp
+18
-6
No files found.
task/taskpay.cpp
View file @
d0440f70
...
@@ -80,26 +80,38 @@ void TaskPay::packagePOSRsp()
...
@@ -80,26 +80,38 @@ void TaskPay::packagePOSRsp()
posRspJsonObj
[
PosProps
.
Prompt
]
=
1
;
posRspJsonObj
[
PosProps
.
Prompt
]
=
1
;
posRspJsonObj
[
PosProps
.
Fm_open_id
]
=
session
()
->
data
(
PosProps
.
Fm_open_id
).
toString
();
posRspJsonObj
[
PosProps
.
Fm_open_id
]
=
session
()
->
data
(
PosProps
.
Fm_open_id
).
toString
();
int
total_amount
=
0
;
QJsonArray
pay_ids
;
QJsonArray
pay_ids
;
QJsonObject
pay_id
;
QJsonObject
pay_id
;
pay_id
[
PosProps
.
Pay_id
]
=
"2
4
"
;
pay_id
[
PosProps
.
Pay_id
]
=
"2
0001
"
;
pay_id
[
PosProps
.
Pay_str
]
=
QString
::
fromLocal8Bit
(
"会员储值金支付"
);
pay_id
[
PosProps
.
Pay_str
]
=
QString
::
fromLocal8Bit
(
"会员储值金支付"
);
pay_id
[
PosProps
.
Paid_total_amount
]
=
getServerJsonValue
(
PosProps
.
CodeAmount
);
int
codeAmount
=
getServerJsonValue
(
PosProps
.
CodeAmount
).
toInt
();
pay_id
[
PosProps
.
Pay_amount
]
=
codeAmount
;
pay_ids
.
append
(
pay_id
);
pay_ids
.
append
(
pay_id
);
pay_id
[
PosProps
.
Pay_id
]
=
"25"
;
total_amount
+=
codeAmount
;
pay_id
[
PosProps
.
Pay_id
]
=
"20002"
;
pay_id
[
PosProps
.
Pay_str
]
=
QString
::
fromLocal8Bit
(
"会员积分支付"
);
pay_id
[
PosProps
.
Pay_str
]
=
QString
::
fromLocal8Bit
(
"会员积分支付"
);
pay_id
[
PosProps
.
Paid_total_amount
]
=
getServerJsonValue
(
PosProps
.
ScoreAmount
);
int
scoreAmount
=
getServerJsonValue
(
PosProps
.
ScoreAmount
).
toInt
();
pay_id
[
PosProps
.
Pay_amount
]
=
scoreAmount
;
pay_ids
.
append
(
pay_id
);
pay_ids
.
append
(
pay_id
);
total_amount
+=
scoreAmount
;
int
couponAmount
;
foreach
(
auto
coupon
,
getServerJsonValue
(
PosProps
.
Coupons
).
toArray
())
{
foreach
(
auto
coupon
,
getServerJsonValue
(
PosProps
.
Coupons
).
toArray
())
{
QJsonObject
cp
=
coupon
.
toObject
();
QJsonObject
cp
=
coupon
.
toObject
();
pay_id
[
PosProps
.
Pay_id
]
=
"
77
"
;
pay_id
[
PosProps
.
Pay_id
]
=
"
20003
"
;
pay_id
[
PosProps
.
Pay_str
]
=
QString
::
fromLocal8Bit
(
"代金券支付"
);
pay_id
[
PosProps
.
Pay_str
]
=
QString
::
fromLocal8Bit
(
"代金券支付"
);
pay_id
[
PosProps
.
Paid_total_amount
]
=
cp
[
PosProps
.
Coupon_disAmount
];
int
disAmount
=
cp
[
PosProps
.
Coupon_disAmount
].
toInt
();
pay_id
[
PosProps
.
Pay_amount
]
=
disAmount
;
pay_id
[
PosProps
.
Coupon_code
]
=
cp
[
ServerProps
(
PosProps
.
Coupon_code
)];
pay_id
[
PosProps
.
Coupon_code
]
=
cp
[
ServerProps
(
PosProps
.
Coupon_code
)];
pay_ids
.
append
(
pay_id
);
pay_ids
.
append
(
pay_id
);
couponAmount
+=
disAmount
;
}
}
total_amount
+=
couponAmount
;
posRspJsonObj
[
PosProps
.
Pay_id
]
=
pay_ids
;
posRspJsonObj
[
PosProps
.
Pay_id
]
=
pay_ids
;
posRspJsonObj
[
PosProps
.
Paid_total_amount
]
=
total_amount
;
posRspJsonObj
[
"forward"
]
=
posReqJsonObj
[
"forward"
];
posRspJsonObj
[
"forward"
]
=
posReqJsonObj
[
"forward"
];
}
}
...
...
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