NotificationResponse::getTransactionReference()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
/**
3
 * @link https://github.com/phpviet/omnipay-momo
4
 * @copyright (c) PHP Viet
5
 * @license [MIT](http://www.opensource.org/licenses/MIT)
6
 */
7
8
namespace Omnipay\MoMo\Message\QRCode;
9
10
use Omnipay\MoMo\Message\AbstractSignatureResponse;
11
12
/**
13
 * @author Vuong Minh <[email protected]>
14
 * @since 1.0.0
15
 */
16
class NotificationResponse extends AbstractSignatureResponse
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    protected function getSignatureParameters(): array
22
    {
23
        return [
24
            'accessKey', 'amount', 'message', 'momoTransId', 'partnerCode', 'partnerRefId', 'partnerTransId',
25
            'responseTime', 'status', 'storeId', 'transType',
26
        ];
27
    }
28
29
    /**
30
     * {@inheritdoc}
31
     */
32
    public function getCode(): ?string
33
    {
34
        return $this->data['status'] ?? null;
35
    }
36
37
    /**
38
     * {@inheritdoc}
39
     */
40
    public function getTransactionId(): ?string
41
    {
42
        return $this->data['partnerRefId'] ?? null;
43
    }
44
45
    /**
46
     * {@inheritdoc}
47
     */
48
    public function getTransactionReference(): ?string
49
    {
50
        return $this->data['momoTransId'] ?? null;
51
    }
52
}
53