private static function decryptCipherText($encryptedData, $wrappedReceiptKey, $pem)
    {
        // Unwrap key and get profile
        openssl_private_decrypt(base64_decode($wrappedReceiptKey), $unwrappedKey, $pem);

        // Decipher encrypted data with unwrapped key and IV
        $cipherText = openssl_decrypt(
            $encryptedData->getCipherText(),
            'aes-256-cbc',
            $unwrappedKey,
            OPENSSL_RAW_DATA,
            $encryptedData->getIv()
        );

        return $cipherText;
    }
private static function decryptCipherText($encryptedData, $wrappedReceiptKey, $pem)
    {
        // Unwrap key and get profile
        openssl_private_decrypt(base64_decode($wrappedReceiptKey), $unwrappedKey, $pem);

        // Decipher encrypted data with unwrapped key and IV
        $cipherText = openssl_decrypt(
            $encryptedData->getCipherText(),
            'aes-256-cbc',
            $unwrappedKey,
            OPENSSL_RAW_DATA,
            $encryptedData->getIv()
        );

        return $cipherText;
    }
private static function decryptCipherText ( $ encryptedData , $ wrappedReceiptKey , $ pem ) { // Unwrap key and get profile openssl_private_decrypt ( base64_decode ( $ wrappedReceiptKey ) , $ unwrappedKey , $ pem ) ; // Decipher encrypted data with unwrapped key and IV $ cipherText = openssl_decrypt ( $ encryptedData -> getCipherText ( ) , 'aes-256-cbc' , $ unwrappedKey , OPENSSL_RAW_DATA , $ encryptedData -> getIv ( ) ) ; return $ cipherText ; }
Return decrypted cipher text.

@param $encryptedData
@param $wrappedReceiptKey
@param $pem

@return string
Return decrypted cipher text .