Skip to content

Commit

Permalink
Merge pull request #4 from paynl/feature/PLUG-3212
Browse files Browse the repository at this point in the history
PLUG-3212 - Clean special characters in product description
  • Loading branch information
woutse authored Mar 11, 2024
2 parents b726a9f + c599692 commit 3e621b3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/addons/paynl_addon/paynl/classes/Pay/Api/Start.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@ public function addProduct($id, $description, $price, $quantity, $vatPercentage

$quantity = $quantity * 1;

//description 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);

$arrProduct = array('productId' => $id, 'description' => $description, 'price' => $price, 'quantity' => $quantity, 'vatCode' => $vatPercentage,);
Expand Down

0 comments on commit 3e621b3

Please sign in to comment.