Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
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
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
chenchuanwen
my-yaf-project
Commits
6326f4bc
Commit
6326f4bc
authored
Dec 10, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
硒鼓
parent
5898fa84
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
1 deletion
+5
-1
TencentPay.php
application/library/Payment/TencentPay.php
+3
-0
WxPay.php
application/library/Payment/WxPay.php
+1
-1
PaymentService.php
application/models/Business/Order/PaymentService.php
+1
-0
No files found.
application/library/Payment/TencentPay.php
View file @
6326f4bc
...
@@ -49,6 +49,7 @@ class TencentPay {
...
@@ -49,6 +49,7 @@ class TencentPay {
$this
->
parameters
[
'spbill_create_ip'
]
=
\Our\Common
::
getClientIp
();
$this
->
parameters
[
'spbill_create_ip'
]
=
\Our\Common
::
getClientIp
();
$this
->
parameters
[
'notify_url'
]
=
$this
->
notify_url
;
$this
->
parameters
[
'notify_url'
]
=
$this
->
notify_url
;
$this
->
parameters
[
'trade_type'
]
=
$this
->
tradeType
;
$this
->
parameters
[
'trade_type'
]
=
$this
->
tradeType
;
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$this
->
parameters
),
'/data/log/apptest'
);
//$this->parameters['openid']=$_SESSION['openid'];
//$this->parameters['openid']=$_SESSION['openid'];
//print_r($this->parameters);exit;
//print_r($this->parameters);exit;
$prepay_id
=
$this
->
getPrepayId
();
$prepay_id
=
$this
->
getPrepayId
();
...
@@ -80,6 +81,7 @@ class TencentPay {
...
@@ -80,6 +81,7 @@ class TencentPay {
$this
->
parameters
[
'spbill_create_ip'
]
=
\Our\Common
::
getClientIp
();
$this
->
parameters
[
'spbill_create_ip'
]
=
\Our\Common
::
getClientIp
();
$this
->
parameters
[
'notify_url'
]
=
$this
->
notify_url
;
$this
->
parameters
[
'notify_url'
]
=
$this
->
notify_url
;
$this
->
parameters
[
'trade_type'
]
=
$this
->
tradeType
;
$this
->
parameters
[
'trade_type'
]
=
$this
->
tradeType
;
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$this
->
parameters
),
'/data/log/apptest'
);
//$this->parameters['openid']=$_SESSION['openid'];
//$this->parameters['openid']=$_SESSION['openid'];
//print_r($this->parameters);exit;
//print_r($this->parameters);exit;
$prepay_id
=
$this
->
getPrepayId
();
$prepay_id
=
$this
->
getPrepayId
();
...
@@ -337,6 +339,7 @@ class TencentPay {
...
@@ -337,6 +339,7 @@ class TencentPay {
*/
*/
public
function
getNotifyInfo
()
{
public
function
getNotifyInfo
()
{
$xml
=
file_get_contents
(
"php://input"
);
$xml
=
file_get_contents
(
"php://input"
);
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$xml
),
'/data/log/apptest'
);
$this
->
saveData
(
$xml
);
$this
->
saveData
(
$xml
);
$verify
=
false
;
$verify
=
false
;
if
(
$this
->
checkSign
()
==
FALSE
){
if
(
$this
->
checkSign
()
==
FALSE
){
...
...
application/library/Payment/WxPay.php
View file @
6326f4bc
...
@@ -15,7 +15,7 @@ class WxPay extends \Payment\TencentPay
...
@@ -15,7 +15,7 @@ class WxPay extends \Payment\TencentPay
public
function
__construct
()
public
function
__construct
()
{
{
$this
->
appid
=
\Our\PayConst
::
wxPayAppId
;
$this
->
appid
=
\Our\PayConst
::
wxPayAppId
;
$this
->
notify_url
=
\Our\
NameConst
::
httpPrefix
.
$_SERVER
[
'SERVER_NAME'
]
.
\Our\PayConst
::
wxAppNotifyUrl
;
$this
->
notify_url
=
\Our\
Common
::
getBaseUrl
()
.
\Our\PayConst
::
wxAppNotifyUrl
;
$this
->
mch_id
=
\Our\PayConst
::
wxPayMchId
;
$this
->
mch_id
=
\Our\PayConst
::
wxPayMchId
;
$this
->
key
=
\Our\PayConst
::
wxPayKey
;
$this
->
key
=
\Our\PayConst
::
wxPayKey
;
$this
->
sslcert_path
=
\Our\PayConst
::
wxSslcertPath
;
$this
->
sslcert_path
=
\Our\PayConst
::
wxSslcertPath
;
...
...
application/models/Business/Order/PaymentService.php
View file @
6326f4bc
...
@@ -52,6 +52,7 @@ class PaymentServiceModel extends \Business\AbstractModel{
...
@@ -52,6 +52,7 @@ class PaymentServiceModel extends \Business\AbstractModel{
$param
[
'pay_type'
]
=
\Our\ApiConst
::
wxAppPayType
;
$param
[
'pay_type'
]
=
\Our\ApiConst
::
wxAppPayType
;
}
}
$callbackInfo
=
$wxpay
->
getNotifyInfo
();
$callbackInfo
=
$wxpay
->
getNotifyInfo
();
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$callbackInfo
),
'/data/log/apptest'
);
if
(
$callbackInfo
)
{
if
(
$callbackInfo
)
{
//验证成功
//验证成功
$param
[
'paySn'
]
=
$callbackInfo
[
'out_trade_no'
];
$param
[
'paySn'
]
=
$callbackInfo
[
'out_trade_no'
];
...
...
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