app.service('DocumentoService', function($http) { this.verificaCrc = function (crc) { return $http( { method: "post", url: 'http://assinaturas.brazipcentral.com.br/php/request.php', data: { operacao : 'consultaCtcr', crc: crc }, headers: { 'Content-Type': 'application/x-www-form-urlencoded' } } ); } this.verificaCodigoVerificador = function (codigoVerificador) { return $http( { method: "post", url: 'http://assinaturas.brazipcentral.com.br/php/request.php', data: { operacao : 'consultaCodigoverificador', codigoVerificador: codigoVerificador }, headers: { 'Content-Type': 'application/x-www-form-urlencoded' } } ); } this.getDados = function (crc,codigoVerificador) { return $http( { method: "post", url: 'http://assinaturas.brazipcentral.com.br/php/request.php', data: { operacao : 'getDados', codigoVerificador: codigoVerificador, crc: crc }, headers: { 'Content-Type': 'application/x-www-form-urlencoded' } } ); } } );