PurchaseResponse::getRedirectData()   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
dl 0
loc 4
ccs 0
cts 4
cp 0
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
crap 2
1
<?php
2
/**
3
 * FreeKassa driver for Omnipay PHP payment library
4
 *
5
 * @link      https://github.com/hiqdev/omnipay-freekassa
6
 * @package   omnipay-freekassa
7
 * @license   MIT
8
 * @copyright Copyright (c) 2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace Omnipay\FreeKassa\Message;
12
13
use Omnipay\Common\Message\AbstractResponse;
14
use Omnipay\Common\Message\RedirectResponseInterface;
15
16
/**
17
 * FreeKassa Purchase Response.
18
 */
19
class PurchaseResponse extends AbstractResponse implements RedirectResponseInterface
20
{
21
    protected $_redirect = 'https://www.free-kassa.ru/merchant/cash.php';
22
23
    public function isSuccessful()
24
    {
25
        return false;
26
    }
27
28
    public function isRedirect()
29
    {
30
        return true;
31
    }
32
33
    public function getRedirectUrl()
34
    {
35
        return $this->_redirect . '?' . http_build_query($this->getRedirectData());
36
    }
37
38
    public function getRedirectMethod()
39
    {
40
        return 'GET';
41
    }
42
43
    public function getRedirectData()
44
    {
45
        return $this->data;
46
    }
47
}
48