Passed
Push — master ( 510fa6...c11190 )
by ma
03:02
created

H5   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Importance

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

1 Method

Rating   Name   Duplication   Size   Complexity  
A request() 0 3 1
1
<?php
2
3
namespace tinymeng\Chinaums\Service\Alipay;
4
5
use tinymeng\Chinaums\Service\Common\Base;
6
7
/**
8
 * H5 支付
9
 */
10
class H5 extends Base
11
{
12
    /**
13
     * @var string 接口地址
14
     */
15
    protected $api = '/v1/netpay/trade/h5-pay';
16
    /**
17
     * @var array $body 请求参数
18
     */
19
    protected $body = [
20
        'instMid'=>'H5DEFAULT',
21
    ];
22
    /**
23
     * 必传的值
24
     * @var array
25
     */
26
    protected $require = ['requestTimestamp', 'merOrderId', 'mid', 'tid'];
27
28
    /**
29
     * @param array $data
30
     * @return false|mixed|string
31
     * @throws \Exception
32
     */
33
    public function request(array $data = [])
34
    {
35
        return $this->formRequest($data);
36
    }
37
    
38
}
39