Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
sbkpay
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
sbkpay
Commits
7a595b3f
Commit
7a595b3f
authored
Aug 28, 2017
by
李定达
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.调整rollback的创建时间在日志初始化之后
parent
8aeb501b
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
51 additions
and
52 deletions
+51
-52
sbkpay/global.h
+1
-1
sbkpay/jsonfactory.h
+47
-47
sbkpay/main.cpp
+2
-3
sbkpay/sbkpay.pro
+1
-1
No files found.
sbkpay/global.h
View file @
7a595b3f
...
@@ -7,7 +7,7 @@
...
@@ -7,7 +7,7 @@
#define PRINT_FILE_NAME "print.txt"
#define PRINT_FILE_NAME "print.txt"
#define USERCONFIG_NAME "config.ini"
//
#define USERCONFIG_NAME "config.ini"
#define ENCODE_FIRST "encode/first"
#define ENCODE_FIRST "encode/first"
#define ENCODE_END "encode/end"
#define ENCODE_END "encode/end"
...
...
sbkpay/jsonfactory.h
View file @
7a595b3f
...
@@ -30,28 +30,28 @@ public:
...
@@ -30,28 +30,28 @@ public:
return
false
;
return
false
;
}
}
static
bool
GetResponseWithType
(
ReqType
type
,
const
QByteArray
&
rspJsonData
,
AlipayResponse
&
response
)
//
static bool GetResponseWithType(ReqType type, const QByteArray &rspJsonData, AlipayResponse &response)
{
//
{
QJsonParseError
parseError
;
//
QJsonParseError parseError;
QJsonDocument
doc
=
QJsonDocument
::
fromJson
(
rspJsonData
,
&
parseError
);
//
QJsonDocument doc = QJsonDocument::fromJson(rspJsonData, &parseError);
if
(
parseError
.
error
!=
QJsonParseError
::
NoError
)
{
//
if(parseError.error != QJsonParseError::NoError) {
return
false
;
//
return false;
}
//
}
QJsonObject
rspJsonObj
=
doc
.
object
();
//
QJsonObject rspJsonObj = doc.object();
if
(
type
==
pay
)
//
if(type == pay)
return
GetPayResponse
(
rspJsonObj
,
response
);
//
return GetPayResponse(rspJsonObj, response);
if
(
type
==
refund
)
//
if(type == refund)
return
GetRefundResponse
(
rspJsonObj
,
response
);
//
return GetRefundResponse(rspJsonObj, response);
if
(
type
==
endday
)
//
if(type == endday)
return
GetDayEndResponse
(
rspJsonObj
,
response
);
//
return GetDayEndResponse(rspJsonObj, response);
if
(
type
==
againprint
)
//
if(type == againprint)
return
GetAgainPrinteResponse
(
rspJsonObj
,
response
);
//
return GetAgainPrinteResponse(rspJsonObj, response);
if
(
type
==
finds
)
//
if(type == finds)
return
GetFindResponse
(
rspJsonObj
,
response
);
//
return GetFindResponse(rspJsonObj, response);
return
false
;
//
return false;
}
//
}
private
:
private
:
//支付
//支付
...
@@ -186,31 +186,31 @@ private:
...
@@ -186,31 +186,31 @@ private:
return
true
;
return
true
;
}
}
// 支付AlipayResponse
//
// 支付AlipayResponse
static
bool
GetPayResponse
(
const
QJsonObject
&
rspJsonObj
,
AlipayResponse
&
response
)
//
static bool GetPayResponse(const QJsonObject &rspJsonObj, AlipayResponse &response)
{
//
{
return
false
;
//
return false;
}
//
}
// 退款AlipayResponse
//
// 退款AlipayResponse
static
bool
GetRefundResponse
(
const
QJsonObject
&
rspJsonObj
,
AlipayResponse
&
response
)
//
static bool GetRefundResponse(const QJsonObject &rspJsonObj, AlipayResponse &response)
{
//
{
return
true
;
//
return true;
}
//
}
// 日结AlipayResponse
//
// 日结AlipayResponse
static
bool
GetDayEndResponse
(
const
QJsonObject
&
rspJsonObj
,
AlipayResponse
&
response
)
//
static bool GetDayEndResponse(const QJsonObject &rspJsonObj, AlipayResponse &response)
{
//
{
return
true
;
//
return true;
}
//
}
// 重打小票AlipayResponse
//
// 重打小票AlipayResponse
static
bool
GetAgainPrinteResponse
(
const
QJsonObject
&
rspJsonObj
,
AlipayResponse
&
response
)
//
static bool GetAgainPrinteResponse(const QJsonObject &rspJsonObj, AlipayResponse &response)
{
//
{
return
true
;
//
return true;
}
//
}
// 查询AlipayResponse
//
// 查询AlipayResponse
static
bool
GetFindResponse
(
const
QJsonObject
&
rspJsonObj
,
AlipayResponse
&
response
)
//
static bool GetFindResponse(const QJsonObject &rspJsonObj, AlipayResponse &response)
{
//
{
return
true
;
//
return true;
}
//
}
};
};
...
...
sbkpay/main.cpp
View file @
7a595b3f
...
@@ -19,8 +19,6 @@
...
@@ -19,8 +19,6 @@
EXTERN_C
IMAGE_DOS_HEADER
__ImageBase
;
EXTERN_C
IMAGE_DOS_HEADER
__ImageBase
;
RollBack
rollback
;
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstance
,
DWORD
dwReason
,
LPVOID
/*lpvReserved*/
)
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstance
,
DWORD
dwReason
,
LPVOID
/*lpvReserved*/
)
{
{
static
bool
ownApplication
=
FALSE
;
static
bool
ownApplication
=
FALSE
;
...
@@ -67,8 +65,9 @@ extern "C" __declspec(dllexport) void Start(const char *indata, char *outdata)
...
@@ -67,8 +65,9 @@ extern "C" __declspec(dllexport) void Start(const char *indata, char *outdata)
logger
.
addDestination
(
consleDest
);
logger
.
addDestination
(
consleDest
);
static
RollBack
rollback
;
Control
control
(
&
win
);
Control
control
(
&
win
);
if
(
!
rollback
.
isRunning
())
rollback
.
start
();
rollback
.
start
();
control
.
Start
(
indata
,
outdata
);
control
.
Start
(
indata
,
outdata
);
}
}
...
...
sbkpay/sbkpay.pro
View file @
7a595b3f
...
@@ -16,7 +16,7 @@ include("./DataProcess/DataProcess.pri")
...
@@ -16,7 +16,7 @@ include("./DataProcess/DataProcess.pri")
LIBS
+=
-
L
"C:/openssl2/openssl-1.0.2l/out32dll"
-
llibeay32
LIBS
+=
-
L
"C:/openssl2/openssl-1.0.2l/out32dll"
-
llibeay32
LIBS
+=
-
L
"C:/openssl2/openssl-1.0.2l/out32dll"
-
lssleay32
LIBS
+=
-
L
"C:/openssl2/openssl-1.0.2l/out32dll"
-
lssleay32
CONFIG
+=
C
++
11
CONFIG
+=
C
++
11
SBKDLL
include
(
$$
PWD
/
qtwinmigrate
/
src
/
qtwinmigrate
.
pri
)
include
(
$$
PWD
/
qtwinmigrate
/
src
/
qtwinmigrate
.
pri
)
...
...
zhenfei.zhang
@zhenfei.zhang
mentioned in commit
5a7ad5ee
Jan 03, 2018
mentioned in commit
5a7ad5ee
mentioned in commit 5a7ad5ee18df9f8f6446fa7f9d5f5d36a7bbedc1
Toggle commit list
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