Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pay
Project
Project
Details
Activity
Releases
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
bp
pay
Commits
f6f4dab6
Commit
f6f4dab6
authored
Jul 27, 2021
by
wanjilong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add: 增加订单支付时间的判断,增加订单商品超时的判断
parent
111294e8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
7 deletions
+9
-7
PayException.php
application/exception/custom/PayException.php
+1
-3
DingTalk.php
application/library/Helpers/DingTalk.php
+0
-4
PayService.php
application/services/pay/PayService.php
+8
-0
No files found.
application/exception/custom/PayException.php
View file @
f6f4dab6
...
@@ -28,9 +28,7 @@ class PayException extends BaseException
...
@@ -28,9 +28,7 @@ class PayException extends BaseException
13
=>
'生活号获取管理员ID失败,请联系管理员'
,
13
=>
'生活号获取管理员ID失败,请联系管理员'
,
14
=>
'订单缺少商品信息,请联系管理员'
,
14
=>
'订单缺少商品信息,请联系管理员'
,
15
=>
'订单存在过期商品,不能支付'
,
15
=>
'订单存在过期商品,不能支付'
,
16
=>
'订单过期,不允许支付'
,
];
];
}
}
application/library/Helpers/DingTalk.php
View file @
f6f4dab6
<?php
<?php
namespace
Helpers
;
namespace
Helpers
;
use
Api\PhpUtils\Log\FileLog
;
use
Helpers\Tracer
;
use
Helpers\Tracer
;
use
Api\PhpUtils\Http\HttpUtil
;
use
Api\PhpUtils\Http\Request
;
use
App\Exception\BaseException
;
/**
/**
* DingTalk 获取接口
* DingTalk 获取接口
...
...
application/services/pay/PayService.php
View file @
f6f4dab6
...
@@ -50,6 +50,14 @@ class PayService
...
@@ -50,6 +50,14 @@ class PayService
throw
new
PayException
([
'cus'
=>
3
]);
throw
new
PayException
([
'cus'
=>
3
]);
}
}
if
(
!
empty
(
$order_info
[
'pay_expiration_time'
]))
{
$pay_expiration_time
=
strtotime
(
$order_info
[
'pay_expiration_time'
]);
if
(
$pay_expiration_time
<
time
())
{
throw
new
PayException
([
'cus'
=>
16
]);
}
}
if
(
empty
(
$data
[
'result'
][
'order_item_list'
]))
{
if
(
empty
(
$data
[
'result'
][
'order_item_list'
]))
{
throw
new
PayException
([
'cus'
=>
14
]);
throw
new
PayException
([
'cus'
=>
14
]);
}
}
...
...
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