diff --git a/src/Message/Request/CreateOrderRequest.php b/src/Message/Request/CreateOrderRequest.php index da075c4..250b7ca 100755 --- a/src/Message/Request/CreateOrderRequest.php +++ b/src/Message/Request/CreateOrderRequest.php @@ -144,6 +144,23 @@ public function setCardToken($value) return $this->setParameter('cardToken', $value); } + /** + * @return string + */ + public function getCancelUrl() + { + return $this->getParameter('cancelUrl'); + } + + /** + * @param string $value + * @return $this + */ + public function setCancelUrl($value) + { + return $this->setParameter('cancelUrl', $value); + } + /** * Alias for lines * @@ -198,6 +215,10 @@ public function getData() $data['webhookUrl'] = $this->getNotifyUrl(); $data['method'] = $this->getPaymentMethod(); + if ($this->getCancelUrl()) { + $data['cancelUrl'] = $this->getCancelUrl(); + } + $data['lines'] = []; if ($items = $this->getItems()) { $data['lines'] = $this->getLines($items); @@ -298,7 +319,7 @@ protected function getLines(ItemBag $items) return $lines; } - + /** * @return bool */ @@ -324,7 +345,7 @@ public function sendData($data) return $this->response = new CreateOrderResponse($this, $response); } - + /** * @param bool $includePayments * @return self