Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
PaxPay_QR65
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
PAX_QR65
PaxPay_QR65
Commits
286e3540
Commit
286e3540
authored
Apr 27, 2018
by
周尚
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
流程精简, 补充编译说明
parent
cf6083c3
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
20 additions
and
24 deletions
+20
-24
Intro/操作说明.pages
Intro/操作说明.pages
+0
-0
README.org
README.org
+3
-0
V1_0_0/src/main.c
V1_0_0/src/main.c
+0
-2
V1_0_0/src/zx_config.c
V1_0_0/src/zx_config.c
+11
-12
V1_0_0/src/zx_trans.c
V1_0_0/src/zx_trans.c
+6
-10
No files found.
Intro/操作说明.pages
View file @
286e3540
No preview for this file type
README.org
View file @
286e3540
...
...
@@ -5,3 +5,6 @@
** V1_0_0
初版程序
** 注
VS 编译时如有库依赖问题, 先注释相关代码, 运行后在使用 PAXPAYPRO2014 编译前解注释
V1_0_0/src/main.c
View file @
286e3540
...
...
@@ -198,8 +198,6 @@ void setup()
memset
(
&
act_st
,
0
,
sizeof
(
ACT_ST
));
memset
(
&
pay_st
,
0
,
sizeof
(
PAY_ST
));
strcpy
(
shop_st
.
serialNo
,
SN
);
strcpy
(
shop_st
.
posKey
,
"65E6B6C46F7A039CCC571AF0BD8A22EA61785FDD250E32DE1AFAE82844F353BA"
);
memcpy
(
pay_st
.
spbillCreateIp
,
"8.8.8.8"
,
strlen
(
"8.8.8.8"
));
zx_config_read_shop
();
...
...
V1_0_0/src/zx_config.c
View file @
286e3540
...
...
@@ -28,14 +28,14 @@ int zx_config_read_shop()
ret
=
seek
(
fd
,
0
,
SEEK_SET
);
if
(
ret
<
0
)
{
zx_common_disp_str
((
uchar
*
)
"seek"
,
4
,
0
,
0
,
0
);
// zx_err_file();
// zx_err_file();
goto
end
;
}
ret
=
read
(
fd
,
(
void
*
)
buf
,
sizeof
(
SHOP_ST
));
if
(
ret
==
-
1
)
{
zx_common_disp_str
((
uchar
*
)
"read"
,
4
,
0
,
0
,
0
);
// zx_err_file();
// zx_err_file();
goto
end
;
}
else
if
(
ret
==
sizeof
(
SHOP_ST
))
memcpy
(
&
shop_st
,
buf
,
sizeof
(
SHOP_ST
));
...
...
@@ -55,14 +55,14 @@ int zx_config_write_shop()
fd
=
open
(
"shopData"
,
O_CREATE
|
O_RDWR
);
if
(
fd
<
0
)
{
zx_common_disp_str
((
uchar
*
)
"open"
,
4
,
0
,
0
,
0
);
// zx_err_file();
// zx_err_file();
goto
end
;
}
ret
=
write
(
fd
,
(
void
*
)
&
shop_st
,
sizeof
(
SHOP_ST
));
if
(
ret
==
-
1
)
{
zx_common_disp_str
((
uchar
*
)
"write"
,
4
,
0
,
0
,
0
);
// zx_err_file();
// zx_err_file();
goto
end
;
}
...
...
@@ -104,7 +104,6 @@ int zx_config_set_shop_param()
if
(
ret
>
0
)
{
zx_code_urlstr_keyval_get
((
uchar
const
*
)
buff
,
"&"
,
"shopId"
,
shopId
);
zx_code_urlstr_keyval_get
((
uchar
const
*
)
buff
,
"&"
,
"shopName"
,
shopName
);
strcpy
(
shop_st
.
serialNo
,
SN
);
strcpy
(
shop_st
.
shopId
,
shopId
);
strcpy
(
shop_st
.
shopName
,
shopName
);
zx_config_write_shop
();
...
...
@@ -137,14 +136,14 @@ int zx_config_read_wifi()
ret
=
seek
(
fd
,
0
,
SEEK_SET
);
if
(
ret
<
0
)
{
zx_common_disp_str
((
uchar
*
)
"seek"
,
4
,
0
,
0
,
0
);
// zx_err_file();
// zx_err_file();
goto
end
;
}
ret
=
read
(
fd
,
(
void
*
)
buf
,
sizeof
(
WIFI_ST
));
if
(
ret
==
-
1
)
{
zx_common_disp_str
((
uchar
*
)
"read"
,
4
,
0
,
0
,
0
);
// zx_err_file();
// zx_err_file();
goto
end
;
}
else
if
(
ret
==
sizeof
(
WIFI_ST
))
{
memcpy
(
&
wifi_st
,
buf
,
sizeof
(
WIFI_ST
));
...
...
@@ -167,13 +166,13 @@ int zx_config_write_wifi()
fd
=
open
(
"wifi"
,
O_CREATE
|
O_RDWR
);
if
(
fd
<
0
)
{
zx_common_disp_str
((
uchar
*
)
"open"
,
4
,
0
,
0
,
0
);
// zx_err_file();
// zx_err_file();
goto
end
;
}
ret
=
write
(
fd
,
(
void
*
)
&
wifi_st
,
sizeof
(
WIFI_ST
));
if
(
ret
==
-
1
)
{
zx_common_disp_str
((
uchar
*
)
"write"
,
4
,
0
,
0
,
0
);
// zx_err_file();
// zx_err_file();
goto
end
;
}
...
...
@@ -200,14 +199,14 @@ int zx_config_read_host()
ret
=
seek
(
fd
,
0
,
SEEK_SET
);
if
(
ret
<
0
)
{
zx_common_disp_str
((
uchar
*
)
"seek"
,
4
,
0
,
0
,
0
);
// zx_err_file();
// zx_err_file();
goto
end
;
}
ret
=
read
(
fd
,
(
void
*
)
buf
,
HOSTLEN
);
if
(
ret
==
-
1
)
{
zx_common_disp_str
((
uchar
*
)
"read"
,
4
,
0
,
0
,
0
);
// zx_err_file();
// zx_err_file();
goto
end
;
}
else
if
(
ret
==
HOSTLEN
)
{
strcpy
(
hosturl
,
buf
);
...
...
@@ -228,7 +227,7 @@ int zx_config_write_host()
fd
=
open
(
"hosturl"
,
O_CREATE
|
O_RDWR
);
if
(
fd
<
0
)
{
zx_common_disp_str
((
uchar
*
)
"open"
,
4
,
0
,
0
,
0
);
// zx_err_file();
// zx_err_file();
goto
end
;
}
...
...
V1_0_0/src/zx_trans.c
View file @
286e3540
...
...
@@ -11,15 +11,11 @@
int
zx_trans_send_shop
(
const
SHOP_ST
*
shop_st
,
uchar
*
out
)
{
uchar
serialNo
[
20
]
=
{
0
};
uchar
const
*
ptr
=
NULL
;
int
len
=
0
;
{
if
(
!
shop_st
->
serialNo
[
0
])
{
ReadSN
(
serialNo
);
strcpy
((
void
*
)
shop_st
->
serialNo
,
serialNo
);
}
ReadSN
(
shop_st
->
serialNo
);
}
{
...
...
@@ -229,7 +225,7 @@ int zx_trans_biz(int trans_no)
memset
(
recvbuf
,
0
,
sizeof
(
recvbuf
));
ScrCls
();
zx_common_disp_str
(
"
交
易处理中 "
,
0
,
LEFT
,
0
,
1
);
zx_common_disp_str
(
"
交易处理中
"
,
0
,
LEFT
,
0
,
1
);
ret
=
zx_wifi_check
();
if
(
ret
<
0
)
{
...
...
@@ -237,13 +233,13 @@ int zx_trans_biz(int trans_no)
}
if
(
!
shop_st
.
posKey
[
0
]
&&
trans_no
!=
TRANS_POSKEY
)
{
zx_common_disp_str
(
"无KEY"
,
4
,
LEFT
,
0
,
0
);
zx_common_disp_str
(
"
无
KEY"
,
4
,
LEFT
,
0
,
0
);
getkey
();
return
-
1
;
}
if
(
!
hosturl
[
0
])
{
zx_common_disp_str
(
"
请设置
通讯地址"
,
0
,
LEFT
,
0
,
0
);
zx_common_disp_str
(
"
请设置通讯地址
"
,
0
,
LEFT
,
0
,
0
);
getkey
();
return
-
1
;
}
...
...
@@ -280,7 +276,7 @@ int zx_trans_biz(int trans_no)
strcpy
(
para
,
"60"
);
HttpParaCtl
(
s
,
HTTP_CMD_SET_TIMEOUT
,
para
,
strlen
(
para
));
zx_common_disp_str
(
"
连接中
, 请稍候..."
,
4
,
LEFT
,
0
,
0
);
zx_common_disp_str
(
"
连接中, 请稍候
..."
,
4
,
LEFT
,
0
,
0
);
ret
=
HttpPost
(
s
,
hosturl
,
sendbuf
,
sendlen
);
if
(
ret
<
0
)
{
zx_common_disp_str
(
"HttpPost"
,
2
,
LEFT
,
0
,
0
);
...
...
@@ -320,7 +316,7 @@ int zx_trans_biz(int trans_no)
}
HttpClose
(
s
);
zx_common_disp_str
(
"
通讯
结束"
,
4
,
0
,
0
,
0
);
zx_common_disp_str
(
"
通讯结束
"
,
4
,
0
,
0
,
0
);
zx_err_trans
(
rspCode
);
return
ret
;
...
...
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