We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit cab7d6f0 authored by attilak's avatar attilak

resolve code review comments

parent d91714a8
......@@ -42,18 +42,26 @@ class CustomerDataBuilder implements BuilderInterface
/** @var \Magento\Payment\Gateway\Data\PaymentDataObject $paymentDataObject */
$paymentDataObject = \Magento\Payment\Gateway\Helper\SubjectReader::readPayment($buildSubject);
$order = $paymentDataObject->getOrder();
$billingAddress = $order->getBillingAddress();
$customerEmail = $billingAddress->getEmail();
$customerId = $order->getCustomerId();
if ($customerId > 0) {
$result['shopperReference'] = $customerId;
}
$result['telephoneNumber'] = trim($billingAddress->getTelephone());
$billingAddress = $order->getBillingAddress();
if (!empty($billingAddress)) {
$customerEmail = $billingAddress->getEmail();
if ($customerEmail) {
$result['shopperEmail'] = $customerEmail;
}
$customerTelephone = trim($billingAddress->getTelephone());
if ($customerTelephone) {
$result['telephoneNumber'] = $customerTelephone;
}
}
return $result;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment