1. 完善易支付API调用全流程

2. 确定支付插件继承基础类和接口规范
3. 引入Yansongda\Pay支付快捷工具
4. 重新整理代码和功能结构
This commit is contained in:
技术老胡
2026-03-12 19:18:21 +08:00
parent 5dae6e7174
commit fa3abdcaff
19 changed files with 1042 additions and 578 deletions

View File

@@ -0,0 +1,25 @@
<?php
namespace app\exceptions;
use Webman\Exception\BusinessException;
/**
* 支付业务异常
*
* 用于支付相关业务错误,如:下单失败、退款失败、验签失败、渠道异常等。
*
* 示例:
* throw new PaymentException('当前环境无可用支付产品');
* throw new PaymentException('渠道返回错误', 402, ['channel_code' => 'lakala']);
*/
class PaymentException extends BusinessException
{
public function __construct(string $message = '支付业务异常', int $bizCode = 402, array $data = [])
{
parent::__construct($message, $bizCode);
if (!empty($data)) {
$this->data($data);
}
}
}