src/PaymentGateway.php
private function __sendRequest($urlPath, $method, $param)
    {
        // Check Curl function if is enabled to send request
        if (function_exists('curl_version'))
            return self::__sendCurl($urlPath, $method, $param);

        // Check file_get_contents function if is enabled to send request
        else if (ini_get('allow_url_fopen'))
            return self::__sendFileGetContents($urlPath, $method, $param);

        //throw exception if none of them is enable
        else
            throw new \Exception('file_get_content and curl are disabled. you must enabled one of them');
    }
private function __sendRequest($urlPath, $method, $param)
    {
        // Check Curl function if is enabled to send request
        if (function_exists('curl_version'))
            return self::__sendCurl($urlPath, $method, $param);

        // Check file_get_contents function if is enabled to send request
        else if (ini_get('allow_url_fopen'))
            return self::__sendFileGetContents($urlPath, $method, $param);

        //throw exception if none of them is enable
        else
            throw new \Exception('file_get_content and curl are disabled. you must enabled one of them');
    }
private function __sendRequest ( $ urlPath , $ method , $ param ) { // Check Curl function if is enabled to send request if ( function_exists ( 'curl_version' ) ) return self :: __sendCurl ( $ urlPath , $ method , $ param ) ; // Check file_get_contents function if is enabled to send request else if ( ini_get ( 'allow_url_fopen' ) ) return self :: __sendFileGetContents ( $ urlPath , $ method , $ param ) ; //throw exception if none of them is enable else throw new \ Exception ( 'file_get_content and curl are disabled. you must enabled one of them' ) ; }
Send the request to payment server

@param string $urlPath
@param string $method request method type , POST|GET
@param array  $param request parameters
@return object
@throws \Exception
Send the request to payment server