Toggle navigation
Toggle navigation
This project
Loading...
Sign in
OnePoem
/
OnePoem-Server
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
李帅
2022-05-31 23:24:59 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
77513cf3b35ec5aa9e6ac0da16400a2c810fe8c9
77513cf3
1 parent
e531f5c2
1.打印paypal token
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletions
app/Payment/PaypalPayment.php
app/Payment/PaypalPayment.php
View file @
77513cf
...
...
@@ -40,6 +40,7 @@ class PaypalPayment implements PaymentInterface
$redis
=
Redis
::
connection
();
$access_token
=
$redis
->
get
(
'paypal:access_token'
);
if
(
$access_token
){
Log
::
channel
(
'daily'
)
->
debug
(
$access_token
);
$this
->
accessToken
=
$access_token
;
}
else
{
$client
=
new
Client
([
...
...
@@ -56,7 +57,7 @@ class PaypalPayment implements PaymentInterface
$body
=
$response
->
getBody
();
$content
=
json_decode
(
$body
->
getContents
(),
true
);
$this
->
accessToken
=
$content
[
'access_token'
];
Log
::
channel
(
'daily'
)
->
debug
(
$content
[
'access_token'
]);
$redis
->
setex
(
'paypal:access_token'
,
$content
[
'expires_in'
],
$content
[
'access_token'
]);
}
}
catch
(
\Exception
$exception
){
...
...
Please
register
or
login
to post a comment