Beispiel #1
0
 function setOptions($opt = array())
 {
     if (!isset($opt['merchant']) || !isset($opt['secretkey'])) {
         die("No params");
     }
     self::$merchant = $opt['merchant'];
     self::$key = $opt['secretkey'];
     unset($opt['merchant'], $opt['secretkey']);
     if (count($opt) === 0) {
         return $this;
     }
     foreach ($opt as $k => $v) {
         $this->{$k} = $v;
     }
     return $this;
 }