Commit 092b1a64 by 冷斌

fix bug

parent 270e7a4f
...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
namespace Appapi\Controller; namespace Appapi\Controller;
use Common\Controller\HomebaseController; use Common\Controller\HomebaseController;
use Yansongda\Pay\Pay;
class RechangeController extends HomebaseController class RechangeController extends HomebaseController
{ {
...@@ -17,6 +18,27 @@ class RechangeController extends HomebaseController ...@@ -17,6 +18,27 @@ class RechangeController extends HomebaseController
{ {
$this->display(); $this->display();
} }
protected function getWxConfig()
{
return [
'appid' => 'wx98dd4477b89cb388', // app 开放平台的APPID
'app_id' => 'wx37327dbb9d7b33f3', // 公众号 APPID
'miniapp_id' => '', //小程序 APPID
'appSecret' => '7f8291af4e0795ee375f66487a721627', // 公众号 秘钥
'mch_id' => '1587472431', // 商户号 id
'key' => 'hkLfAAmPx6TxsinuyciefzFivk6yE4r4', // 商户 key
'notify_url' => '/pay/wx',
// 'cert_client' => __DIR__ . '/apiclient_cert.pem', // optional, 退款,红包等情况时需要用到
// 'cert_key' => __DIR__ . '/apiclient_key.pem',// optional, 退款,红包等情况时需要用到
];
}
public function wx()
{
$config = $this->getWxConfig();
var_dump(Pay::wechat($config));
}
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment