Showing
1 changed file
with
9 additions
and
5 deletions
... | @@ -45,15 +45,19 @@ class ApplePayment implements PaymentInterface | ... | @@ -45,15 +45,19 @@ class ApplePayment implements PaymentInterface |
45 | Log::debug(print_r($data,true)); | 45 | Log::debug(print_r($data,true)); |
46 | } | 46 | } |
47 | 47 | ||
48 | - public function notifySandbox($all) | 48 | + public function notifySandbox($string) |
49 | { | 49 | { |
50 | Log::debug('sandbox返回的数据:===================='); | 50 | Log::debug('sandbox返回的数据:===================='); |
51 | - Log::debug(print_r($all["signedPayload"],true)); | 51 | + Log::debug($string); |
52 | - | ||
53 | - $data = base64_decode($all['signedPayload']); | ||
54 | - Log::debug(print_r($data,true)); | ||
55 | 52 | ||
53 | + $components = explode('.',$string); | ||
54 | + if (count($components) < 3){ | ||
55 | + Log::error("jwt错误"); | ||
56 | + return false; | ||
57 | + } | ||
56 | 58 | ||
59 | + $header = json_decode(base64_decode($components[0]),true); | ||
57 | 60 | ||
61 | + Log::debug(print_r($header,true)); | ||
58 | } | 62 | } |
59 | } | 63 | } |
... | \ No newline at end of file | ... | \ No newline at end of file | ... | ... |
-
Please register or login to post a comment