1
0
Fork 0
This repository has been archived on 2017-06-06. You can view files and clone it, but cannot push or open issues or pull requests.
informaticaD4P-2017-omnipay.../src/Message/AbstractResponse.php

25 lines
554 B
PHP
Raw Normal View History

<?php
namespace Omnipay\Inforbank\Message;
use Omnipay\Common\Message\AbstractResponse as BaseAbstractResponse;
use Omnipay\Common\Message\RequestInterface;
abstract class AbstractResponse extends BaseAbstractResponse
{
protected $error;
public function __construct(RequestInterface $request, $data)
{
parent::__construct($request, $data);
2017-02-19 11:24:32 +00:00
if (!$this->data['success']) {
$this->error = (string) $this->data['error'];
}
}
public function getError()
{
2017-02-19 11:24:32 +00:00
return $this['error'];
}
}