Skip to content

Commit 6e93668

Browse files
authored
Merge pull request #93 from tdi-tuning/master
Add cancelUrl to CreateOrderRequest
2 parents f134958 + 60804fa commit 6e93668

1 file changed

Lines changed: 23 additions & 2 deletions

File tree

src/Message/Request/CreateOrderRequest.php

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,23 @@ public function setCardToken($value)
144144
return $this->setParameter('cardToken', $value);
145145
}
146146

147+
/**
148+
* @return string
149+
*/
150+
public function getCancelUrl()
151+
{
152+
return $this->getParameter('cancelUrl');
153+
}
154+
155+
/**
156+
* @param string $value
157+
* @return $this
158+
*/
159+
public function setCancelUrl($value)
160+
{
161+
return $this->setParameter('cancelUrl', $value);
162+
}
163+
147164
/**
148165
* Alias for lines
149166
*
@@ -198,6 +215,10 @@ public function getData()
198215
$data['webhookUrl'] = $this->getNotifyUrl();
199216
$data['method'] = $this->getPaymentMethod();
200217

218+
if ($this->getCancelUrl()) {
219+
$data['cancelUrl'] = $this->getCancelUrl();
220+
}
221+
201222
$data['lines'] = [];
202223
if ($items = $this->getItems()) {
203224
$data['lines'] = $this->getLines($items);
@@ -298,7 +319,7 @@ protected function getLines(ItemBag $items)
298319

299320
return $lines;
300321
}
301-
322+
302323
/**
303324
* @return bool
304325
*/
@@ -324,7 +345,7 @@ public function sendData($data)
324345

325346
return $this->response = new CreateOrderResponse($this, $response);
326347
}
327-
348+
328349
/**
329350
* @param bool $includePayments
330351
* @return self

0 commit comments

Comments
 (0)