diff --git a/Model/PayPaymentCreate.php b/Model/PayPaymentCreate.php index ed9268a1..0ec17372 100644 --- a/Model/PayPaymentCreate.php +++ b/Model/PayPaymentCreate.php @@ -333,7 +333,7 @@ private function getShippingAddress() } $shippingAddress = [ - 'initials' => substr($arrShippingAddress['firstname'], 0, 32), + 'initials' => mb_substr($arrShippingAddress['firstname'], 0, 32), 'lastName' => $arrShippingAddress['lastname'], ]; $arrAddress2 = \Paynl\Helper::splitAddress($arrShippingAddress['street']); @@ -358,7 +358,7 @@ private function getEnduserData() if ($arrBillingAddress) { $arrBillingAddress = $arrBillingAddress->toArray(); $enduser = [ - 'initials' => substr($arrBillingAddress['firstname'], 0, 32), + 'initials' => mb_substr($arrBillingAddress['firstname'], 0, 32), 'lastName' => $arrBillingAddress['lastname'], 'phoneNumber' => payHelper::validatePhoneNumber($arrBillingAddress['telephone']), 'emailAddress' => $arrBillingAddress['email'], @@ -403,7 +403,7 @@ private function getInvoiceAddress() $arrBillingAddress = $arrBillingAddress->toArray(); $invoiceAddress = [ - 'initials' => substr($arrBillingAddress['firstname'] ?? '', 0, 32), + 'initials' => mb_substr($arrBillingAddress['firstname'] ?? '', 0, 32), 'lastName' => $arrBillingAddress['lastname'] ?? '', ];