PurchaseResponse::getMessage()   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\POS;
9
10
use Omnipay\MoMo\Message\AbstractResponse;
11
12
/**
13
 * @author Vuong Minh <[email protected]>
14
 * @since 1.0.0
15
 */
16
class PurchaseResponse extends AbstractResponse
17
{
18
    /**
19
     * {@inheritdoc}
20
     */
21
    public function getCode(): ?string
22
    {
23
        return $this->data['status'] ?? null;
24
    }
25
26
    /**
27
     * {@inheritdoc}
28
     */
29
    public function getMessage(): ?string
30
    {
31
        return $this->data['message']['description'] ?? null;
32
    }
33
34
    /**
35
     * {@inheritdoc}
36
     */
37
    public function getTransactionReference(): ?string
38
    {
39
        return $this->data['message']['transid'] ?? null;
40
    }
41
}
42