Completed
Push — master ( 56c44b...57c31b )
by Songda
05:33 queued 11s
created

GeneralPlugin::getMethod()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
nc 1
dl 0
loc 1
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yansongda\Pay\Plugin\Alipay;
6
7
use Closure;
8
use Yansongda\Pay\Contract\PluginInterface;
9
use Yansongda\Pay\Rocket;
10
11
abstract class GeneralPlugin implements PluginInterface
12
{
13
    public function assembly(Rocket $rocket, Closure $next): Rocket
14
    {
15
        $rocket->mergePayload([
16
            'method' => $this->getMethod(),
17
            'biz_content' => $rocket->getParams(),
18
        ]);
19
20
        return $next($rocket);
21
    }
22
23
    abstract protected function getMethod(): string;
24
}
25