Skip to content

Commit

Permalink
Merge pull request #5 from paynl/feature/PLUG-3731
Browse files Browse the repository at this point in the history
PLUG-3731 - Add ordernumber to transaction data
  • Loading branch information
woutse authored Aug 14, 2024
2 parents 3e621b3 + 49acdd3 commit fe3a28b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/addons/paynl_addon/func.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ function fn_paynl_startTransaction($order_id, $order_info, $processor_data, $exc
$payNL->setCurrency($currency);
$payNL->setFinishUrl($finishUrl);
$payNL->setDescription($order_info['order_id']);
$payNL->setOrderNumber($order_info['order_id']);

$s_address = splitAddress(trim($order_info['s_address'] . ' ' . $order_info['s_address_2']));
$b_address = splitAddress(trim($order_info['b_address'] . ' ' . $order_info['b_address_2']));
Expand Down
10 changes: 10 additions & 0 deletions app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ class Pay_Api_Start extends Pay_Api
private $_transferData;

private $_products = array();
private $_orderNumber;

public function setCurrency($currency)
{
Expand Down Expand Up @@ -220,6 +221,11 @@ public function setDescription($description)
$this->_description = $description;
}

public function setOrderNumber($orderNumber)
{
$this->_orderNumber = $orderNumber;
}

/**
* Get the post data, if not all required variables are set, this wil rthrow an exception
*
Expand Down Expand Up @@ -264,6 +270,10 @@ protected function _getPostData()
$data['transaction']['description'] = $this->_description;
}

if (!empty($this->_orderNumber)) {
$data['transaction']['orderNumber'] = $this->_orderNumber;
}

if (!empty($this->_paymentOptionSubId)) {
$data['paymentOptionSubId'] = $this->_paymentOptionSubId;
}
Expand Down

0 comments on commit fe3a28b

Please sign in to comment.