1
0

Fixed bugs + testing

This commit is contained in:
Christiaan Goossens 2017-02-19 12:24:32 +01:00
parent 8ea09dde35
commit 807384620c
7 changed files with 38 additions and 8 deletions

View File

@ -11,6 +11,26 @@ class Gateway extends AbstractGateway
return 'Inforbank'; 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. * Start a purchase request.
* @param array $parameters An array of options * @param array $parameters An array of options

View File

@ -13,8 +13,18 @@ abstract class AbstractRequest extends BaseAbstractRequest
return $this->getParameter('clientId'); return $this->getParameter('clientId');
} }
public function setClientId($value)
{
return $this->setParameter('clientId', $value);
}
public function getClientSecret() public function getClientSecret()
{ {
return $this->getParameter('clientSecret'); return $this->getParameter('clientSecret');
} }
public function setClientSecret($value)
{
return $this->setParameter('clientSecret', $value);
}
} }

View File

@ -12,13 +12,13 @@ abstract class AbstractResponse extends BaseAbstractResponse
public function __construct(RequestInterface $request, $data) public function __construct(RequestInterface $request, $data)
{ {
parent::__construct($request, $data); parent::__construct($request, $data);
if (!$this->data->success) { if (!$this->data['success']) {
$this->error = (string) $this->data->error; $this->error = (string) $this->data['error'];
} }
} }
public function getError() public function getError()
{ {
return $this->error; return $this['error'];
} }
} }

View File

@ -4,7 +4,7 @@ namespace Omnipay\Inforbank\Message;
class CompletePurchaseRequest extends AbstractRequest class CompletePurchaseRequest extends AbstractRequest
{ {
protected $endpoint = "https://inforbank.nl/api/statusRequest"; protected $endpoint = "http://localhost:8080/api/statusRequest";
protected function generateSignature() protected function generateSignature()
{ {

View File

@ -6,7 +6,7 @@ class CompletePurchaseResponse extends PurchaseResponse
{ {
public function isSuccessful() public function isSuccessful()
{ {
return ($this->data->transaction->status === "Success"); return ($this->data['transaction']['status'] === "Success");
} }
public function isRedirect() public function isRedirect()
@ -16,6 +16,6 @@ class CompletePurchaseResponse extends PurchaseResponse
public function getTransaction() public function getTransaction()
{ {
return $this->data->transaction; return $this->data['transaction'];
} }
} }

View File

@ -4,7 +4,7 @@ namespace Omnipay\Inforbank\Message;
class PurchaseRequest extends AbstractRequest class PurchaseRequest extends AbstractRequest
{ {
protected $endpoint = "https://inforbank.nl/api/transactionRequest"; protected $endpoint = "http://localhost:8080/api/transactionRequest";
protected function generateSignature() protected function generateSignature()
{ {

View File

@ -23,7 +23,7 @@ class PurchaseResponse extends AbstractResponse implements RedirectResponseInter
public function getRedirectUrl() public function getRedirectUrl()
{ {
return $this->data->redirect; return $this->data['redirect'];
} }
public function getRedirectMethod() public function getRedirectMethod()