src/Mpesa/Support/MakesRequest.php
/**
     * Generate the result callback url.
     * The generated url is based on the values provided in the configuration.
     *
     * @param string $option
     *
     * @return string
     **/
Generate the result callback url.
The generated url is based on the values provided in the configuration.

@param string $option

@return string
Generate the result callback url . The generated url is based on the values provided in the configuration . @param string $option @return string
protected function callback($option)
    {
        $config = $this->engine->config;
        $callback = \ltrim($config->get($option), '/');
        if ($config->get('mpesa.default_callbacks')) {
            $endpoint = \rtrim($config->get('mpesa.callbacks_endpoint'), '/');
            $callback = "{$endpoint}/{$callback}";
        }
        return $callback;
    }
protected function callback ( $ option ) { $ config = $ this -> engine -> config ; $ callback = \ ltrim ( $ config -> get ( $ option ) , '/' ) ; if ( $ config -> get ( 'mpesa.default_callbacks' ) ) { $ endpoint = \ rtrim ( $ config -> get ( 'mpesa.callbacks_endpoint' ) , '/' ) ; $ callback = " { $ endpoint } / { $ callback } " ; } return $ callback ; }
Generate the result callback url.
Generate the result callback url .