Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
C
cdz_gateway_v2
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
杨苏杭
cdz_gateway_v2
Commits
39086e2f
Commit
39086e2f
authored
Nov 30, 2018
by
yangsh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加定时器查询订单状态,staging添加环境变量
parent
fc3261c9
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
16 additions
and
1 deletions
+16
-1
.idea/workspace.xml
+0
-0
.staging
+1
-1
application/Events.php
+15
-0
No files found.
.idea/workspace.xml
View file @
39086e2f
This diff is collapsed.
Click to expand it.
.staging
View file @
39086e2f
...
...
@@ -32,4 +32,4 @@ MESSAGE_RELOAD=sCtztz8xYzsgR1IpZ5GohMuG9DScY5OOcI4VVEEwtg8
MESSAGE_SHED_TIMEOUT=euUQrXFejUeyyxJbfaZQaRQfnXSqi05XMFLNfIsC0vA
MESSAGE_CHARGER_SHED=MZH_wTlwMq1_GguqIRnldSbHEuyFZcqmC3Wtk7ylMD0
LOW_POWER_LIMIT=30
PAY_HOST=https://cdzpay.staging.senthink.com
application/Events.php
View file @
39086e2f
...
...
@@ -13,6 +13,8 @@ use Application\route\Api;
use
Src\route\Route
;
use
Lib\station\gateway\Gateway
;
use
Lib\station\gateway\port\Port
;
use
Workerman\Lib\Timer
;
use
GuzzleHttp\Client
;
class
Events
{
...
...
@@ -33,6 +35,19 @@ class Events
public
static
function
onWorkerStart
()
{
Timer
::
add
(
10
*
6
*
10
,
function
()
{
$client
=
new
Client
([
'http_errors'
=>
false
]);
$response
=
$client
->
request
(
'POST'
,
getenv
(
'PAY_HOST'
)
.
'/api/wx/order/scanner'
,
[
'form_params'
=>
[
'key'
=>
'sE5jICwtbYrhnuSAUF3JTv0xXpQMG1Bfoy4aWgLP67zqKNVmd9O2HDei8lcZRk'
]
]);
});
static
::
$db
=
new
Connection
(
getenv
(
'DB_HOST'
),
getenv
(
'DB_PORT'
),
getenv
(
'DB_USERNAME'
),
getenv
(
'DB_PASSWORD'
),
getenv
(
'DB_DATABASE'
));
static
::
$redis
=
new
\Redis
();
...
...
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