AlipayF2FPayResult::toArray()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 0
dl 0
loc 4
ccs 0
cts 4
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Kaylyu\Alipay\F2fpay\Base\Model\Result;
4
5
class AlipayF2FPayResult
6
{
7
    /**
8
     * 成功
9
     */
10
    const ALIPAY_F2FPAY_RESULT_SUCCESS = 'SUCCESS';
11
    /**
12
     * 失败
13
     */
14
    const ALIPAY_F2FPAY_RESULT_FAILED = 'FAILED';
15
    /**
16
     * 未知错误
17
     */
18
    const ALIPAY_F2FPAY_RESULT_UNKNOWN = 'UNKNOWN';
19
20
    /**
21
     * 交易结果状态
22
     * @var
23
     * @author kaylv <[email protected]>
24
     */
25
    public $tradeStatus ;
26
27
    /**
28
     * 交易结果数据
29
     * @var
30
     * @author kaylv <[email protected]>
31
     */
32
    public $response;
33
34
    /**
35
     * 签名串
36
     * @var
37
     * @author kaylv <[email protected]>
38
     */
39
    public $sign;
40
41
    public function __construct($response, $sign)
42
    {
43
        $this->response = $response;
44
        $this->sign = $sign;
45
    }
46
47
    public function setTradeStatus($tradeStatus)
48
    {
49
       $this->tradeStatus = $tradeStatus;
50
    }
51
52
    public function getTradeStatus()
53
    {
54
        return $this->tradeStatus;
55
    }
56
57
    public function setResponse($response)
58
    {
59
        $this->response = $response;
60
    }
61
62
    public function getResponse()
63
    {
64
        return $this->response;
65
    }
66
67
    public function toArray()
68
    {
69
        return $this->response;
70
    }
71
}