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
94be1897
Commit
94be1897
authored
Aug 28, 2017
by
李定达
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1.ssl仍无法使用
parent
352b79c1
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
33 additions
and
23 deletions
+33
-23
sbkpay/DataProcess/fmnetwork.cpp
+4
-4
sbkpay/DataProcess/rollback.cpp
+3
-0
sbkpay/control.cpp
+4
-4
sbkpay/hostwidget.cpp
+3
-3
sbkpay/main.cpp
+11
-2
sbkpay/sbkpay.pro
+1
-1
sbkpay/sbkpay.pro.user
+7
-9
No files found.
sbkpay/DataProcess/fmnetwork.cpp
View file @
94be1897
...
...
@@ -29,14 +29,14 @@ bool FMNetWork::HttpPost(QString url, QByteArray outdata, const QByteArray &inda
QEventLoop
loop
;
QTimer
timer
;
//
QSslConfiguration config;
//
config.setPeerVerifyMode(QSslSocket::VerifyNone);
//
config.setProtocol(QSsl::SslV3);
QSslConfiguration
config
;
config
.
setPeerVerifyMode
(
QSslSocket
::
VerifyNone
);
config
.
setProtocol
(
QSsl
::
SslV3
);
QNetworkAccessManager
manger
;
QNetworkRequest
request
(
url
);
//
request.setSslConfiguration(config);
request
.
setSslConfiguration
(
config
);
request
.
setRawHeader
(
"Content-Type"
,
content
.
toUtf8
());
request
.
setRawHeader
(
"Accept"
,
accept
.
toUtf8
());
...
...
sbkpay/DataProcess/rollback.cpp
View file @
94be1897
...
...
@@ -106,6 +106,9 @@ void RollBack::run()
int
timeout
=
QSettings
(
path
+
"
\\
"
+
USERCONFIG_NAME
,
QSettings
::
IniFormat
).
value
(
VALUE_TIMEOUT
).
toInt
();
if
(
timeout
==
0
)
timeout
=
30
;
do
{
QSqlQuery
query
;
...
...
sbkpay/control.cpp
View file @
94be1897
...
...
@@ -176,14 +176,14 @@ bool Control::HttpPost(QString url, QByteArray &outdata, const QByteArray &indat
QEventLoop
loop
;
QTimer
timer
;
//
QSslConfiguration config;
//
config.setPeerVerifyMode(QSslSocket::VerifyNone);
//
config.setProtocol(QSsl::SslV3);
QSslConfiguration
config
;
config
.
setPeerVerifyMode
(
QSslSocket
::
VerifyNone
);
config
.
setProtocol
(
QSsl
::
SslV3
);
QNetworkAccessManager
manger
;
QNetworkRequest
request
(
url
);
//
request.setSslConfiguration(config);
request
.
setSslConfiguration
(
config
);
request
.
setRawHeader
(
"Content-Type"
,
content
.
toUtf8
());
request
.
setRawHeader
(
"Accept"
,
accept
.
toUtf8
());
...
...
sbkpay/hostwidget.cpp
View file @
94be1897
...
...
@@ -85,9 +85,9 @@ void HostWidget::ShowWidget(QWidget *showwidget)
}
this
->
show
();
this
->
move
(
1200
,
500
);
//
this->showFullScreen();
//
this->show();
//
this->move(1200, 500);
this
->
showFullScreen
();
}
void
HostWidget
::
InitWidget
()
...
...
sbkpay/main.cpp
View file @
94be1897
#
ifdef
SBKDLL
#include "DataProcess/tools.h"
#include "DataProcess/rollback.h"
#include <qwinwidget.h>
#include <QMessageBox>
...
...
@@ -10,10 +13,14 @@
#include "requestmodel.h"
#include "fmtool.h"
#include "rspfactory.h"
#include <QDir>
EXTERN_C
IMAGE_DOS_HEADER
__ImageBase
;
RollBack
rollback
;
BOOL
WINAPI
DllMain
(
HINSTANCE
hInstance
,
DWORD
dwReason
,
LPVOID
/*lpvReserved*/
)
{
static
bool
ownApplication
=
FALSE
;
...
...
@@ -41,7 +48,7 @@ extern "C" __declspec(dllexport) void Start(const char *indata, char *outdata)
QWinWidget
win
(
parent
);
char
path
[
MAX_PATH
]
=
{
0
};
Control
::
GetProcPath
(
path
);
ToolS
::
GetProcPath
(
path
);
QString
logDir
=
QString
(
"%1/log"
).
arg
(
QString
(
path
));
QDir
().
mkdir
(
logDir
);
...
...
@@ -60,7 +67,9 @@ extern "C" __declspec(dllexport) void Start(const char *indata, char *outdata)
logger
.
addDestination
(
consleDest
);
Control
control
(
&
win
);
rollback
.
start
();
control
.
Start
(
indata
,
outdata
);
}
...
...
@@ -307,7 +316,7 @@ int main(int argc, char *argv[])
AlipayRequest
req
;
FMTool
::
SetString
(
req
.
BusinessDay
,
8
,
QString
(
"20170909"
));
FMTool
::
SetString
(
req
.
TransType
,
2
,
QString
(
"
3
0"
));
FMTool
::
SetString
(
req
.
TransType
,
2
,
QString
(
"
1
0"
));
FMTool
::
SetString
(
req
.
PlatNo
,
4
,
QString
(
"1443"
));
FMTool
::
SetString
(
req
.
TransTime
,
6
,
QString
(
"130301"
));
FMTool
::
SetString
(
req
.
StoreNo
,
20
,
QString
(
"17607"
));
...
...
sbkpay/sbkpay.pro
View file @
94be1897
...
...
@@ -16,7 +16,7 @@ include("./DataProcess/DataProcess.pri")
LIBS
+=
-
L
"C:/openssl/openssl-1.0.1s/out32dll"
-
llibeay32
LIBS
+=
-
L
"C:/openssl/openssl-1.0.1s/out32dll"
-
lssleay32
CONFIG
+=
C
++
11
CONFIG
+=
C
++
11
SBKDLL
include
(
$$
PWD
/
qtwinmigrate
/
src
/
qtwinmigrate
.
pri
)
...
...
sbkpay/sbkpay.pro.user
View file @
94be1897
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE QtCreatorProject>
<!-- Written by QtCreator 3.5.1, 2017-08-2
6T17:02:37
. -->
<!-- Written by QtCreator 3.5.1, 2017-08-2
8T00:17:13
. -->
<qtcreator>
<data>
<variable>
EnvironmentId
</variable>
...
...
@@ -61,7 +61,7 @@
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DefaultDisplayName"
>
Desktop Qt 5.5.1 MSVC2010 32bit
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
>
Desktop Qt 5.5.1 MSVC2010 32bit
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
qt.55.win32_msvc2010_kit
</value>
<value
type=
"int"
key=
"ProjectExplorer.Target.ActiveBuildConfiguration"
>
0
</value>
<value
type=
"int"
key=
"ProjectExplorer.Target.ActiveBuildConfiguration"
>
1
</value>
<value
type=
"int"
key=
"ProjectExplorer.Target.ActiveDeployConfiguration"
>
0
</value>
<value
type=
"int"
key=
"ProjectExplorer.Target.ActiveRunConfiguration"
>
0
</value>
<valuemap
type=
"QVariantMap"
key=
"ProjectExplorer.Target.BuildConfiguration.0"
>
...
...
@@ -226,14 +226,12 @@
</valuelist>
<value
type=
"int"
key=
"PE.EnvironmentAspect.Base"
>
2
</value>
<valuelist
type=
"QVariantList"
key=
"PE.EnvironmentAspect.Changes"
/>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DefaultDisplayName"
>
sbkpay
</value>
<value
type=
"QString"
key=
"ProjectExplorer.CustomExecutableRunConfiguration.Arguments"
></value>
<value
type=
"QString"
key=
"ProjectExplorer.CustomExecutableRunConfiguration.Executable"
></value>
<value
type=
"QString"
key=
"ProjectExplorer.CustomExecutableRunConfiguration.WorkingDirectory"
>
%{buildDir}
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DefaultDisplayName"
>
自定义执行档
</value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.DisplayName"
></value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
Qt4ProjectManager.Qt4RunConfiguration:D:/gitcode/sbkpay/sbkpay/sbkpay.pro
</value>
<value
type=
"QString"
key=
"Qt4ProjectManager.Qt4RunConfiguration.CommandLineArguments"
></value>
<value
type=
"QString"
key=
"Qt4ProjectManager.Qt4RunConfiguration.ProFile"
>
sbkpay.pro
</value>
<value
type=
"bool"
key=
"Qt4ProjectManager.Qt4RunConfiguration.UseDyldImageSuffix"
>
false
</value>
<value
type=
"bool"
key=
"Qt4ProjectManager.Qt4RunConfiguration.UseTerminal"
>
false
</value>
<value
type=
"QString"
key=
"Qt4ProjectManager.Qt4RunConfiguration.UserWorkingDirectory"
></value>
<value
type=
"QString"
key=
"ProjectExplorer.ProjectConfiguration.Id"
>
ProjectExplorer.CustomExecutableRunConfiguration
</value>
<value
type=
"uint"
key=
"RunConfiguration.QmlDebugServerPort"
>
3768
</value>
<value
type=
"bool"
key=
"RunConfiguration.UseCppDebugger"
>
false
</value>
<value
type=
"bool"
key=
"RunConfiguration.UseCppDebuggerAuto"
>
true
</value>
...
...
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