public function validateOrderAddress(Mage_Sales_Model_Order $order)
    {
        /** @var Mage_Sales_Model_Order_Address $address */
        $address = $order->getShippingAddress();
        $countryModel = $address->getCountryModel();
        $result = $this->validate(
            $address->getStreet(),
            $address->getRegionCode(),
            $address->getCity(),
            $address->getPostcode(),
            $countryModel->getName()
        );

        if (!$result || !isset($result['ValidAustralianAddress'])) {
            $status = static::ADDRESS_UNKNOWN;
        } else if (isset($result['validAddress']) && $result['validAddress']) {
            $status = static::ADDRESS_VALID;
        } else {
            $status = static::ADDRESS_INVALID;
        }

        $order->setAddressValidated($status);

        return $result;
    }
public function validateOrderAddress(Mage_Sales_Model_Order $order)
    {
        /** @var Mage_Sales_Model_Order_Address $address */
        $address = $order->getShippingAddress();
        $countryModel = $address->getCountryModel();
        $result = $this->validate(
            $address->getStreet(),
            $address->getRegionCode(),
            $address->getCity(),
            $address->getPostcode(),
            $countryModel->getName()
        );

        if (!$result || !isset($result['ValidAustralianAddress'])) {
            $status = static::ADDRESS_UNKNOWN;
        } else if (isset($result['validAddress']) && $result['validAddress']) {
            $status = static::ADDRESS_VALID;
        } else {
            $status = static::ADDRESS_INVALID;
        }

        $order->setAddressValidated($status);

        return $result;
    }
public function validateOrderAddress ( Mage_Sales_Model_Order $ order ) { /** @var Mage_Sales_Model_Order_Address $address */ $ address = $ order -> getShippingAddress ( ) ; $ countryModel = $ address -> getCountryModel ( ) ; $ result = $ this -> validate ( $ address -> getStreet ( ) , $ address -> getRegionCode ( ) , $ address -> getCity ( ) , $ address -> getPostcode ( ) , $ countryModel -> getName ( ) ) ; if ( ! $ result || ! isset ( $ result [ 'ValidAustralianAddress' ] ) ) { $ status = static :: ADDRESS_UNKNOWN ; } else if ( isset ( $ result [ 'validAddress' ] ) && $ result [ 'validAddress' ] ) { $ status = static :: ADDRESS_VALID ; } else { $ status = static :: ADDRESS_INVALID ; } $ order -> setAddressValidated ( $ status ) ; return $ result ; }
Validates the order's address and updates its 'address valid' value.

@param Mage_Sales_Model_Order $order
@return array Address validation results
@throws Exception
Validates the order s address and updates its address valid value .