Observer/DataAssignObserver.php
public function execute(Observer $observer) {
        $data           = $this->readDataArgument($observer);
        $additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA);

        if (!is_array($additionalData)) {
            return;
        }

        $paymentInfo = $this->readPaymentModelArgument($observer);

        foreach (self::$additionalInformationList as $additionalInformationKey) {
            if( array_key_exists($additionalInformationKey, $additionalData) ) {
                $paymentInfo->setAdditionalInformation($additionalInformationKey, $additionalData[$additionalInformationKey]);
            }
        }
    }
public function execute(Observer $observer) {
        $data           = $this->readDataArgument($observer);
        $additionalData = $data->getData(PaymentInterface::KEY_ADDITIONAL_DATA);

        if (!is_array($additionalData)) {
            return;
        }

        $paymentInfo = $this->readPaymentModelArgument($observer);

        foreach (self::$additionalInformationList as $additionalInformationKey) {
            if( array_key_exists($additionalInformationKey, $additionalData) ) {
                $paymentInfo->setAdditionalInformation($additionalInformationKey, $additionalData[$additionalInformationKey]);
            }
        }
    }
public function execute ( Observer $ observer ) { $ data = $ this -> readDataArgument ( $ observer ) ; $ additionalData = $ data -> getData ( PaymentInterface :: KEY_ADDITIONAL_DATA ) ; if ( ! is_array ( $ additionalData ) ) { return ; } $ paymentInfo = $ this -> readPaymentModelArgument ( $ observer ) ; foreach ( self :: $ additionalInformationList as $ additionalInformationKey ) { if ( array_key_exists ( $ additionalInformationKey , $ additionalData ) ) { $ paymentInfo -> setAdditionalInformation ( $ additionalInformationKey , $ additionalData [ $ additionalInformationKey ] ) ; } } }
Handles the observer for payment.

@param Observer $observer
@return void
Handles the observer for payment .