PayWithAmazon\HttpCurl::httpGet PHP Method

httpGet() public method

* GET using curl for the following situations 1. IPN certificate retrieval 2. Get User Info
public httpGet ( $url, $userAgent = null )
    public function httpGet($url, $userAgent = null)
    {
        $ch = $this->commonCurlParams($url, $userAgent);
        // Setting the HTTP header with the Access Token only for Getting user info
        if ($this->header) {
            curl_setopt($ch, CURLOPT_HTTPHEADER, array('Authorization: bearer ' . $this->accessToken));
        }
        $response = $this->execute($ch);
        return $response;
    }

Usage Example

 private function getCertificate($certificatePath)
 {
     $httpCurlRequest = new HttpCurl($this->ipnConfig);
     $response = $httpCurlRequest->httpGet($certificatePath);
     return $response;
 }
All Usage Examples Of PayWithAmazon\HttpCurl::httpGet