Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 23 additions & 2 deletions src/Message/Request/CreateOrderRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -298,7 +319,7 @@ protected function getLines(ItemBag $items)

return $lines;
}

/**
* @return bool
*/
Expand All @@ -324,7 +345,7 @@ public function sendData($data)

return $this->response = new CreateOrderResponse($this, $response);
}

/**
* @param bool $includePayments
* @return self
Expand Down