Пример #1
0
 public function init()
 {
     parent::init();
     $needs = array('partner', 'key', 'key_path', 'ali_pub_path');
     foreach ($needs as $need) {
         if (empty($this->{$need})) {
             throw new InvalidConfigException(get_class($this) . " must define alipay's params {$need}.");
         }
     }
 }
Пример #2
0
 public function init()
 {
     parent::init();
     $needs = array('appid', 'mch_id', 'key', 'secret');
     foreach ($needs as $need) {
         if (empty($this->{$need})) {
             throw new InvalidConfigException(get_class($this) . " must define weixin's params {$need}.");
         }
     }
 }