This commit is contained in:
xXpuma99Xx
2022-05-04 22:23:55 -05:00
parent 3b3948135c
commit 9c7353a91e
2 changed files with 53 additions and 32 deletions
+28 -31
View File
@@ -13,39 +13,36 @@ export class SoapClientService {
) {}
dgae(cta: string, plt: string, crr: string, nvl: string) {
return this.soapDgae.return_vigencia(
{
key: sha1(this.configService.get<string>('SOAP_DGAE_KEY')),
cta,
plt,
crr,
nvl,
},
(err, res) => {
console.log(res);
if (err) return err;
return res;
},
);
return new Promise((resolve, reject) => {
this.soapDgae.return_vigencia(
{
key: sha1(this.configService.get<string>('SOAP_DGAE_KEY')),
cta,
plt,
crr,
nvl,
},
(err, res) => (err ? reject(err) : resolve(res)),
);
});
}
dgp(rfcNumEmp: string) {
return this.soapDpg.PlazaTrab(
{
rfcNumEmp,
usuario: this.configService.get<string>('SOAP_DGP_USERNAME'),
contrasenia: this.configService.get<string>('SOAP_DGP_PASSWORD'),
hash: md5(
this.configService.get<string>('SOAP_DGP_MD5_INI') +
rfcNumEmp +
this.configService.get<string>('SOAP_DGP_MD5_FIN') +
this.configService.get<string>('SOAP_DGP_USERNAME'),
),
},
(err, res) => {
console.log(err);
console.log(res);
},
);
return new Promise((resolve, reject) => {
this.soapDpg.PlazaTrab(
{
rfcNumEmp,
usuario: this.configService.get<string>('SOAP_DGP_USERNAME'),
contrasenia: this.configService.get<string>('SOAP_DGP_PASSWORD'),
hash: md5(
this.configService.get<string>('SOAP_DGP_MD5_INI') +
rfcNumEmp +
this.configService.get<string>('SOAP_DGP_MD5_FIN') +
this.configService.get<string>('SOAP_DGP_USERNAME'),
),
},
(err, res) => (err ? reject(err) : resolve(res)),
);
});
}
}