You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.1 KiB

<?php
namespace tencent\wechat\pay;
class Base
{
protected $wxpayConfig; //EasyWeChat配置--微信支付
/**
* 构造函数
* @date 2021-01-19
*/
public function __construct(array $data = [])
{
//微信支付EasyWeChat配置
$this->wxpayConfig = [
'app_id' => $data['app_id'],
'mch_id' => $data['mch_id'],
'key' => $data['app_secret'],
'response_type' => 'array',
// 如需使用敏感接口(如退款、发送红包等)需要配置 API 证书路径(登录商户平台下载 API 证书)
'cert_path' => $data['cert_path'], // XXX: 绝对路径!!!!
'key_path' => $data['key_path'], // XXX: 绝对路径!!!!
'notify_url' => '默认的订单回调地址', // 你也可以在下单时单独设置来想覆盖它
];
$this->wxConfig = [
'app_id' => $data['app_id'],
'secret' => $data['app_secret'],
'response_type' => 'array',
];
}
}