codex基础代码更新

This commit is contained in:
技术老胡
2026-03-20 10:31:13 +08:00
parent 7e545f0621
commit f3919c9899
36 changed files with 5060 additions and 1459 deletions

View File

@@ -6,6 +6,7 @@ namespace app\common\contracts;
use app\exceptions\PaymentException;
use support\Request;
use support\Response;
/**
* 支付插件接口
@@ -81,4 +82,8 @@ interface PaymentInterface
* @throws PaymentException 验签失败、数据异常等
*/
public function notify(Request $request): array;
public function notifySuccess(): string|Response;
public function notifyFail(): string|Response;
}

View File

@@ -9,6 +9,7 @@ use app\common\contracts\PaymentInterface;
use app\exceptions\PaymentException;
use Psr\Http\Message\ResponseInterface;
use support\Request;
use support\Response;
use Yansongda\Pay\Pay;
use Yansongda\Supports\Collection;
@@ -267,4 +268,13 @@ class AlipayPayment extends BasePayment implements PaymentInterface
throw new PaymentException('支付宝回调验签失败:' . $e->getMessage(), 402);
}
}
public function notifySuccess(): string|Response
{
return 'success';
}
public function notifyFail(): string|Response
{
return 'fail';
}
}

View File

@@ -7,6 +7,7 @@ use app\common\base\BasePayment;
use app\common\contracts\PaymentInterface;
use app\exceptions\PaymentException;
use support\Request;
use support\Response;
/**
* 拉卡拉支付插件(最小可用示例)
@@ -74,5 +75,13 @@ class LakalaPayment extends BasePayment implements PaymentInterface
{
throw new PaymentException('LakalaPayment::notify 暂未实现', 402);
}
}
public function notifySuccess(): string|Response
{
return 'success';
}
public function notifyFail(): string|Response
{
return 'fail';
}
}