コード例 #1
0
ファイル: Alipay.php プロジェクト: bbcsky/yii2-payment
 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
ファイル: Weixin.php プロジェクト: bbcsky/yii2-payment
 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}.");
         }
     }
 }