wsilva94 / nfse-bh-sdk

notas fiscais de serviço via webservice da prefeitura de Belo Horizonte - MG
MIT License
6 stars 12 forks source link

Couldn't load from 'https://bhisshomologa.pbh.gov.br/bhiss-ws/nfse?wsdl' #3

Open leonardomarciano opened 3 years ago

leonardomarciano commented 3 years ago

Primeiramente, agradeço pela disponibilização da lib, estou enfrentando um problema na utilizacao:

Exception: No momento o sistema da prefeitura está instável ou inoperante, tente novamente mais tarde. E - SOAP-ERROR: Parsing WSDL: Couldn't load from 'https://bhisshomologa.pbh.gov.br/bhiss-ws/nfse?wsdl' : failed to load external entity "https://bhisshomologa.pbh.gov.br/bhiss-ws/nfse?wsdl"

Nao consigo sequer rodar os testes, pois todos os cenarios retornam esse mesmo erro.

` public function emitir() { try { //ambiente $settings = new Settings(); $settings->environment = 'producao'; //Emitente $settings->issuer->name = 'Serviço Social do Comércio - ARMG'; $settings->issuer->cnpj = 3643856003199; $settings->issuer->imun = 6992712; $settings->issuer->codMun = 3106200; //certificado digital $settings->certificate->folder = DIR . '/storage/certificates/' . $settings->issuer->cnpj . '/'; $settings->certificate->certFile = 'certificate.pfx'; $settings->certificate->mixedKey = 'mixedKey.pem'; $settings->certificate->privateKey = 'privateKey.pem'; $settings->certificate->publicKey = 'publicKey.pem'; $settings->certificate->password = 'fv100954'; $settings->certificate->noValidate = true; //set Identificacao Rps $parameter = new Lot(); $parameter->rpsLot = '201700000000006'; $parameter->rps->number = '201700000000002'; $parameter->rps->serie = 'AAAAA'; $parameter->rps->type = 1; $parameter->rps->date = date('Y-m-d H:i:s'); $parameter->rps->nature = 1; $parameter->rps->regime = 6; $parameter->rps->simple = 1; $parameter->rps->culturalPromoter = 2; $parameter->rps->status = 1; //set serviço $parameter->rps->service->itemList = 17.19; $parameter->rps->service->municipalityTaxationCode = 171900188; $parameter->rps->service->municipalCode = 3106200; $parameter->rps->service->description = 'PRESTACAO DE SERVICOS CONTABEIS'; $parameter->rps->service->serviceValue = 15.00; $parameter->rps->service->issWithheld = 2; $parameter->rps->service->aliquot = 5; $parameter->rps->service->valueDeductions = 0; $parameter->rps->service->otherDeductions = 0; $parameter->rps->service->valuePis = 0; $parameter->rps->service->valueConfis = 0; $parameter->rps->service->valueINSS = 0; $parameter->rps->service->valueIR = 0; $parameter->rps->service->valueCSLL = 0; $parameter->rps->service->discountCondition = 0; $parameter->rps->service->unconditionedDiscount = 0;

        //set tomador
        $parameter->rps->taker->type = 1;
        $parameter->rps->taker->name = 'Krypton Servicos Contabeis S/S';
        $parameter->rps->taker->document = 42784421000109;
        $parameter->rps->taker->municipalRegistration = 10876045716;
        //set tomador endereço
        $parameter->rps->taker->address->address = 'R Visconde De Taunay';
        $parameter->rps->taker->address->number = 173;
        $parameter->rps->taker->address->complement = '';
        $parameter->rps->taker->address->neighborhood = 'Sao Lucas';
        $parameter->rps->taker->address->zipCode = 30240300;
        $parameter->rps->taker->address->state = 'MG';
        $parameter->rps->taker->address->municipalityCode = 3106200;

        $lote = (new LoteRps($settings, $parameter->rpsLot));
        $rps = (new Rps($settings, $parameter->rps->number . $parameter->rps->serie));

        //set data
        $rps->setRpsIdentification($parameter);
        $rps->setService($parameter);
        $rps->setProvider();
        $rps->setTaker($parameter);

        //realiza chamada
        $signedRps = $rps->getSignedRps();
        $lote->addRps($signedRps);
        $result = $lote->sendLote();

        dd($result);
    } catch (Exception $e) {
        throw $e;
    }
}

}`

gmarcospires commented 2 years ago

Acho que você tem de baixar as dependências do projeto.