Increase payment processor request timeout to 2500ms

This commit is contained in:
Jose Eduardo 2025-08-17 04:31:12 -04:00
parent fe06faf0e8
commit e2c7dd647d

View File

@ -23,12 +23,9 @@ export class MakePaymentToProcessorService {
const response = await firstValueFrom( const response = await firstValueFrom(
this.httpService.post(`${url}/payments`, paymentData, { this.httpService.post(`${url}/payments`, paymentData, {
timeout: 2000, timeout: 2500,
}), }),
); );
if (response.status !== 200) {
throw new Error(response.data.message || 'Payment processor error');
}
return response.status === 200; return response.status === 200;
} }
} }