Passed
Pull Request — master (#662)
by Songda
01:49
created

ScanFeePlugin   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A doSomething() 0 7 1
A getUri() 0 3 1
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Yansongda\Pay\Plugin\Unipay\QrCode;
6
7
use Yansongda\Pay\Plugin\Unipay\GeneralPlugin;
8
use Yansongda\Pay\Rocket;
9
10
/**
11
 * @see https://open.unionpay.com/tjweb/acproduct/APIList?acpAPIId=796&apiservId=468&version=V2.2&bussType=0
12
 */
13
class ScanFeePlugin extends GeneralPlugin
14
{
15
    protected function getUri(Rocket $rocket): string
16
    {
17
        return 'gateway/api/backTransReq.do';
18
    }
19
20
    protected function doSomething(Rocket $rocket): void
21
    {
22
        $rocket->mergePayload([
23
            'bizType' => '000601',
24
            'txnType' => '13',
25
            'txnSubType' => '08',
26
            'channelType' => '08',
27
        ]);
28
    }
29
}
30