public static function instance()
 {
     if (!isset(self::$instance)) {
         self::$instance = new self();
     }
     return self::$instance;
 }
 public function __construct($attributes = array())
 {
     if (Samurai::$sandbox) {
         $attributes = array_merge($attributes, array('sandbox' => true));
     }
     $this->attributes = array_merge($this->attributes, $attributes);
     $this->isNew = !isset($attributes['payment_method_token']);
     $this->connection = Samurai_Connection::instance();
 }
Esempio n. 3
0
 public function __construct($processorToken)
 {
     $this->processorToken = $processorToken;
     $this->connection = Samurai_Connection::instance();
 }
 public function __construct($attributes = array())
 {
     $this->attributes = array_merge($this->attributes, $attributes);
     $this->connection = Samurai_Connection::instance();
 }