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
eb30f9ac
Commit
eb30f9ac
authored
May 17, 2019
by
xiaojing.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.支付流程优化
parent
8fa9b605
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
55 additions
and
1 deletions
+55
-1
fmp_epay.cpp
+5
-0
fmp_epay.h
+6
-0
fmp_epay.pro
+2
-0
fmp_epay_i.h
+6
-0
fmp_epay_p.cpp
+8
-1
fmp_epay_p.h
+4
-0
fmp_epayview_dialog.cpp
+23
-0
fmp_epayview_dialog.h
+1
-0
No files found.
fmp_epay.cpp
View file @
eb30f9ac
...
@@ -88,3 +88,8 @@ QByteArray FMPePay::DockQueryRespond()
...
@@ -88,3 +88,8 @@ QByteArray FMPePay::DockQueryRespond()
{
{
return
d_func
()
->
DockQueryRespond
();
return
d_func
()
->
DockQueryRespond
();
}
}
void
FMPePay
::
DockPayCode
(
const
QString
&
code
)
{
d_func
()
->
DockPayCode
(
code
);
}
fmp_epay.h
View file @
eb30f9ac
...
@@ -30,12 +30,18 @@ public:
...
@@ -30,12 +30,18 @@ public:
void
DockQueryRequest
(
const
QByteArray
&
json
);
void
DockQueryRequest
(
const
QByteArray
&
json
);
QByteArray
DockQueryRespond
();
QByteArray
DockQueryRespond
();
void
DockPayCode
(
const
QString
&
code
);
protected
slots
:
protected
slots
:
void
InitService
();
void
InitService
();
void
UninitService
();
void
UninitService
();
public
:
QString
test
;
private
:
private
:
bool
_inited
;
bool
_inited
;
...
...
fmp_epay.pro
View file @
eb30f9ac
...
@@ -25,6 +25,7 @@ SOURCES += \
...
@@ -25,6 +25,7 @@ SOURCES += \
fmp_pe_handlers
.
cpp
\
fmp_pe_handlers
.
cpp
\
fmnumpad
.
cpp
fmnumpad
.
cpp
HEADERS
+=
\
HEADERS
+=
\
fmp_epay
.
h
\
fmp_epay
.
h
\
fmp_epay_i
.
h
\
fmp_epay_i
.
h
\
...
@@ -39,6 +40,7 @@ HEADERS +=\
...
@@ -39,6 +40,7 @@ HEADERS +=\
fmp_pe_handlers
.
h
\
fmp_pe_handlers
.
h
\
fmnumpad
.
h
fmnumpad
.
h
unix
{
unix
{
target
.
path
=
/
usr
/
lib
target
.
path
=
/
usr
/
lib
INSTALLS
+=
target
INSTALLS
+=
target
...
...
fmp_epay_i.h
View file @
eb30f9ac
...
@@ -30,11 +30,17 @@ public:
...
@@ -30,11 +30,17 @@ public:
virtual
void
DockQueryRequest
(
const
QByteArray
&
json
)
=
0
;
virtual
void
DockQueryRequest
(
const
QByteArray
&
json
)
=
0
;
virtual
QByteArray
DockQueryRespond
()
=
0
;
virtual
QByteArray
DockQueryRespond
()
=
0
;
virtual
void
DockPayCode
(
const
QString
&
code
)
=
0
;
signals
:
signals
:
void
TriggerInit
();
void
TriggerInit
();
void
TriggerUninit
();
void
TriggerUninit
();
public
:
QString
_payQcode
;
protected
slots
:
protected
slots
:
void
OnTriggerInit
()
{
FMPluginInterface
::
OnTriggerInit
();
}
void
OnTriggerInit
()
{
FMPluginInterface
::
OnTriggerInit
();
}
void
OnTriggerUninit
()
{
FMPluginInterface
::
OnTriggerUninit
();
}
void
OnTriggerUninit
()
{
FMPluginInterface
::
OnTriggerUninit
();
}
...
...
fmp_epay_p.cpp
View file @
eb30f9ac
...
@@ -198,11 +198,12 @@ void FMPePayPrivate::Init()
...
@@ -198,11 +198,12 @@ void FMPePayPrivate::Init()
if
(
_payDialog
==
nullptr
)
{
if
(
_payDialog
==
nullptr
)
{
_payDialog
=
new
FMPPayDialog
(
this
,
hash
);
_payDialog
=
new
FMPPayDialog
(
this
,
hash
);
}
}
else
{
else
{
_payDialog
->
setBasicInfo
(
hash
);
_payDialog
->
setBasicInfo
(
hash
);
}
}
_payDialog
->
setPayCode
();
//zxj
_payDialog
->
show
();
_payDialog
->
show
();
if
(
_origin_request
[
"fm_cmd"
].
toInt
()
==
10041
&&
!
hash
[
FMP_JKEY_FM_ORDERID
].
toString
().
isEmpty
())
{
if
(
_origin_request
[
"fm_cmd"
].
toInt
()
==
10041
&&
!
hash
[
FMP_JKEY_FM_ORDERID
].
toString
().
isEmpty
())
{
...
@@ -292,6 +293,7 @@ QByteArray FMPePayPrivate::DockPayRespond()
...
@@ -292,6 +293,7 @@ QByteArray FMPePayPrivate::DockPayRespond()
return
json
;
return
json
;
}
}
void
FMPePayPrivate
::
DockRefundRequest
(
const
QByteArray
&
json
)
void
FMPePayPrivate
::
DockRefundRequest
(
const
QByteArray
&
json
)
{
{
_is_api
=
true
;
_is_api
=
true
;
...
@@ -333,6 +335,11 @@ QByteArray FMPePayPrivate::DockQueryRespond()
...
@@ -333,6 +335,11 @@ QByteArray FMPePayPrivate::DockQueryRespond()
return
""
;
return
""
;
}
}
void
FMPePayPrivate
::
DockPayCode
(
const
QString
&
code
)
{
_payCode
=
code
;
}
void
FMPePayPrivate
::
OnFinish
()
void
FMPePayPrivate
::
OnFinish
()
{
{
...
...
fmp_epay_p.h
View file @
eb30f9ac
...
@@ -46,6 +46,8 @@ public:
...
@@ -46,6 +46,8 @@ public:
void
DockQueryRequest
(
const
QByteArray
&
json
);
void
DockQueryRequest
(
const
QByteArray
&
json
);
QByteArray
DockQueryRespond
();
QByteArray
DockQueryRespond
();
void
DockPayCode
(
const
QString
&
code
);
private
:
private
:
void
ControlReverseJson
();
void
ControlReverseJson
();
...
@@ -94,6 +96,8 @@ private:
...
@@ -94,6 +96,8 @@ private:
bool
_is_api
;
bool
_is_api
;
bool
_api_abort
;
bool
_api_abort
;
bool
_reverse_flag
;
bool
_reverse_flag
;
public
:
QString
_payCode
;
static
unsigned
int
s_ClientReqCount
;
static
unsigned
int
s_ClientReqCount
;
...
...
fmp_epayview_dialog.cpp
View file @
eb30f9ac
...
@@ -75,6 +75,7 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWid
...
@@ -75,6 +75,7 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWid
connect
(
ui
->
btn_confirm01
,
&
QPushButton
::
clicked
,
this
,
&
FMPPayDialog
::
onBtnConfirmClicked
);
connect
(
ui
->
btn_confirm01
,
&
QPushButton
::
clicked
,
this
,
&
FMPPayDialog
::
onBtnConfirmClicked
);
connect
(
ui
->
btn_confirm01_refund
,
&
QPushButton
::
clicked
,
this
,
&
FMPPayDialog
::
onBtnConfirmClicked
);
connect
(
ui
->
btn_confirm01_refund
,
&
QPushButton
::
clicked
,
this
,
&
FMPPayDialog
::
onBtnConfirmClicked
);
connect
(
ui
->
lineedit_code
,
&
FMPFocusLineEdit
::
returnPressed
,
this
,
&
FMPPayDialog
::
onBtnConfirmClicked
);
connect
(
ui
->
lineedit_code
,
&
FMPFocusLineEdit
::
returnPressed
,
this
,
&
FMPPayDialog
::
onBtnConfirmClicked
);
connect
(
ui
->
lineedit_num
,
&
FMPFocusLineEdit
::
returnPressed
,
this
,
&
FMPPayDialog
::
onBtnConfirmClicked
);
...
@@ -193,6 +194,27 @@ void FMPPayDialog::confirmRefund()
...
@@ -193,6 +194,27 @@ void FMPPayDialog::confirmRefund()
onBtnConfirmClicked
();
onBtnConfirmClicked
();
}
}
void
FMPPayDialog
::
setPayCode
()
//设置付款码
{
QString
temp
=
_control
->
_payCode
;
qDebug
()
<<
"************payCode is"
<<
temp
;
if
(
!
temp
.
isEmpty
())
{
ui
->
lineedit_code
->
setText
(
temp
);
ui
->
lineedit_code
->
setDisabled
(
true
);
qDebug
()
<<
"************payCode clear"
;
}
else
{
qDebug
()
<<
"^^^^^^****payCode clear and enable "
;
ui
->
lineedit_code
->
setDisabled
(
false
);
}
}
void
FMPPayDialog
::
show
()
void
FMPPayDialog
::
show
()
{
{
...
@@ -650,6 +672,7 @@ void FMPPayDialog::onBtnConfirmClicked()
...
@@ -650,6 +672,7 @@ void FMPPayDialog::onBtnConfirmClicked()
{
{
_wait
->
SetContent
(
FMPPayWait
::
LOADING
,
QString
::
fromLocal8Bit
(
"支付中..."
));
_wait
->
SetContent
(
FMPPayWait
::
LOADING
,
QString
::
fromLocal8Bit
(
"支付中..."
));
_control
->
ControlPayJson
(
ui
->
lineedit_num
->
text
(),
ui
->
lineedit_code
->
text
());
_control
->
ControlPayJson
(
ui
->
lineedit_num
->
text
(),
ui
->
lineedit_code
->
text
());
ui
->
lineedit_num
->
clear
();
}
}
else
else
...
...
fmp_epayview_dialog.h
View file @
eb30f9ac
...
@@ -43,6 +43,7 @@ public:
...
@@ -43,6 +43,7 @@ public:
int
getPayAmount
()
const
;
int
getPayAmount
()
const
;
void
confirmRefund
();
void
confirmRefund
();
void
setPayCode
();
//zxj 设置付款码
public
slots
:
public
slots
:
void
showErrorMsg
(
QString
errormsg
);
void
showErrorMsg
(
QString
errormsg
);
...
...
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