diff --git a/Controller/Payment/Confirm.php b/Controller/Payment/Confirm.php index e028e49..28678d0 100755 --- a/Controller/Payment/Confirm.php +++ b/Controller/Payment/Confirm.php @@ -152,6 +152,23 @@ private function updateCustomerAddress($order, $twoOrder) ->getList($searchCriteria) ->getItems(); $customerAddress = $customerAddressCollection[0] ?? null; + $logData = [ + 'parent_id' => $order->getCustomerId(), + 'firstname' => $billingAddress->getFirstname(), + 'middlename' => $billingAddress->getMiddlename(), + 'lastname' => $billingAddress->getLastname(), + 'street' => $billingAddress->getStreet(), + 'city' => $billingAddress->getCity(), + 'postcode' => $billingAddress->getPostcode(), + 'country_id' => $billingAddress->getCountryId(), + 'region_id' => $billingAddress->getRegionId(), + 'region' => $billingAddress->getRegion(), + 'telephone' => $billingAddress->getTelephone(), + 'company' => $billingAddress->getCompany(), + ]; + + $message = __('Search Criteria Data: %1', json_encode($logData)); + $this->orderService->addOrderComment($order, $message); } if ($customerAddress && $customerAddress->getId()) { if (isset($twoOrder['buyer']['company']['organization_number'])) {