Completed
Push — master ( 18da62...6da1b2 )
by Andrii
16:14
created

OmnipayResponse   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 20
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
wmc 2
c 1
b 0
f 1
lcom 0
cbo 2
dl 0
loc 20
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getTime() 0 4 1
A getPayer() 0 4 1
1
<?php
2
3
/*
4
 * Generalization over Omnipay and Payum
5
 *
6
 * @link      https://github.com/hiqdev/php-merchant
7
 * @package   php-merchant
8
 * @license   BSD-3-Clause
9
 * @copyright Copyright (c) 2015, HiQDev (http://hiqdev.com/)
10
 */
11
12
namespace hiqdev\php\merchant\paypal;
13
14
use hiqdev\php\merchant\Helper;
15
16
/**
17
 * PayPal Omnipay Response class.
18
 */
19
class OmnipayResponse extends \hiqdev\php\merchant\OmnipayResponse
20
{
21
    /**
22
     * Get payment time.
23
     * @return string
24
     */
25
    public function getTime()
26
    {
27
        return Helper::isotime($this->getVar('LMI_SYS_TRANS_DATE') . ' Europe/Moscow');
28
    }
29
30
    /**
31
     * Get payer info.
32
     * @return string
33
     */
34
    public function getPayer()
35
    {
36
        return $this->getVar('LMI_PAYER_PURSE') . '/' . $this->getVar('LMI_PAYER_WM');
37
    }
38
}
39