View file ProForum/Files/application/app/Http/Controllers/Gateway/PaypalSdk/Core/AccessToken.php

File size: 505B
<?php

namespace App\Http\Controllers\Gateway\PaypalSdk\Core;


class AccessToken
{
    public $token;
    public $tokenType;
    public $expiresIn;
    private $createDate;

    public function __construct($token, $tokenType, $expiresIn)
    {
        $this->token = $token;
        $this->tokenType = $tokenType;
        $this->expiresIn = $expiresIn;
        $this->createDate = time();
    }

    public function isExpired()
    {
        return time() >= $this->createDate + $this->expiresIn;
    }
}