sifangpay/app/ServicePay/BasePay.php

21 lines
856 B
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?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;
}
}