We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 04b28c1 + c409d5d commit eb00e7aCopy full SHA for eb00e7a
1 file changed
common/components/payment/WechatPay.php
@@ -65,6 +65,19 @@ private function create($type)
65
$gateway->setCertPath(Yii::getAlias($this->config['cert_client']));
66
$gateway->setKeyPath(Yii::getAlias($this->config['cert_key']));
67
68
+ /**解决omnipay和easywechat衔接之间缺少配置的问题*/
69
+ if($type == 'WechatPay_Js')
70
+ {
71
+ Yii::$app->params['wechatPaymentConfig'] = [
72
+ 'app_id' => $this->config['app_id'],
73
+ 'mch_id' => $this->config['mch_id'],
74
+ 'key' => $this->config['api_key'],
75
+ 'cert_path' => Yii::getAlias($this->config['cert_client']),
76
+ 'key_path' => Yii::getAlias($this->config['cert_key']),
77
+ ];
78
+ }
79
+
80
81
return $gateway;
82
}
83
0 commit comments