first commit
This commit is contained in:
44
vendor/yansongda/pay/src/Plugin/Alipay/Trade/WapPayPlugin.php
vendored
Normal file
44
vendor/yansongda/pay/src/Plugin/Alipay/Trade/WapPayPlugin.php
vendored
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Yansongda\Pay\Plugin\Alipay\Trade;
|
||||
|
||||
use Closure;
|
||||
use Yansongda\Pay\Contract\PluginInterface;
|
||||
use Yansongda\Pay\Logger;
|
||||
use Yansongda\Pay\Parser\ResponseParser;
|
||||
use Yansongda\Pay\Rocket;
|
||||
use Yansongda\Pay\Traits\SupportServiceProviderTrait;
|
||||
|
||||
class WapPayPlugin implements PluginInterface
|
||||
{
|
||||
use SupportServiceProviderTrait;
|
||||
|
||||
/**
|
||||
* @throws \Yansongda\Pay\Exception\ContainerDependencyException
|
||||
* @throws \Yansongda\Pay\Exception\ContainerException
|
||||
* @throws \Yansongda\Pay\Exception\ServiceNotFoundException
|
||||
*/
|
||||
public function assembly(Rocket $rocket, Closure $next): Rocket
|
||||
{
|
||||
Logger::info('[alipay][WapPayPlugin] 插件开始装载', ['rocket' => $rocket]);
|
||||
|
||||
$this->loadAlipayServiceProvider($rocket);
|
||||
|
||||
$rocket->setDirection(ResponseParser::class)
|
||||
->mergePayload([
|
||||
'method' => 'alipay.trade.wap.pay',
|
||||
'biz_content' => array_merge(
|
||||
[
|
||||
'product_code' => 'QUICK_WAP_PAY',
|
||||
],
|
||||
$rocket->getParams(),
|
||||
),
|
||||
]);
|
||||
|
||||
Logger::info('[alipay][WapPayPlugin] 插件装载完毕', ['rocket' => $rocket]);
|
||||
|
||||
return $next($rocket);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user