Completed
Push — master ( 8d88b0...6868b4 )
by Songda
01:30
created

AppGateway::getPayProductCode()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace Yansongda\Pay\Gateways\Alipay;
4
5
/**
6
 * AppGateway.
7
 */
8
class AppGateway extends Alipay
9
{
10
    /**
11
     * [getMethod description].
12
     *
13
     * @author yansongda <[email protected]>
14
     *
15
     * @version 2017-08-10
16
     *
17
     * @return  [type]     [description]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
18
     */
19
    protected function getPayMethod()
20
    {
21
        return 'alipay.trade.app.pay';
22
    }
23
24
    /**
25
     * [getProductCode description].
26
     *
27
     * @author yansongda <[email protected]>
28
     *
29
     * @version 2017-08-10
30
     *
31
     * @return  [type]     [description]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
32
     */
33
    protected function getPayProductCode()
34
    {
35
        return 'QUICK_MSECURITY_PAY';
36
    }
37
38
    /**
39
     * [pay description].
40
     * 
41
     * @author yansongda <[email protected]>
42
     * 
43
     * @version 2017-08-16
44
     * 
45
     * @param   array      $config_biz 业务参数
46
     * 
47
     * @return  [type]                 [description]
0 ignored issues
show
Documentation introduced by
The doc-type [type] could not be parsed: Unknown type name "" at position 0. [(view supported doc-types)

This check marks PHPDoc comments that could not be parsed by our parser. To see which comment annotations we can parse, please refer to our documentation on supported doc-types.

Loading history...
48
     */
49 View Code Duplication
    public function pay(array $config_biz = [])
1 ignored issue
show
Duplication introduced by
This method seems to be duplicated in your project.

Duplicated code is one of the most pungent code smells. If you need to duplicate the same code in three or more different places, we strongly encourage you to look into extracting the code into a single class or operation.

You can also find more detailed suggestions in the “Code” section of your repository.

Loading history...
50
    {
51
        $config_biz['product_code'] = $this->getPayProductCode();
52
53
        $this->config['method'] = $this->getPayMethod();
54
        $this->config['biz_content'] = json_encode($config_biz, JSON_UNESCAPED_UNICODE);
55
        $this->config['sign'] = $this->getSign();
56
57
        return http_build_query($this->config);
58
    }
59
}
60