private function getReceipt($encryptedConnectToken, $httpMethod = CurlRequestHandler::METHOD_GET, $payload = null)
    {
        // Decrypt connect token
        $token = $this->decryptConnectToken($encryptedConnectToken);
        if (!$token) {
            throw new ActivityDetailsException('Could not decrypt connect token.', 401);
        }

        // Request endpoint
        $endpoint = sprintf(self::PROFILE_REQUEST_ENDPOINT, $token);
        $result = $this->sendRequest($endpoint, $httpMethod, $payload);

        $responseArr = $this->processResult($result);
        $this->checkForReceipt($responseArr);

        return new Receipt($responseArr['receipt']);
    }
private function getReceipt($encryptedConnectToken, $httpMethod = CurlRequestHandler::METHOD_GET, $payload = null)
    {
        // Decrypt connect token
        $token = $this->decryptConnectToken($encryptedConnectToken);
        if (!$token) {
            throw new ActivityDetailsException('Could not decrypt connect token.', 401);
        }

        // Request endpoint
        $endpoint = sprintf(self::PROFILE_REQUEST_ENDPOINT, $token);
        $result = $this->sendRequest($endpoint, $httpMethod, $payload);

        $responseArr = $this->processResult($result);
        $this->checkForReceipt($responseArr);

        return new Receipt($responseArr['receipt']);
    }
private function getReceipt ( $ encryptedConnectToken , $ httpMethod = CurlRequestHandler :: METHOD_GET , $ payload = null ) { // Decrypt connect token $ token = $ this -> decryptConnectToken ( $ encryptedConnectToken ) ; if ( ! $ token ) { throw new ActivityDetailsException ( 'Could not decrypt connect token.' , 401 ) ; } // Request endpoint $ endpoint = sprintf ( self :: PROFILE_REQUEST_ENDPOINT , $ token ) ; $ result = $ this -> sendRequest ( $ endpoint , $ httpMethod , $ payload ) ; $ responseArr = $ this -> processResult ( $ result ) ; $ this -> checkForReceipt ( $ responseArr ) ; return new Receipt ( $ responseArr [ 'receipt' ] ) ; }
Decrypt and return receipt data.

@param string $encryptedConnectToken
@param string $httpMethod
@param Payload|NULL $payload

@return Receipt

@throws ActivityDetailsException
@throws ReceiptException
@throws RequestException
Decrypt and return receipt data .