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-12-20 23:48:23 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
2f92024a72616b9562dcbf1437950944395b3bb4
2f92024a
1 parent
373f9726
1.打印苹果日志
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
app/Payment/ApplePayment.php
app/Payment/ApplePayment.php
View file @
2f92024
...
...
@@ -80,7 +80,7 @@ class ApplePayment implements PaymentInterface
}
*/
$signedTransactionInfoString
=
$responseBodyPayload
[
'data'
][
'signedTransactionInfo'
]
;
$signedTransactionInfoString
=
$responseBodyPayload
->
data
->
signedTransactionInfo
;
$components
=
explode
(
'.'
,
$signedTransactionInfoString
);
$header
=
json_decode
(
base64_decode
(
$components
[
0
]),
true
);
if
(
count
(
$components
)
<
3
){
...
...
@@ -105,7 +105,7 @@ class ApplePayment implements PaymentInterface
"signedDate": 1671451705700
"environment": "Sandbox"
}*/
$signedRenewalInfoString
=
$responseBodyPayload
[
'data'
][
'signedRenewalInfo'
]
;
$signedRenewalInfoString
=
$responseBodyPayload
->
data
->
signedRenewalInfo
;
$components
=
explode
(
'.'
,
$signedRenewalInfoString
);
$header
=
json_decode
(
base64_decode
(
$components
[
0
]),
true
);
if
(
count
(
$components
)
<
3
){
...
...
@@ -155,7 +155,7 @@ class ApplePayment implements PaymentInterface
try
{
$decode
=
JWT
::
decode
(
$string
,
new
Key
(
$public_key
,
"ES256"
));
return
(
array
)
$decode
;
return
$decode
;
}
catch
(
SignatureInvalidException
$exception
){
Log
::
error
(
"Signature Invalid!"
);
return
false
;
...
...
Please
register
or
login
to post a comment