Model/Trial/TrialSetup.php
public function saveApiCreds($apiUser, $apiPass)
    {
        $this->helper->saveConfigData(
            Config::XML_PATH_CONNECTOR_API_ENABLED,
            '1',
            'default',
            0
        );
        $this->helper->saveConfigData(
            Config::XML_PATH_CONNECTOR_API_USERNAME,
            $apiUser,
            'default',
            0
        );

        //Save encrypted password
        $this->helper->saveConfigData(
            Config::XML_PATH_CONNECTOR_API_PASSWORD,
            $this->helper->encryptor->encrypt($apiPass),
            'default',
            0
        );

        //Clear config cache
        $this->config->reinit();

        return true;
    }
public function saveApiCreds($apiUser, $apiPass)
    {
        $this->helper->saveConfigData(
            Config::XML_PATH_CONNECTOR_API_ENABLED,
            '1',
            'default',
            0
        );
        $this->helper->saveConfigData(
            Config::XML_PATH_CONNECTOR_API_USERNAME,
            $apiUser,
            'default',
            0
        );

        //Save encrypted password
        $this->helper->saveConfigData(
            Config::XML_PATH_CONNECTOR_API_PASSWORD,
            $this->helper->encryptor->encrypt($apiPass),
            'default',
            0
        );

        //Clear config cache
        $this->config->reinit();

        return true;
    }
public function saveApiCreds ( $ apiUser , $ apiPass ) { $ this -> helper -> saveConfigData ( Config :: XML_PATH_CONNECTOR_API_ENABLED , '1' , 'default' , 0 ) ; $ this -> helper -> saveConfigData ( Config :: XML_PATH_CONNECTOR_API_USERNAME , $ apiUser , 'default' , 0 ) ; //Save encrypted password $ this -> helper -> saveConfigData ( Config :: XML_PATH_CONNECTOR_API_PASSWORD , $ this -> helper -> encryptor -> encrypt ( $ apiPass ) , 'default' , 0 ) ; //Clear config cache $ this -> config -> reinit ( ) ; return true ; }
Save api credentioals.

@param string $apiUser
@param string $apiPass

@return bool
Save api credentioals .