Issues (5)

src/Message/PurchaseResponse.php (1 issue)

Labels
Severity
1
<?php
2
3
namespace Omnipay\Redsys\Message;
4
5
use Omnipay\Common\Message\AbstractResponse;
6
use Omnipay\Common\Message\RedirectResponseInterface;
7
8
/**
9
 * Redsys Purchase Response
10
 */
11
class PurchaseResponse extends AbstractResponse implements RedirectResponseInterface
12 2
{
13
    public function isSuccessful()
14 2
    {
15
        return false;
16
    }
17 2
18
    public function isRedirect()
19 2
    {
20
        return true;
21
    }
22 2
23
    public function getRedirectUrl()
24 2
    {
25
        return $this->getRequest()->getEndpoint();
0 ignored issues
show
The method getEndpoint() does not exist on Omnipay\Common\Message\RequestInterface. It seems like you code against a sub-type of Omnipay\Common\Message\RequestInterface such as Omnipay\Redsys\Message\PurchaseRequest. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-call  annotation

25
        return $this->getRequest()->/** @scrutinizer ignore-call */ getEndpoint();
Loading history...
26
    }
27 1
28
    public function getRedirectMethod()
29 1
    {
30
        return 'POST';
31
    }
32 1
33
    public function getRedirectData()
34 1
    {
35
        return $this->data;
36
    }
37
}
38