Skip to content

Commit

Permalink
Removed substring on firstname
Browse files Browse the repository at this point in the history
  • Loading branch information
mroeten committed May 29, 2020
1 parent 86be52e commit e4bccab
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions Model/Paymentmethod/PaymentMethod.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,16 +236,8 @@ protected function doStartTransaction(Order $order)
if ($arrBillingAddress) {
$arrBillingAddress = $arrBillingAddress->toArray();

// Use default initials
$strBillingFirstName = substr($arrBillingAddress['firstname'], 0, 1);

// Use full first name for Klarna
if ($paymentOptionId == $this->paynlConfig->getPaymentOptionId('paynl_payment_klarna')) {
$strBillingFirstName = $arrBillingAddress['firstname'];
}

$enduser = array(
'initials' => $strBillingFirstName,
'initials' => $arrBillingAddress['firstname'],
'lastName' => $arrBillingAddress['lastname'],
'phoneNumber' => $arrBillingAddress['telephone'],
'emailAddress' => $arrBillingAddress['email'],
Expand Down Expand Up @@ -288,16 +280,8 @@ protected function doStartTransaction(Order $order)
if ($arrShippingAddress) {
$arrShippingAddress = $arrShippingAddress->toArray();

// Use default initials
$strShippingFirstName = substr($arrShippingAddress['firstname'], 0, 1);

// Use full first name for Klarna
if ($paymentOptionId == $this->paynlConfig->getPaymentOptionId('paynl_payment_klarna')) {
$strShippingFirstName = $arrShippingAddress['firstname'];
}

$shippingAddress = array(
'initials' => $strShippingFirstName,
'initials' => $arrShippingAddress['firstname'],
'lastName' => $arrShippingAddress['lastname']
);
$arrAddress2 = \Paynl\Helper::splitAddress($arrShippingAddress['street']);
Expand Down

0 comments on commit e4bccab

Please sign in to comment.