21 lines
856 B
PHP
21 lines
856 B
PHP
<?php
|
||
namespace App\ServicePay;
|
||
class BasePay{
|
||
public $pay_gateway;//当前的支付通道实例
|
||
public $pay_config;//这个通道的支付配置信息
|
||
|
||
//第二部配置支付信息,payConfig
|
||
public function payConfig($type, $setConfig = [])
|
||
{
|
||
$config = [
|
||
'debug' => 1,//调试
|
||
'logDir' => to_linux_path(storage_path() . '/logs/'),
|
||
'mch_id' => $this->pay_gateway['app_id'], //客户交易者账号
|
||
'token' => $this->pay_gateway['app_key'],//密钥
|
||
'interface' => $this->pay_gateway['mch_id'],//账号名称 一般用来存放三方通道
|
||
'return_url' => action('Pay\PayController@returnNotify', ['type' => $type]),
|
||
'notify_url' => action('Pay\PayController@notify', ['type' => $type]),
|
||
];
|
||
$this->pay_config = $config;
|
||
}
|
||
} |