Skip to content

Commit

Permalink
Merge pull request #69 from mroeten/feature/PLUG-133
Browse files Browse the repository at this point in the history
Removed substring on firstname
  • Loading branch information
woutse authored Jun 4, 2020
2 parents 6151253 + 13dffa6 commit 0643f56
Showing 1 changed file with 3 additions and 19 deletions.
22 changes: 3 additions & 19 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 All @@ -268,7 +260,7 @@ protected function doStartTransaction(Order $order)
}

$invoiceAddress = array(
'initials' => $strBillingFirstName,
'initials' => $arrBillingAddress['firstname'],
'lastName' => $arrBillingAddress['lastname']
);

Expand All @@ -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 0643f56

Please sign in to comment.