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
8835dd27
Commit
8835dd27
authored
May 10, 2017
by
LIDINGDA\ldd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.窗口一直置顶;2.支付退款超时时间设置为一分钟
parent
4bba0f62
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
41 additions
and
7 deletions
+41
-7
fmp_epay.cpp
+1
-0
fmp_epay.h
+1
-0
fmp_epay.pro
+3
-0
fmp_epay_def.h
+1
-0
fmp_epay_p.cpp
+6
-2
fmp_epayview_dialog.cpp
+23
-2
fmp_epayview_dialog.h
+3
-0
fmp_epayview_wait.cpp
+1
-1
fmp_epayview_wait.h
+1
-1
version.h
+1
-1
No files found.
fmp_epay.cpp
View file @
8835dd27
...
...
@@ -18,6 +18,7 @@ FMPePay::FMPePay(ctkPluginContext *context)
_operator_id
(
DEFAULT_EPAY_OPTID
),
_store_id
(
DEFAULT_EPAY_STRID
),
_station_id
(
DEFAULT_EPAY_STNID
),
_time_out
(
60
),
_ste_handler
(
new
FMPStartEventHandler
(
_ctx
,
this
)),
d_ptr
(
new
FMPePayPrivate
(
this
))
{
...
...
fmp_epay.h
View file @
8835dd27
...
...
@@ -39,6 +39,7 @@ private:
QString
_station_id
;
QString
_operator_id
;
QString
_partner_id
;
int
_time_out
;
//销售单保存时间
...
...
fmp_epay.pro
View file @
8835dd27
...
...
@@ -51,6 +51,9 @@ INCLUDEPATH += $$PWD/../include/ctk \
#Library path
LIBS
+=
-
L
$$
PWD
/../
lib
win32
{
LIBS
+=
-
lws2_32
-
luser32
}
CONFIG
(
debug
,
debug
|
release
)
{
#
Linking
library
...
...
fmp_epay_def.h
View file @
8835dd27
...
...
@@ -17,6 +17,7 @@
#define FMP_EPAY_TRANSTRACTION_AMOUNT "amount"
#define FMP_EPAY_TRANSTRACTION_CODE "code"
#define FMP_EPAY_ANIMATION "needanimation"
#define FMP_EPAY_TIMEOUT "timeout"
//支付返回
#define FMP_RPAY_PAY_RETURN_PAYID "pay_id"
...
...
fmp_epay_p.cpp
View file @
8835dd27
...
...
@@ -148,6 +148,9 @@ void FMPePayPrivate::Init()
q
->
_station_id
=
_setting
->
GetString
(
FMP_INIKEY_LOGINPOSID
);
q
->
_operator_id
=
_setting
->
GetString
(
FMP_INIKEY_LOGINCASHIER
);
q
->
_partner_id
=
_setting
->
GetString
(
FMP_INIKEY_LOGINPARTNERID
);
q
->
_time_out
=
_setting
->
GetInt
(
FMP_INIKEY_EPAYTIMEOUT
);
q
->
_time_out
=
(
q
->
_time_out
>
60
?
q
->
_time_out
:
60
);
hash
[
FMP_EPAY_ANIMATION
]
=
_setting
->
GetBool
(
FMP_INIKEY_ANIMATION
);
hash
[
FMP_EPAY_BUSINESSDATE
]
=
q
->
_businessdate
;
...
...
@@ -155,6 +158,7 @@ void FMPePayPrivate::Init()
hash
[
FMP_EPAY_STATIONID
]
=
q
->
_station_id
;
hash
[
FMP_EPAY_OPERATORID
]
=
q
->
_operator_id
;
hash
[
FMP_EPAY_PARTNERID
]
=
q
->
_partner_id
;
hash
[
FMP_EPAY_TIMEOUT
]
=
q
->
_time_out
;
_payDialog
=
new
FMPPayDialog
(
this
,
hash
);
}
...
...
@@ -210,7 +214,7 @@ void FMPePayPrivate::ControlPayJson(QString sum, QString code)
QString
errors
;
QJsonObject
outjson
;
if
(
!
HttpPost
(
outjson
,
_current_json
,
errors
,
10
))
if
(
!
HttpPost
(
outjson
,
_current_json
,
errors
,
q
->
_time_out
))
{
emit
error
(
errors
);
}
...
...
@@ -409,7 +413,7 @@ void FMPePayPrivate::ControlRefundJson(QString sum, QString code)
QString
errors
;
QJsonObject
outjson
;
if
(
!
HttpPost
(
outjson
,
_current_json
,
errors
))
if
(
!
HttpPost
(
outjson
,
_current_json
,
errors
,
q
->
_time_out
))
{
emit
error
(
errors
);
}
...
...
fmp_epayview_dialog.cpp
View file @
8835dd27
...
...
@@ -11,6 +11,8 @@
#include <QSqlTableModel>
#include <QStyledItemDelegate>
#include <QMouseEvent>
#include <Windows.h>
#include <QDesktopWidget>
#include <QPropertyAnimation>
...
...
@@ -151,6 +153,25 @@ FMPPayDialog::FMPPayDialog(FMPePayPrivate *control, QVariantHash basicinfo, QWid
}
void
FMPPayDialog
::
show
()
{
showNormal
();
::
SetForegroundWindow
((
HWND
)
effectiveWinId
());
::
SetWindowPos
(
(
HWND
)
effectiveWinId
(),
HWND_TOPMOST
,
0
,
0
,
0
,
0
,
SWP_NOMOVE
|
SWP_NOSIZE
|
SWP_SHOWWINDOW
);
showNormal
();
::
SetForegroundWindow
((
HWND
)
effectiveWinId
());
QDesktopWidget
w
;
QRect
rc
=
w
.
availableGeometry
();
setGeometry
((
rc
.
width
()
-
width
())
/
2
,
(
rc
.
height
()
-
height
())
/
2
,
width
(),
height
());
return
QDialog
::
show
();
}
void
FMPPayDialog
::
onWidgetChange
()
{
QPushButton
*
tmpcur
=
_curt_btn
;
...
...
@@ -220,7 +241,7 @@ void FMPPayDialog::showErrorMsg(QString errormsg)
if
(
errormsg
==
""
)
errormsg
=
QString
(
""
);
_wait
->
SetContent
(
FMPPayWait
::
ERROR
,
errormsg
);
_wait
->
SetContent
(
FMPPayWait
::
ERROR
S
,
errormsg
);
if
(
_wait
->
isHidden
())
_wait
->
show
();
...
...
@@ -543,7 +564,7 @@ void FMPPayDialog::onBtnConfirmClicked()
ui
->
lineedit_code
->
clear
();
ui
->
lineedit_num_refund
->
clear
();
ui
->
lineedit_code_refund
->
clear
();
_wait
->
SetContent
(
FMPPayWait
::
ERROR
,
QString
::
fromLocal8Bit
(
"金额或条码错误
\n
请重新输入"
));
_wait
->
SetContent
(
FMPPayWait
::
ERROR
S
,
QString
::
fromLocal8Bit
(
"金额或条码错误
\n
请重新输入"
));
_wait
->
show
();
return
;
}
...
...
fmp_epayview_dialog.h
View file @
8835dd27
...
...
@@ -35,6 +35,9 @@ typedef enum
public
:
explicit
FMPPayDialog
(
FMPePayPrivate
*
control
,
QVariantHash
basicinfo
,
QWidget
*
parent
=
0
);
void
show
();
~
FMPPayDialog
();
public
slots
:
...
...
fmp_epayview_wait.cpp
View file @
8835dd27
...
...
@@ -35,7 +35,7 @@ void FMPPayWait::SetContent(FMPPayWait::Type type, const QString &msg)
ui
->
btn_confirm
->
setVisible
(
true
);
ui
->
label_logo
->
setStyleSheet
(
"#label_logo {background: url(:/img/loading.png) center no-repeat;}"
);
break
;
case
FMPPayWait
:
:
ERROR
:
case
FMPPayWait
:
:
ERROR
S
:
ui
->
btn_confirm
->
setVisible
(
true
);
ui
->
label_logo
->
setStyleSheet
(
"#label_logo {background: url(:/img/fmclient-icon_payment_fail.png) center no-repeat;}"
);
break
;
...
...
fmp_epayview_wait.h
View file @
8835dd27
...
...
@@ -19,7 +19,7 @@ public:
typedef
enum
{
SUCCESS
=
0
,
ERROR
,
ERROR
S
,
LOADING
}
Type
;
...
...
version.h
View file @
8835dd27
...
...
@@ -5,7 +5,7 @@
#define VER_MINOR 1
#define VER_REVISION 0
#define VER_BUILD 1
0
#define VER_BUILD 1
1
//! Convert version numbers to string
#define _STR(S) #S
...
...
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