feat(purchase-status): implement purchase status page with loading and error handling

This commit is contained in:
2026-07-07 11:21:27 -03:00
parent cb0d1e4d77
commit 910f367851
9 changed files with 237 additions and 0 deletions

View File

@@ -37,4 +37,14 @@ export class CheckoutService {
}
return response;
}
async finalizePurchase(tenantCode: string, purchaseId: number): Promise<{ payment_status: string; status: string }> {
const response = await firstValueFrom(
this.http.post<{ data: { payment_status: string; status: string } }>(`${environment.url}tenants/${tenantCode}/compras/${purchaseId}/finalize`, {})
);
if (!response?.data) {
throw new Error('Error al finalizar la compra.');
}
return response.data;
}
}