protected function getApiInstance($method)
    {
        $gateway = Helper::className($this->getDriver());

        $class = "\\Shoperti\\PayMe\\Gateways\\{$gateway}\\".Helper::className($method);

        if (!class_exists($class)) {
            throw new BadMethodCallException("Undefined method [{$method}] called.");
        }

        return new $class($this->gateway);
    }
protected function getApiInstance($method)
    {
        $gateway = Helper::className($this->getDriver());

        $class = "\\Shoperti\\PayMe\\Gateways\\{$gateway}\\".Helper::className($method);

        if (!class_exists($class)) {
            throw new BadMethodCallException("Undefined method [{$method}] called.");
        }

        return new $class($this->gateway);
    }
protected function getApiInstance ( $ method ) { $ gateway = Helper :: className ( $ this -> getDriver ( ) ) ; $ class = "\\Shoperti\\PayMe\\Gateways\\{$gateway}\\" . Helper :: className ( $ method ) ; if ( ! class_exists ( $ class ) ) { throw new BadMethodCallException ( "Undefined method [{$method}] called." ) ; } return new $ class ( $ this -> gateway ) ; }
Return the Api class instance for the given method.

@param string $method

@throws \BadMethodCallException

@return \Shoperti\PayMe\Contracts\ApiInterface
Return the Api class instance for the given method .