vendor/payum/core/Payum/Core/Model/Token.php line 8

Open in your IDE?
  1. <?php
  2. namespace Payum\Core\Model;
  3. use Payum\Core\Security\TokenInterface;
  4. use Payum\Core\Security\Util\Random;
  5. use Payum\Core\Storage\IdentityInterface;
  6. class Token implements TokenInterface
  7. {
  8.     /**
  9.      * @var IdentityInterface
  10.      */
  11.     protected $details;
  12.     /**
  13.      * @var string
  14.      */
  15.     protected $hash;
  16.     /**
  17.      * @var string
  18.      */
  19.     protected $afterUrl;
  20.     /**
  21.      * @var string
  22.      */
  23.     protected $targetUrl;
  24.     /**
  25.      * @var string
  26.      */
  27.     protected $gatewayName;
  28.     public function __construct()
  29.     {
  30.         $this->hash Random::generateToken();
  31.     }
  32.     /**
  33.      * {@inheritDoc}
  34.      *
  35.      * @return Identity
  36.      */
  37.     public function getDetails()
  38.     {
  39.         return $this->details;
  40.     }
  41.     /**
  42.      * {@inheritDoc}
  43.      */
  44.     public function setDetails($details)
  45.     {
  46.         $this->details $details;
  47.     }
  48.     /**
  49.      * {@inheritDoc}
  50.      */
  51.     public function getHash()
  52.     {
  53.         return $this->hash;
  54.     }
  55.     /**
  56.      * {@inheritDoc}
  57.      */
  58.     public function setHash($hash)
  59.     {
  60.         $this->hash $hash;
  61.     }
  62.     /**
  63.      * {@inheritDoc}
  64.      */
  65.     public function getTargetUrl()
  66.     {
  67.         return $this->targetUrl;
  68.     }
  69.     /**
  70.      * {@inheritDoc}
  71.      */
  72.     public function setTargetUrl($targetUrl)
  73.     {
  74.         $this->targetUrl $targetUrl;
  75.     }
  76.     /**
  77.      * {@inheritDoc}
  78.      */
  79.     public function getAfterUrl()
  80.     {
  81.         return $this->afterUrl;
  82.     }
  83.     /**
  84.      * {@inheritDoc}
  85.      */
  86.     public function setAfterUrl($afterUrl)
  87.     {
  88.         $this->afterUrl $afterUrl;
  89.     }
  90.     /**
  91.      * {@inheritDoc}
  92.      */
  93.     public function getGatewayName()
  94.     {
  95.         return $this->gatewayName;
  96.     }
  97.     /**
  98.      * {@inheritDoc}
  99.      */
  100.     public function setGatewayName($gatewayName)
  101.     {
  102.         $this->gatewayName $gatewayName;
  103.     }
  104. }