Skip to content

Commit 3232e5f

Browse files
author
Frederik De Paepe
committed
Added backurl parameter for a request
1 parent ff2fea5 commit 3232e5f

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

lib/Ogone/AbstractRequest.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ abstract class AbstractRequest implements Request {
8888
protected $ogoneFields = array(
8989
'pspid', 'orderid', 'com', 'amount', 'currency', 'language', 'cn', 'email',
9090
'ownerzip', 'owneraddress', 'ownercty', 'ownertown', 'ownertelno', 'accepturl',
91-
'declineurl', 'exceptionurl', 'cancelurl', 'complus', 'paramplus', 'pm',
91+
'declineurl', 'exceptionurl', 'cancelurl', 'backurl', 'complus', 'paramplus', 'pm',
9292
'brand', 'title', 'bgcolor', 'txtcolor', 'tblbgcolor', 'tbltxtcolor', 'buttonbgcolor',
9393
'buttontxtcolor', 'logo', 'fonttype', 'tp', 'paramvar'
9494
);
@@ -166,6 +166,12 @@ public function setCancelurl($cancelurl)
166166
$this->parameters['cancelurl'] = $cancelurl;
167167
}
168168

169+
public function setBackurl($backurl)
170+
{
171+
$this->validateUri($backurl);
172+
$this->parameters['backurl'] = $backurl;
173+
}
174+
169175
/** Alias for setParamplus */
170176
public function setFeedbackParams(array $feedbackParams)
171177
{

tests/TestCase.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ protected function provideCompletePaymentRequest()
5757
$paymentRequest->setDeclineurl('http://example.com/decline');
5858
$paymentRequest->setExceptionurl('http://example.com/exception');
5959
$paymentRequest->setCancelurl('http://example.com/cancel');
60+
$paymentRequest->setBackurl('http://example.com/back');
6061
$paymentRequest->setDynamicTemplateUri('http://example.com/template');
6162

6263
$paymentRequest->setCurrency('EUR');

0 commit comments

Comments
 (0)