Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
F
FMVip_LXJ
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
FMVip_LXJ
Commits
d5521efc
Commit
d5521efc
authored
Jan 05, 2017
by
NitefullWind
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
对接激活/锁定接口。
parent
bf7d9c1b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
13 deletions
+21
-13
FMVip_LXJ/global.h
+6
-0
FMVip_LXJ/task/taskothers.cpp
+15
-13
No files found.
FMVip_LXJ/global.h
View file @
d5521efc
...
...
@@ -136,6 +136,12 @@ struct{
const
QString
FundInfo
=
"fund_info"
;
const
QString
Discount
=
"discount"
;
// 卡激活锁定
const
QString
CardNo
=
"card_no"
;
const
QString
CardStatus
=
"card_status"
;
const
QString
CardStatusDesc
=
"card_status_desc"
;
const
QString
Passward
=
"passward"
;
}
PosProps
;
// 签名字段
...
...
FMVip_LXJ/task/taskothers.cpp
View file @
d5521efc
...
...
@@ -31,7 +31,7 @@ TaskRefundPay::TaskRefundPay(QJsonObject &jsonObj, QObject *parent)
void
TaskRefundPay
::
packageServerReq
()
{
serverReqJsonObj
[
ServerProps
(
PosProps
.
TransId
)]
=
getPosJsonValue
(
PosProps
.
TransI
d
);
serverReqJsonObj
[
ServerProps
(
PosProps
.
Fm_id
)]
=
getPosJsonValue
(
PosProps
.
Fm_i
d
);
}
void
TaskRefundPay
::
packagePOSRsp
()
...
...
@@ -75,17 +75,18 @@ TaskCardLock::TaskCardLock(QJsonObject &jsonObj, Session *session, QObject *pare
void
TaskCardLock
::
packageServerReq
()
{
QJsonObject
trans
;
trans
[
ServerProps
(
PosProps
.
Fm_id
)]
=
getPosJsonValue
(
PosProps
.
Fm_id
);
serverReqJsonObj
[
ServerProps
(
PosProps
.
Transaction
)]
=
trans
;
serverReqJsonObj
[
ServerProps
(
PosProps
.
TransId
)]
=
createTransId
()
;
serverReqJsonObj
[
ServerProps
(
PosProps
.
CardNo
)]
=
session
()
->
data
(
PosProps
.
Amount
).
toString
(
);
serverReqJsonObj
[
ServerProps
(
PosProps
.
Passward
)]
=
"1234"
;
}
void
TaskCardLock
::
packagePOSRsp
()
{
for
(
auto
prop
:
{
PosProps
.
StatusCode
,
PosProps
.
Msg
})
{
posRspJsonObj
[
prop
]
=
getServerJsonValue
(
ServerProps
(
prop
));
if
(
getServerJsonValue
(
PosProps
.
StatusCode
)
==
FM_API_SUCCESS
)
{
FMMsgWnd
::
SuccessWnd
(
"激活成功
\n
卡状态:"
+
getServerJsonValue
(
PosProps
.
CardStatusDesc
).
toString
());
}
else
{
FMMsgWnd
::
FailureWnd
(
"激活失败
\n
"
+
getServerJsonValue
(
PosProps
.
Msg
).
toString
());
}
posRspJsonObj
[
PosProps
.
Prompt
]
=
1
;
}
...
...
@@ -98,15 +99,16 @@ TaskCardActive::TaskCardActive(QJsonObject &jsonObj, Session *session, QObject *
void
TaskCardActive
::
packageServerReq
()
{
QJsonObject
trans
;
trans
[
ServerProps
(
PosProps
.
Fm_id
)]
=
getPosJsonValue
(
PosProps
.
Fm_id
);
serverReqJsonObj
[
ServerProps
(
PosProps
.
Transaction
)]
=
trans
;
serverReqJsonObj
[
ServerProps
(
PosProps
.
TransId
)]
=
createTransId
()
;
serverReqJsonObj
[
ServerProps
(
PosProps
.
CardNo
)]
=
session
()
->
data
(
PosProps
.
Amount
).
toString
(
);
serverReqJsonObj
[
ServerProps
(
PosProps
.
Passward
)]
=
"1234"
;
}
void
TaskCardActive
::
packagePOSRsp
()
{
for
(
auto
prop
:
{
PosProps
.
StatusCode
,
PosProps
.
Msg
})
{
posRspJsonObj
[
prop
]
=
getServerJsonValue
(
ServerProps
(
prop
));
if
(
getServerJsonValue
(
PosProps
.
StatusCode
)
==
FM_API_SUCCESS
)
{
FMMsgWnd
::
SuccessWnd
(
"锁定成功
\n
卡状态:"
+
getServerJsonValue
(
PosProps
.
CardStatusDesc
).
toString
());
}
else
{
FMMsgWnd
::
FailureWnd
(
"锁定失败
\n
"
+
getServerJsonValue
(
PosProps
.
Msg
).
toString
());
}
posRspJsonObj
[
PosProps
.
Prompt
]
=
1
;
}
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