From 59db8fbbbcbe8281ebc5959ef27b70d1d87de027 Mon Sep 17 00:00:00 2001 From: Anne Date: Thu, 29 Feb 2024 13:40:36 +0100 Subject: [PATCH 1/3] Clean special characters --- app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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 c9435b4..4f806cd 100644 --- a/app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php +++ b/app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php @@ -84,8 +84,8 @@ public function addProduct($id, $description, $price, $quantity, $vatPercentage $quantity = $quantity * 1; - //description mag maar 45 chars lang zijn - $description = substr($description, 0, 45); + //schoon de description op en het mag maar 45 chars lang zijn + $description = iconv('UTF-8', 'ASCII//TRANSLIT', $description); $arrProduct = array('productId' => $id, 'description' => $description, 'price' => $price, 'quantity' => $quantity, 'vatCode' => $vatPercentage,); $this->_products[] = $arrProduct; From 76cc3e042ca383f4f3bcf5b4438be588726e20e5 Mon Sep 17 00:00:00 2001 From: Anne Date: Thu, 29 Feb 2024 13:41:49 +0100 Subject: [PATCH 2/3] Extra changes --- app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php | 1 + 1 file changed, 1 insertion(+) 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 4f806cd..7f5931e 100644 --- a/app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php +++ b/app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php @@ -86,6 +86,7 @@ public function addProduct($id, $description, $price, $quantity, $vatPercentage //schoon de description op en het mag maar 45 chars lang zijn $description = iconv('UTF-8', 'ASCII//TRANSLIT', $description); + $description = substr($description, 0, 45); $arrProduct = array('productId' => $id, 'description' => $description, 'price' => $price, 'quantity' => $quantity, 'vatCode' => $vatPercentage,); $this->_products[] = $arrProduct; From c599692a59a2ecd095ee98d15226ccf76ccc8867 Mon Sep 17 00:00:00 2001 From: Anne Date: Mon, 11 Mar 2024 11:30:57 +0100 Subject: [PATCH 3/3] Translate comment --- app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 7f5931e..9069267 100644 --- a/app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php +++ b/app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php @@ -84,7 +84,7 @@ public function addProduct($id, $description, $price, $quantity, $vatPercentage $quantity = $quantity * 1; - //schoon de description op en het mag maar 45 chars lang zijn + //clean up special characters in description and shorten it to a max of 45 characters $description = iconv('UTF-8', 'ASCII//TRANSLIT', $description); $description = substr($description, 0, 45);