QueryRefundPlugin   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 7
c 1
b 0
f 0
dl 0
loc 14
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A assembly() 0 12 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yansongda\Pay\Plugin\Alipay\V2\Pay\Pos;
6
7
use Closure;
8
use Yansongda\Artful\Contract\PluginInterface;
9
use Yansongda\Artful\Logger;
10
use Yansongda\Artful\Rocket;
11
12
/**
13
 * @see https://opendocs.alipay.com/open/c1cb8815_alipay.trade.fastpay.refund.query?pathHash=6557d527&ref=api&scene=common
14
 */
15
class QueryRefundPlugin implements PluginInterface
16
{
17
    public function assembly(Rocket $rocket, Closure $next): Rocket
18
    {
19
        Logger::debug('[Alipay][Pay][Pos][QueryRefundPlugin] 插件开始装载', ['rocket' => $rocket]);
20
21
        $rocket->mergePayload([
22
            'method' => 'alipay.trade.fastpay.refund.query',
23
            'biz_content' => $rocket->getParams(),
24
        ]);
25
26
        Logger::info('[Alipay][Pay][Pos][QueryRefundPlugin] 插件装载完毕', ['rocket' => $rocket]);
27
28
        return $next($rocket);
29
    }
30
}
31