1. PHP Fatal error: Uncaught Error: Call to a member function getAdditionalInformation() on null in /var/www/magento/vendor/magento/module-sales/Model/OrderRepository.php:172

  2. Verified found that file method contains below code

     * Set additional info to the order.
     * @param OrderInterface $order
     * @return void
    private function setPaymentAdditionalInfo(OrderInterface $order): void
        $extensionAttributes = $order->getExtensionAttributes();
        $paymentAdditionalInformation = $order->getPayment()->getAdditionalInformation();

        $objects = [];
        foreach ($paymentAdditionalInformation as $key => $value) {
            /** @var PaymentAdditionalInfoInterface $additionalInformationObject */
            $additionalInformationObject = $this->paymentAdditionalInfoFactory->create();

            if (!is_string($value)) {
                $value = $this->serializer->serialize($value);

            $objects[] = $additionalInformationObject;
  1. Verified and understand that the issue sales_order records count is not matching with sales_order_payment count.

Ex: sales_order count is: 99999 sales_order_payment is: 88888

Here Could you please help me & advise.


We have tested this orders grid issue in the two ways

1. With the replication process
2. Without the replication process
  1. Using the database replication process, the sales_order table records count was not matching with the sales_order_payment table records count. So that vendor/magento/module-sales/Model/OrderRepository.php:172

(IMP Note !!!: sales_order count == sales_order_grid count == sales_order_payment count )

$order->getPayment() for old orders is returning null, so any function (eg. getAdditionalInformation()) is applying on getPayment() object is giving the error.

The solution is the Need to execute delta migration so that whatever the missing records in the sales_order_payment table those will create.

  1. Without the replication process, we didn't get any issue but after did a full migration we have to verify the sales records whether it is matching or not at the database level in m1 and m2

This reason is that the table sales_order_payment is lacking in data. To resolve this error, you must only delete all and re-migrate data again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.