application/controllers/bestitamazoncron.php
public function render()
    {
        //Increase execution time for the script to run without timeouts
        set_time_limit(3600);

        //If ERP mode is enabled do nothing, if IPN or CRON authorize unauthorized orders
        if ((bool)$this->_getContainer()->getConfig()->getConfigParam('blAmazonERP') === true) {
            $this->setViewData(array('sError' => 'ERP mode is ON (Module settings)'));
        } elseif ((string)$this->_getContainer()->getConfig()->getConfigParam('sAmazonAuthorize') !== 'CRON') {
            $this->setViewData(array('sError' => 'Trigger Authorise via Cronjob mode is turned Off (Module settings)'));
        } else {
            //Authorize unauthorized or Authorize-Pending orders
            $this->_updateAuthorizedOrders();

            //Check for declined orders
            $this->_updateDeclinedOrders();

            //Check for suspended orders
            $this->_updateSuspendedOrders();

            //Capture handling
            $this->_captureOrders();

            //Check refund stats
            $this->_updateRefundDetails();

            //Check for order which can be closed
            $this->_closeOrders();
            
            $this->_addToMessages('Done');
        }

        return $this->_sThisTemplate;
    }
public function render()
    {
        //Increase execution time for the script to run without timeouts
        set_time_limit(3600);

        //If ERP mode is enabled do nothing, if IPN or CRON authorize unauthorized orders
        if ((bool)$this->_getContainer()->getConfig()->getConfigParam('blAmazonERP') === true) {
            $this->setViewData(array('sError' => 'ERP mode is ON (Module settings)'));
        } elseif ((string)$this->_getContainer()->getConfig()->getConfigParam('sAmazonAuthorize') !== 'CRON') {
            $this->setViewData(array('sError' => 'Trigger Authorise via Cronjob mode is turned Off (Module settings)'));
        } else {
            //Authorize unauthorized or Authorize-Pending orders
            $this->_updateAuthorizedOrders();

            //Check for declined orders
            $this->_updateDeclinedOrders();

            //Check for suspended orders
            $this->_updateSuspendedOrders();

            //Capture handling
            $this->_captureOrders();

            //Check refund stats
            $this->_updateRefundDetails();

            //Check for order which can be closed
            $this->_closeOrders();
            
            $this->_addToMessages('Done');
        }

        return $this->_sThisTemplate;
    }
public function render ( ) { //Increase execution time for the script to run without timeouts set_time_limit ( 3600 ) ; //If ERP mode is enabled do nothing, if IPN or CRON authorize unauthorized orders if ( ( bool ) $ this -> _getContainer ( ) -> getConfig ( ) -> getConfigParam ( 'blAmazonERP' ) === true ) { $ this -> setViewData ( array ( 'sError' => 'ERP mode is ON (Module settings)' ) ) ; } elseif ( ( string ) $ this -> _getContainer ( ) -> getConfig ( ) -> getConfigParam ( 'sAmazonAuthorize' ) !== 'CRON' ) { $ this -> setViewData ( array ( 'sError' => 'Trigger Authorise via Cronjob mode is turned Off (Module settings)' ) ) ; } else { //Authorize unauthorized or Authorize-Pending orders $ this -> _updateAuthorizedOrders ( ) ; //Check for declined orders $ this -> _updateDeclinedOrders ( ) ; //Check for suspended orders $ this -> _updateSuspendedOrders ( ) ; //Capture handling $ this -> _captureOrders ( ) ; //Check refund stats $ this -> _updateRefundDetails ( ) ; //Check for order which can be closed $ this -> _closeOrders ( ) ; $ this -> _addToMessages ( 'Done' ) ; } return $ this -> _sThisTemplate ; }
The render function
@throws Exception
@throws oxSystemComponentException
The render function