From 49acdd3ddad012b6197c8ea6d5d1dd7439a950b0 Mon Sep 17 00:00:00 2001 From: Anne Date: Wed, 14 Aug 2024 11:48:20 +0200 Subject: [PATCH] Add ordernumber to transaction data --- app/addons/paynl_addon/func.php | 1 + app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php | 10 ++++++++++ 2 files changed, 11 insertions(+) diff --git a/app/addons/paynl_addon/func.php b/app/addons/paynl_addon/func.php index 299610b..06ec2f0 100644 --- a/app/addons/paynl_addon/func.php +++ b/app/addons/paynl_addon/func.php @@ -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'])); diff --git a/app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php b/app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php index 9069267..2dbd07f 100644 --- a/app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php +++ b/app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php @@ -31,6 +31,7 @@ class Pay_Api_Start extends Pay_Api private $_transferData; private $_products = array(); + private $_orderNumber; public function setCurrency($currency) { @@ -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 * @@ -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; }