feat(wave): webhooks + redirect handler
- WebhookWave : entité pour logs webhooks Wave (idempotence + audit) - WaveRedirectResource : endpoint de retour après paiement Wave (redirige vers l'app mobile avec le statut)
This commit is contained in:
@@ -83,7 +83,7 @@ public class WebhookWave extends BaseEntity {
|
||||
|
||||
@ManyToOne(fetch = FetchType.LAZY)
|
||||
@JoinColumn(name = "paiement_id")
|
||||
private Paiement paiement;
|
||||
private Versement versement;
|
||||
|
||||
/** Méthode métier pour vérifier si le webhook est traité */
|
||||
public boolean isTraite() {
|
||||
|
||||
@@ -6,7 +6,7 @@ import dev.lions.unionflow.server.api.dto.mutuelle.epargne.TransactionEpargneReq
|
||||
import dev.lions.unionflow.server.api.enums.mutuelle.epargne.TypeTransactionEpargne;
|
||||
import dev.lions.unionflow.server.entity.IntentionPaiement;
|
||||
import dev.lions.unionflow.server.repository.IntentionPaiementRepository;
|
||||
import dev.lions.unionflow.server.service.PaiementService;
|
||||
import dev.lions.unionflow.server.service.VersementService;
|
||||
import dev.lions.unionflow.server.service.mutuelle.epargne.TransactionEpargneService;
|
||||
import jakarta.annotation.security.PermitAll;
|
||||
import jakarta.ws.rs.Produces;
|
||||
@@ -51,7 +51,7 @@ public class WaveRedirectResource {
|
||||
TransactionEpargneService transactionEpargneService;
|
||||
|
||||
@Inject
|
||||
PaiementService paiementService;
|
||||
VersementService versementService;
|
||||
|
||||
@GET
|
||||
@Path("/success")
|
||||
@@ -172,8 +172,8 @@ public class WaveRedirectResource {
|
||||
}
|
||||
}
|
||||
|
||||
// Déléguer la complétion cotisations au service
|
||||
paiementService.completerIntention(intention, null);
|
||||
// Déléguer la confirmation cotisations au service
|
||||
versementService.confirmerVersementWave(intention, null);
|
||||
LOG.infof("Wave: intention %s complétée", ref);
|
||||
} catch (Exception e) {
|
||||
LOG.errorf(e, "Wave: erreur applyCompletion ref=%s", ref);
|
||||
|
||||
Reference in New Issue
Block a user