Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
ldy
/
payment
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c86cffc0
authored
Nov 02, 2018
by
yeran
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update getNotifyData for MiNotify by yeran
1 parent
a2ae41ce
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
1 deletions
examples/mipay/liteCharge.php
src/Notify/MiNotify.php
examples/mipay/liteCharge.php
View file @
c86cffc
...
...
@@ -11,7 +11,7 @@ date_default_timezone_set('Asia/Shanghai');
$miConfig
=
require_once
'MiConfig.php'
;
$orderNo
=
1213456798
1
211
;
//time() . rand(1000, 9999);
$orderNo
=
1213456798
0
211
;
//time() . rand(1000, 9999);
// 订单信息
$payData
=
[
'body'
=>
'商品名称'
,
...
...
src/Notify/MiNotify.php
View file @
c86cffc
...
...
@@ -45,6 +45,14 @@ class MiNotify extends NotifyStrategy
foreach
(
$_POST
as
$key
=>
$val
)
{
//动态遍历获取所有收到的参数,此步非常关键
$params
[
$key
]
=
$val
;
}
//支持直接读取input流
$data
=
@
file_get_contents
(
'php://input'
);
if
(
!
empty
(
$data
)){
$inputArray
=
json_decode
(
$data
,
true
);
$params
=
array_merge
(
$params
,
$inputArray
);
}
if
(
count
(
$params
)
<
1
){
//如果参数为空,则不进行处理
return
false
;
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment