init
- 框架初始化 - 安装插件 - 修复PHP8.4报错
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Plugin\Alipay\Ebpp;
|
||||
|
||||
use Yansongda\Pay\Plugin\Alipay\GeneralPlugin;
|
||||
|
||||
/**
|
||||
* @see https://opendocs.alipay.com/open/02hd36
|
||||
*/
|
||||
class PdeductBillStatusPlugin extends GeneralPlugin
|
||||
{
|
||||
protected function getMethod(): string
|
||||
{
|
||||
return 'alipay.ebpp.pdeduct.bill.pay.status';
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Plugin\Alipay\Ebpp;
|
||||
|
||||
use Closure;
|
||||
use Yansongda\Pay\Contract\PluginInterface;
|
||||
use Yansongda\Pay\Logger;
|
||||
use Yansongda\Pay\Rocket;
|
||||
|
||||
/**
|
||||
* @see https://opendocs.alipay.com/open/02hd35
|
||||
*/
|
||||
class PdeductPayPlugin implements PluginInterface
|
||||
{
|
||||
public function assembly(Rocket $rocket, Closure $next): Rocket
|
||||
{
|
||||
Logger::debug('[alipay][PdeductPayPlugin] 插件开始装载', ['rocket' => $rocket]);
|
||||
|
||||
$rocket->mergePayload([
|
||||
'method' => 'alipay.ebpp.pdeduct.pay',
|
||||
'biz_content' => array_merge(
|
||||
[
|
||||
'agent_channel' => 'PUBLICFORM',
|
||||
],
|
||||
$rocket->getParams(),
|
||||
),
|
||||
]);
|
||||
|
||||
Logger::info('[alipay][PdeductPayPlugin] 插件装载完毕', ['rocket' => $rocket]);
|
||||
|
||||
return $next($rocket);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Plugin\Alipay\Ebpp;
|
||||
|
||||
use Closure;
|
||||
use Yansongda\Pay\Contract\PluginInterface;
|
||||
use Yansongda\Pay\Logger;
|
||||
use Yansongda\Pay\Rocket;
|
||||
|
||||
/**
|
||||
* @see https://opendocs.alipay.com/open/02hd33
|
||||
*/
|
||||
class PdeductSignAddPlugin implements PluginInterface
|
||||
{
|
||||
public function assembly(Rocket $rocket, Closure $next): Rocket
|
||||
{
|
||||
Logger::debug('[alipay][PdeductSignAddPlugin] 插件开始装载', ['rocket' => $rocket]);
|
||||
|
||||
$rocket->mergePayload([
|
||||
'method' => 'alipay.ebpp.pdeduct.sign.add',
|
||||
'biz_content' => array_merge(
|
||||
[
|
||||
'charge_inst' => 'CQCENTERELECTRIC',
|
||||
'agent_channel' => 'PUBLICPLATFORM',
|
||||
'deduct_prod_code' => 'INST_DIRECT_DEDUCT',
|
||||
],
|
||||
$rocket->getParams(),
|
||||
),
|
||||
]);
|
||||
|
||||
Logger::info('[alipay][PdeductSignAddPlugin] 插件装载完毕', ['rocket' => $rocket]);
|
||||
|
||||
return $next($rocket);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Plugin\Alipay\Ebpp;
|
||||
|
||||
use Closure;
|
||||
use Yansongda\Pay\Contract\PluginInterface;
|
||||
use Yansongda\Pay\Logger;
|
||||
use Yansongda\Pay\Rocket;
|
||||
|
||||
/**
|
||||
* @see https://opendocs.alipay.com/open/02hd34
|
||||
*/
|
||||
class PdeductSignCancelPlugin implements PluginInterface
|
||||
{
|
||||
public function assembly(Rocket $rocket, Closure $next): Rocket
|
||||
{
|
||||
Logger::debug('[alipay][PdeductSignCancelPlugin] 插件开始装载', ['rocket' => $rocket]);
|
||||
|
||||
$rocket->mergePayload([
|
||||
'method' => 'alipay.ebpp.pdeduct.sign.cancel',
|
||||
'biz_content' => array_merge(
|
||||
[
|
||||
'agent_channel' => 'PUBLICPLATFORM',
|
||||
],
|
||||
$rocket->getParams(),
|
||||
),
|
||||
]);
|
||||
|
||||
Logger::info('[alipay][PdeductSignCancelPlugin] 插件装载完毕', ['rocket' => $rocket]);
|
||||
|
||||
return $next($rocket);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user