Пример #1
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     $this->locator = new ServiceLocator();
     if ($this->username && $this->password) {
         \Twocheckout::username($this->username);
         \Twocheckout::password($this->password);
     }
     if (!$this->privateKey) {
         throw new InvalidConfigException('Invalid private key was specified');
     }
     \Twocheckout::privateKey($this->privateKey);
     if (!$this->sellerId) {
         throw new InvalidConfigException('Invalid seller id was specified');
     }
     \Twocheckout::sellerId($this->sellerId);
     if (!$this->secretWord) {
         throw new InvalidConfigException('Invalid secret word was specified');
     }
     \TwoCheckout::verifySSL($this->verifySSL);
     \Twocheckout::sandbox($this->sandbox);
     \Twocheckout::format($this->format);
 }
 public static function format($value = null)
 {
     self::$format = $value;
 }