Store the customized Shopro mall so it can be kept on the remote.
Co-authored-by: Cursor <cursoragent@cursor.com>
这个提交包含在:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Traits;
|
||||
|
||||
use Yansongda\Artful\Exception\ContainerException;
|
||||
use Yansongda\Artful\Exception\ServiceNotFoundException;
|
||||
use Yansongda\Artful\Rocket;
|
||||
use Yansongda\Pay\Pay;
|
||||
|
||||
use function Yansongda\Pay\get_provider_config;
|
||||
|
||||
trait SupportServiceProviderTrait
|
||||
{
|
||||
/**
|
||||
* @throws ContainerException
|
||||
* @throws ServiceNotFoundException
|
||||
*/
|
||||
protected function loadAlipayServiceProvider(Rocket $rocket): void
|
||||
{
|
||||
$params = $rocket->getParams();
|
||||
$config = get_provider_config('alipay', $params);
|
||||
$serviceProviderId = $config['service_provider_id'] ?? null;
|
||||
|
||||
if (Pay::MODE_SERVICE !== ($config['mode'] ?? Pay::MODE_NORMAL)
|
||||
|| empty($serviceProviderId)) {
|
||||
return;
|
||||
}
|
||||
|
||||
$rocket->mergeParams([
|
||||
'extend_params' => array_merge($params['extend_params'] ?? [], ['sys_service_provider_id' => $serviceProviderId]),
|
||||
]);
|
||||
}
|
||||
}
|
||||
在新工单中引用
屏蔽一个用户