Skip to content

Commit

Permalink
weixin 配置文件
Browse files Browse the repository at this point in the history
  • Loading branch information
fancyecommerce committed Jul 5, 2019
1 parent 0aad0ce commit 1d26448
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
3 changes: 1 addition & 2 deletions config/services/Helper.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
*/
'wx' => [
'class' => 'fecshop\services\helper\Wx',
'microProgramAppId' => 'wxedc77529191bc54f',
'microProgramSecret' => '3b97c3fb4edeb0ca25e5386d753347a9',
'configFile' => '@common/config/payment/wxpay/lib/WxPay.Micro.Config.php',
],
'errors' => [
'class' => 'fecshop\services\helper\Errors',
Expand Down
13 changes: 6 additions & 7 deletions services/helper/Wx.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@
class Wx extends Service
{
public $wxApiBaseUrl = 'https://api.weixin.qq.com';
//public $configFile;
public $configFile;

// APPID:绑定支付的APPID
public $microProgramAppId ;
// 小程序secert
public $microProgramSecret;
/*

public function init()
{
parent::init();
Expand All @@ -37,12 +37,11 @@ public function init()
throw new InvalidConfigException('wxpay config file:['.$wxpayConfigFile.'] is not exist');
}
require_once($wxpayConfigFile);
$this->appId = \WxPayConfig::APPID;
$this->mchID = \WxPayConfig::MCHID;
$this->appSecret = \WxPayConfig::APPSECRET;
$this->paymentKey = \WxPayConfig::KEY;
// 通过上面的小程序,设置配置信息
$this->microProgramAppId = \WxPayConfig::APPID;
$this->microProgramSecret = \WxPayConfig::APPSECRET;
}
*/


/**
* @param $code | string, 微信登陆的code
Expand Down

0 comments on commit 1d26448

Please sign in to comment.