Fixed bugs + testing
This commit is contained in:
		@@ -11,6 +11,26 @@ class Gateway extends AbstractGateway
 | 
			
		||||
        return 'Inforbank';
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function getClientId()
 | 
			
		||||
    {
 | 
			
		||||
        return $this->getParameter('clientId');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function setClientId($value)
 | 
			
		||||
    {
 | 
			
		||||
        return $this->setParameter('clientId', $value);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function getClientSecret()
 | 
			
		||||
    {
 | 
			
		||||
        return $this->getParameter('clientSecret');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function setClientSecret($value)
 | 
			
		||||
    {
 | 
			
		||||
        return $this->setParameter('clientSecret', $value);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Start a purchase request.
 | 
			
		||||
     * @param array $parameters An array of options
 | 
			
		||||
 
 | 
			
		||||
@@ -13,8 +13,18 @@ abstract class AbstractRequest extends BaseAbstractRequest
 | 
			
		||||
        return $this->getParameter('clientId');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function setClientId($value)
 | 
			
		||||
    {
 | 
			
		||||
        return $this->setParameter('clientId', $value);
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function getClientSecret()
 | 
			
		||||
    {
 | 
			
		||||
        return $this->getParameter('clientSecret');
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function setClientSecret($value)
 | 
			
		||||
    {
 | 
			
		||||
        return $this->setParameter('clientSecret', $value);
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -12,13 +12,13 @@ abstract class AbstractResponse extends BaseAbstractResponse
 | 
			
		||||
    public function __construct(RequestInterface $request, $data)
 | 
			
		||||
    {
 | 
			
		||||
        parent::__construct($request, $data);
 | 
			
		||||
        if (!$this->data->success) {
 | 
			
		||||
            $this->error = (string) $this->data->error;
 | 
			
		||||
        if (!$this->data['success']) {
 | 
			
		||||
            $this->error = (string) $this->data['error'];
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function getError()
 | 
			
		||||
    {
 | 
			
		||||
        return $this->error;
 | 
			
		||||
        return $this['error'];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ namespace Omnipay\Inforbank\Message;
 | 
			
		||||
 | 
			
		||||
class CompletePurchaseRequest extends AbstractRequest
 | 
			
		||||
{
 | 
			
		||||
    protected $endpoint = "https://inforbank.nl/api/statusRequest";
 | 
			
		||||
    protected $endpoint = "http://localhost:8080/api/statusRequest";
 | 
			
		||||
 | 
			
		||||
    protected function generateSignature()
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -6,7 +6,7 @@ class CompletePurchaseResponse extends PurchaseResponse
 | 
			
		||||
{
 | 
			
		||||
    public function isSuccessful()
 | 
			
		||||
    {
 | 
			
		||||
        return ($this->data->transaction->status === "Success");
 | 
			
		||||
        return ($this->data['transaction']['status'] === "Success");
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function isRedirect()
 | 
			
		||||
@@ -16,6 +16,6 @@ class CompletePurchaseResponse extends PurchaseResponse
 | 
			
		||||
 | 
			
		||||
    public function getTransaction()
 | 
			
		||||
    {
 | 
			
		||||
        return $this->data->transaction;
 | 
			
		||||
        return $this->data['transaction'];
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
@@ -4,7 +4,7 @@ namespace Omnipay\Inforbank\Message;
 | 
			
		||||
 | 
			
		||||
class PurchaseRequest extends AbstractRequest
 | 
			
		||||
{
 | 
			
		||||
    protected $endpoint = "https://inforbank.nl/api/transactionRequest";
 | 
			
		||||
    protected $endpoint = "http://localhost:8080/api/transactionRequest";
 | 
			
		||||
 | 
			
		||||
    protected function generateSignature()
 | 
			
		||||
    {
 | 
			
		||||
 
 | 
			
		||||
@@ -23,7 +23,7 @@ class PurchaseResponse extends AbstractResponse implements RedirectResponseInter
 | 
			
		||||
 | 
			
		||||
    public function getRedirectUrl()
 | 
			
		||||
    {
 | 
			
		||||
        return $this->data->redirect;
 | 
			
		||||
        return $this->data['redirect'];
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    public function getRedirectMethod()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user