application/controllers/bestitamazoncron.php
protected function _updateAuthorizedOrders()
    {
        $aProcessed = $this->_processOrderStates(
            "SELECT OXID, OXORDERNR FROM oxorder
            WHERE BESTITAMAZONORDERREFERENCEID != ''
              AND BESTITAMAZONAUTHORIZATIONID != ''
              AND OXTRANSSTATUS = 'AMZ-Authorize-Pending'",
            'getAuthorizationDetails'
        );

        foreach ($aProcessed as $sOrderNumber => $oData) {
            if (isset($oData->GetAuthorizationDetailsResult->AuthorizationDetails->AuthorizationStatus->State)) {
                $sState = $oData->GetAuthorizationDetailsResult
                    ->AuthorizationDetails
                    ->AuthorizationStatus->State;
                $this->_addToMessages("Authorized Order #{$sOrderNumber} - Status updated to: {$sState}<br/>");
            }
        }
    }
protected function _updateAuthorizedOrders()
    {
        $aProcessed = $this->_processOrderStates(
            "SELECT OXID, OXORDERNR FROM oxorder
            WHERE BESTITAMAZONORDERREFERENCEID != ''
              AND BESTITAMAZONAUTHORIZATIONID != ''
              AND OXTRANSSTATUS = 'AMZ-Authorize-Pending'",
            'getAuthorizationDetails'
        );

        foreach ($aProcessed as $sOrderNumber => $oData) {
            if (isset($oData->GetAuthorizationDetailsResult->AuthorizationDetails->AuthorizationStatus->State)) {
                $sState = $oData->GetAuthorizationDetailsResult
                    ->AuthorizationDetails
                    ->AuthorizationStatus->State;
                $this->_addToMessages("Authorized Order #{$sOrderNumber} - Status updated to: {$sState}<br/>");
            }
        }
    }
protected function _updateAuthorizedOrders ( ) { $ aProcessed = $ this -> _processOrderStates ( "SELECT OXID, OXORDERNR FROM oxorder
            WHERE BESTITAMAZONORDERREFERENCEID != ''
              AND BESTITAMAZONAUTHORIZATIONID != ''
              AND OXTRANSSTATUS = 'AMZ-Authorize-Pending'" , 'getAuthorizationDetails' ) ; foreach ( $ aProcessed as $ sOrderNumber => $ oData ) { if ( isset ( $ oData -> GetAuthorizationDetailsResult -> AuthorizationDetails -> AuthorizationStatus -> State ) ) { $ sState = $ oData -> GetAuthorizationDetailsResult -> AuthorizationDetails -> AuthorizationStatus -> State ; $ this -> _addToMessages ( "Authorized Order #{$sOrderNumber} - Status updated to: {$sState}<br/>" ) ; } } }
Authorize unauthorized orders or orders with pending status
@throws oxSystemComponentException
@throws oxConnectionException
Authorize unauthorized orders or orders with pending status