Skip to content

Commit

Permalink
gera digito verificador com parametros
Browse files Browse the repository at this point in the history
  • Loading branch information
RogerioML committed Feb 22, 2021
1 parent abd8412 commit e38b184
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions plp.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ var (
ErrEmailRemetente = errors.New("negocio: formato de email do remetente inválido")
ErrCelularRemetente = errors.New("negocio: formato de celular de remetente inválido")
Wsdl string
User string
Pass string
)

func init() {
Expand Down Expand Up @@ -377,8 +379,8 @@ func GeraDigitoVerificadorEtiquetas(etiqueta string) (int, error) {
<x:Body>
<cli:geraDigitoVerificadorEtiquetas>
<etiquetas>` + etiqueta + `</etiquetas>
<usuario>gati</usuario>
<senha>lbqhj</senha>
<usuario> ` + User + `</usuario>
<senha>` + Pass + `</senha>
</cli:geraDigitoVerificadorEtiquetas>
</x:Body>
</x:Envelope>
Expand Down Expand Up @@ -532,7 +534,7 @@ type solicitaPLPResponse struct {
} `xml:"Body"`
}

//ConsultaCEP faz a chamada ao SIGEPWEB e obtem o endereco correspondente a um CEP
//SolicitaPLP faz a chamada ao SIGEPWEB e obtem o xml de uma PLP
func SolicitaPLP(plp string, etiqueta string, usuario string, senha string) (string, error) {
ret := solicitaPLPResponse{}
payload := fmt.Sprintf(`
Expand Down

0 comments on commit e38b184

Please sign in to comment.