Skip to content

Commit

Permalink
Merge pull request #5 from paynl/feature/PLUG-157
Browse files Browse the repository at this point in the history
Added ordernumber
  • Loading branch information
woutse authored Jul 5, 2020
2 parents 9377006 + 7a24ab8 commit c6561c4
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/Message/Request/PurchaseRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ public function getData()
$data['transaction']['description'] = $this->getDescription() ?: null;
$data['transaction']['currency'] = !empty($this->getCurrency()) ? $this->getCurrency() : 'EUR';
$data['transaction']['orderExchangeUrl'] = !empty($this->getNotifyUrl()) ? $this->getNotifyUrl() : null;
$data['transaction']['orderNumber'] = !empty($this->getOrderNumber()) ? $this->getOrderNumber() : null;

$data['testMode'] = $this->getTestMode() ? 1 : 0;
$data['paymentOptionId'] = !empty($this->getPaymentMethod()) ? $this->getPaymentMethod() : null;
Expand Down Expand Up @@ -124,6 +125,7 @@ public function getData()
$data['statsData'] = array_filter($statsData, function($k) use ($allowableParams) {
return in_array($k, $allowableParams);
}, ARRAY_FILTER_USE_KEY);
$data['statsData']['object'] = 'omnipay';
}
}

Expand Down Expand Up @@ -166,6 +168,25 @@ public function getStatsData()
return $this->getParameter('statsData');
}

/**
* Set the ordernumber
*
* @param $value array
* @return $this
*/
public function setOrderNumber($value)
{
return $this->setParameter('orderNumber', $value);
}

/**
* @return mixed
*/
public function getOrderNumber()
{
return $this->getParameter('orderNumber');
}

/**
* @param $value string
* @return $this
Expand Down

0 comments on commit c6561c4

Please sign in to comment.