diff --git a/.travis.yml b/.travis.yml index b0b3ada..43e6f66 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,5 +1,7 @@ language: php +dist: precise + php: - 5.3 - 5.4 diff --git a/src/Message/AbstractRequest.php b/src/Message/AbstractRequest.php index 29ca0ba..0b88a34 100644 --- a/src/Message/AbstractRequest.php +++ b/src/Message/AbstractRequest.php @@ -84,6 +84,51 @@ public function setErrorUrl($value) return $this->setParameter('errorUrl', $value); } + /** + * returns the push URL + * + * @return string pushUrl + */ + public function getPushUrl() + { + return $this->getParameter('pushUrl'); + } + + /** + * sets the push URL which is used by buckaroo when + * the payment results is sent via push + * + * @param $value + * + * @return \Omnipay\Common\Message\AbstractRequest + */ + public function setPushUrl($value) + { + return $this->setParameter('pushUrl', $value); + } + + /** + * returns the push failure URL + * + * @return string pushfailureUrl + */ + public function getPushFailureUrl() + { + return $this->getParameter('pushfailureUrl'); + } + + /** + * sets the push failure URL which is used by buckaroo when + * the payment error results is sent via push + * + * @param $value + * + * @return \Omnipay\Common\Message\AbstractRequest + */ + public function setPushFailureUrl($value) + { + return $this->setParameter('pushfailureUrl', $value); + } public function getData() { @@ -100,6 +145,8 @@ public function getData() $data['Brq_returnreject'] = $this->getRejectUrl(); $data['Brq_returnerror'] = $this->getErrorUrl(); $data['Brq_culture'] = $this->getCulture(); + $data['Brq_push'] = $this->getPushUrl(); + $data['Brq_pushfailure'] = $this->getPushFailureUrl(); return $data; } diff --git a/tests/Message/AbstractRequestTest.php b/tests/Message/AbstractRequestTest.php index 190a3a8..8d32a43 100644 --- a/tests/Message/AbstractRequestTest.php +++ b/tests/Message/AbstractRequestTest.php @@ -34,6 +34,8 @@ public function testGetData() 'errorUrl' => 'https://www.example.com/error', 'rejectUrl' => 'https://www.example.com/reject', 'culture' => 'nl-NL', + 'pushUrl' => 'https://www.example.com/push', + 'pushfailureUrl' => 'https://www.example.com/pushfailure', )); $data = $this->request->getData(); @@ -47,6 +49,8 @@ public function testGetData() $this->assertSame('https://www.example.com/error', $data['Brq_returnerror']); $this->assertSame('https://www.example.com/reject', $data['Brq_returnreject']); $this->assertSame('nl-NL', $data['Brq_culture']); + $this->assertSame('https://www.example.com/push', $data['Brq_push']); + $this->assertSame('https://www.example.com/pushfailure', $data['Brq_pushfailure']); } public function testGenerateSignature()