public function getAtmLocation(
        $oauth_token,
        $latitude,
        $longitude,
        $count = '10',
        $radius = '20'
    ) {
        $apikey = $this->settings['api_key'];
        
        $secret = $this->settings['secret_key'];

        $params              = array();
        $params['SearchBy']  = 'Distance';
        $params['Latitude']  = $latitude;
        $params['Longitude'] = $longitude;
        $params['Count']     = $count;
        $params['Radius']    = $radius;
        ksort($params);

        $auth_query_string = self::arrayImplode('=', '&', $params);

        $uriSign       = "GET:/general/info-bca/atm?$auth_query_string";
        $isoTime       = self::generateIsoTime();
        $authSignature = self::generateSign($uriSign, $oauth_token, $secret, $isoTime, null);

        $headers                    = array();
        $headers['Accept']          = 'application/json';
        $headers['Content-Type']    = 'application/json';
        $headers['Authorization']   = "Bearer $oauth_token";
        $headers['X-BCA-Key']       = $apikey;
        $headers['X-BCA-Timestamp'] = $isoTime;
        $headers['X-BCA-Signature'] = $authSignature;

        $request_path = "general/info-bca/atm?SearchBy=Distance&Latitude=$latitude&Longitude=$longitude&Count=$count&Radius=$radius";
        $domain       = $this->ddnDomain();
        $full_url     = $domain . $request_path;

        \Unirest\Request::curlOpts(array(
            CURLOPT_SSL_VERIFYHOST => 0,
            CURLOPT_SSLVERSION => 6,
            CURLOPT_SSL_VERIFYPEER => false,
            CURLOPT_TIMEOUT => $this->settings['timeout'] !== 30 ? $this->settings['timeout'] : 30
        ));
        
        $data = array('grant_type' => 'client_credentials');
        $body     = \Unirest\Request\Body::form($data);
        $response = \Unirest\Request::get($full_url, $headers, $body);

        return $response;
    }
public function getAtmLocation(
        $oauth_token,
        $latitude,
        $longitude,
        $count = '10',
        $radius = '20'
    ) {
        $apikey = $this->settings['api_key'];
        
        $secret = $this->settings['secret_key'];

        $params              = array();
        $params['SearchBy']  = 'Distance';
        $params['Latitude']  = $latitude;
        $params['Longitude'] = $longitude;
        $params['Count']     = $count;
        $params['Radius']    = $radius;
        ksort($params);

        $auth_query_string = self::arrayImplode('=', '&', $params);

        $uriSign       = "GET:/general/info-bca/atm?$auth_query_string";
        $isoTime       = self::generateIsoTime();
        $authSignature = self::generateSign($uriSign, $oauth_token, $secret, $isoTime, null);

        $headers                    = array();
        $headers['Accept']          = 'application/json';
        $headers['Content-Type']    = 'application/json';
        $headers['Authorization']   = "Bearer $oauth_token";
        $headers['X-BCA-Key']       = $apikey;
        $headers['X-BCA-Timestamp'] = $isoTime;
        $headers['X-BCA-Signature'] = $authSignature;

        $request_path = "general/info-bca/atm?SearchBy=Distance&Latitude=$latitude&Longitude=$longitude&Count=$count&Radius=$radius";
        $domain       = $this->ddnDomain();
        $full_url     = $domain . $request_path;

        \Unirest\Request::curlOpts(array(
            CURLOPT_SSL_VERIFYHOST => 0,
            CURLOPT_SSLVERSION => 6,
            CURLOPT_SSL_VERIFYPEER => false,
            CURLOPT_TIMEOUT => $this->settings['timeout'] !== 30 ? $this->settings['timeout'] : 30
        ));
        
        $data = array('grant_type' => 'client_credentials');
        $body     = \Unirest\Request\Body::form($data);
        $response = \Unirest\Request::get($full_url, $headers, $body);

        return $response;
    }
public function getAtmLocation ( $ oauth_token , $ latitude , $ longitude , $ count = '10' , $ radius = '20' ) { $ apikey = $ this -> settings [ 'api_key' ] ; $ secret = $ this -> settings [ 'secret_key' ] ; $ params = array ( ) ; $ params [ 'SearchBy' ] = 'Distance' ; $ params [ 'Latitude' ] = $ latitude ; $ params [ 'Longitude' ] = $ longitude ; $ params [ 'Count' ] = $ count ; $ params [ 'Radius' ] = $ radius ; ksort ( $ params ) ; $ auth_query_string = self :: arrayImplode ( '=' , '&' , $ params ) ; $ uriSign = "GET:/general/info-bca/atm?$auth_query_string" ; $ isoTime = self :: generateIsoTime ( ) ; $ authSignature = self :: generateSign ( $ uriSign , $ oauth_token , $ secret , $ isoTime , null ) ; $ headers = array ( ) ; $ headers [ 'Accept' ] = 'application/json' ; $ headers [ 'Content-Type' ] = 'application/json' ; $ headers [ 'Authorization' ] = "Bearer $oauth_token" ; $ headers [ 'X-BCA-Key' ] = $ apikey ; $ headers [ 'X-BCA-Timestamp' ] = $ isoTime ; $ headers [ 'X-BCA-Signature' ] = $ authSignature ; $ request_path = "general/info-bca/atm?SearchBy=Distance&Latitude=$latitude&Longitude=$longitude&Count=$count&Radius=$radius" ; $ domain = $ this -> ddnDomain ( ) ; $ full_url = $ domain . $ request_path ; \ Unirest \ Request :: curlOpts ( array ( CURLOPT_SSL_VERIFYHOST => 0 , CURLOPT_SSLVERSION => 6 , CURLOPT_SSL_VERIFYPEER => false , CURLOPT_TIMEOUT => $ this -> settings [ 'timeout' ] !== 30 ? $ this -> settings [ 'timeout' ] : 30 ) ) ; $ data = array ( 'grant_type' => 'client_credentials' ) ; $ body = \ Unirest \ Request \ Body :: form ( $ data ) ; $ response = \ Unirest \ Request :: get ( $ full_url , $ headers , $ body ) ; return $ response ; }
Ambil informasi ATM berdasarkan lokasi GEO.

@param string $oauth_token nilai token yang telah didapatkan setelah login
@param string $latitude Langitude GPS
@param string $longitude Longitude GPS
@param string $count Jumlah ATM BCA yang akan ditampilkan
@param string $radius Nilai radius dari lokasi GEO

@return \Unirest\Response
Ambil informasi ATM berdasarkan lokasi GEO .