李帅

1.打印paypal token

......@@ -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){
......