1057 Rejection: Signature differs from calculated

0

I'm trying to use the NFSe / NFSeSP.class.php example from nfephp-org and am having the following return:

<PedidoEnvioRPS xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.prefeitura.sp.gov.br/nfe" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Cabecalho xmlns="" Versao="1">
    <CPFCNPJRemetente>
    <CNPJ>00000000000000</CNPJ>
    </CPFCNPJRemetente>
</Cabecalho>
<RPS xmlns="">
    <Assinatura>
        ...
    </Assinatura>
    <ChaveRPS>
        <InscricaoPrestador>92038497</InscricaoPrestador>
        <SerieRPS>AAAAA</SerieRPS>
        <NumeroRPS>1</NumeroRPS>
    </ChaveRPS>
    <TipoRPS>RPS</TipoRPS>
    <DataEmissao>2015-12-09</DataEmissao>
    <StatusRPS>N</StatusRPS>
    <TributacaoRPS>T</TributacaoRPS>
    <ValorServicos>1</ValorServicos>
    <ValorDeducoes>0</ValorDeducoes>
    <CodigoServico>07498</CodigoServico>
    <AliquotaServicos>0.05</AliquotaServicos>
    <ISSRetido>false</ISSRetido>
    <CPFCNPJTomador>
        <CPF>36674391212</CPF>
    </CPFCNPJTomador>
    <RazaoSocialTomador>Joao Silva Santos</RazaoSocialTomador>
    <EnderecoTomador>
    <TipoLogradouro>Rua</TipoLogradouro>
    <Logradouro>Cuiate</Logradouro>
    <NumeroEndereco>196</NumeroEndereco>
    <ComplementoEndereco>Vila Operaria</ComplementoEndereco>
    <Bairro>Jardim Sao Paulo</Bairro>
    <Cidade>3550308</Cidade>
    <UF>SP</UF>
    <CEP>08411500</CEP>
    </EnderecoTomador>
    <EmailTomador>[email protected]</EmailTomador>
    <Discriminacao>Teste de geracao de NFSe via sistema proprio</Discriminacao>
</RPS>
<Signature xmlns="http://www.w3.org/2000/09/xmldsig#">
    <SignedInfo>
        <CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
        <SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
        <Reference URI="">
        <Transforms>
        <Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/>
        <Transform Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315"/>
        </Transforms>
        <DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
        <DigestValue>EhF55XYIO9a4LKL9cWlG6nHIz/4=</DigestValue>
        </Reference>
    </SignedInfo>
    <SignatureValue>
        ...
    </SignatureValue>
    <KeyInfo>
        <X509Data>
            <X509Certificate>
                ...
            </X509Certificate>
        </X509Data>
    </KeyInfo>
</Signature>

I'm on it days and the answers I saw, I did but until now nothing worked or was not the case.

Does anyone have any ideas how to solve this?

    
asked by anonymous 09.12.2015 / 11:52

0 answers