2026-03-21 02:55:24 +08:00
|
|
|
<?php
|
|
|
|
|
// +----------------------------------------------------------------------
|
2026-03-29 11:22:52 +08:00
|
|
|
// | Author: ScottPan Team
|
2026-03-21 02:55:24 +08:00
|
|
|
// +----------------------------------------------------------------------
|
2026-03-29 11:22:52 +08:00
|
|
|
|
2026-03-21 02:55:24 +08:00
|
|
|
namespace crmeb\basic;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Class BasePay
|
|
|
|
|
* @package crmeb\basic
|
|
|
|
|
*/
|
|
|
|
|
abstract class BasePay extends BaseStorage
|
|
|
|
|
{
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 支付参数配置
|
|
|
|
|
* @var array
|
|
|
|
|
*/
|
|
|
|
|
protected $configPay = [];
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 发起支付
|
|
|
|
|
* @param array|null $configPay
|
|
|
|
|
* @return mixed
|
|
|
|
|
*/
|
|
|
|
|
abstract public function pay(?array $configPay = []);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 退款
|
|
|
|
|
* @param array|null $configPay
|
|
|
|
|
* @return mixed
|
|
|
|
|
*/
|
|
|
|
|
abstract public function refund(?array $configPay = []);
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 设置支付参数
|
|
|
|
|
* @param array $configPay
|
|
|
|
|
* @return $this
|
|
|
|
|
*/
|
|
|
|
|
public function setConfigPay(array $configPay)
|
|
|
|
|
{
|
|
|
|
|
$this->configPay = $configPay;
|
|
|
|
|
return $this;
|
|
|
|
|
}
|
|
|
|
|
}
|