feat: PHASE 2 et 3 - Paiements centralisés et intégration Wave
PHASE 2 - Système de Paiements Centralisé: - Entité Paiement centralisée avec enums MethodePaiement et StatutPaiement - Tables de liaison: PaiementCotisation, PaiementAdhesion, PaiementEvenement, PaiementAide - Repository PaiementRepository avec méthodes de recherche et calculs - Relations bidirectionnelles avec Membre PHASE 3 - Intégration Wave Mobile Money: - Entités Wave: CompteWave, TransactionWave, WebhookWave, ConfigurationWave - Enums: StatutCompteWave, TypeTransactionWave, StatutTransactionWave, TypeEvenementWebhook, StatutWebhook - Repositories: CompteWaveRepository, TransactionWaveRepository, WebhookWaveRepository, ConfigurationWaveRepository - Relations bidirectionnelles dans Organisation et Membre - Ajout champ telephoneWave dans Membre Respect strict DRY/WOU: - Enums dans module API réutilisables - Patterns de repository cohérents - Relations JPA standardisées - Numéro de référence auto-généré pour Paiement
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package dev.lions.unionflow.server.api.enums.paiement;
|
||||
|
||||
/**
|
||||
* Énumération des méthodes de paiement dans UnionFlow
|
||||
*
|
||||
* @author UnionFlow Team
|
||||
* @version 3.0
|
||||
* @since 2025-01-29
|
||||
*/
|
||||
public enum MethodePaiement {
|
||||
WAVE_MOBILE_MONEY("Wave Mobile Money"),
|
||||
ORANGE_MONEY("Orange Money"),
|
||||
MTN_MOBILE_MONEY("MTN Mobile Money"),
|
||||
MOOV_MONEY("Moov Money"),
|
||||
VIREMENT_BANCAIRE("Virement Bancaire"),
|
||||
CARTE_BANCAIRE("Carte Bancaire"),
|
||||
ESPECES("Espèces"),
|
||||
CHEQUE("Chèque"),
|
||||
AUTRE("Autre");
|
||||
|
||||
private final String libelle;
|
||||
|
||||
MethodePaiement(String libelle) {
|
||||
this.libelle = libelle;
|
||||
}
|
||||
|
||||
public String getLibelle() {
|
||||
return libelle;
|
||||
}
|
||||
|
||||
/** Vérifie si c'est une méthode de mobile money */
|
||||
public boolean isMobileMoney() {
|
||||
return this == WAVE_MOBILE_MONEY
|
||||
|| this == ORANGE_MONEY
|
||||
|| this == MTN_MOBILE_MONEY
|
||||
|| this == MOOV_MONEY;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,38 @@
|
||||
package dev.lions.unionflow.server.api.enums.paiement;
|
||||
|
||||
/**
|
||||
* Énumération des statuts de paiement dans UnionFlow
|
||||
*
|
||||
* @author UnionFlow Team
|
||||
* @version 3.0
|
||||
* @since 2025-01-29
|
||||
*/
|
||||
public enum StatutPaiement {
|
||||
EN_ATTENTE("En Attente"),
|
||||
EN_COURS("En Cours"),
|
||||
VALIDE("Validé"),
|
||||
ECHOUE("Échoué"),
|
||||
ANNULE("Annulé"),
|
||||
REMBOURSE("Remboursé");
|
||||
|
||||
private final String libelle;
|
||||
|
||||
StatutPaiement(String libelle) {
|
||||
this.libelle = libelle;
|
||||
}
|
||||
|
||||
public String getLibelle() {
|
||||
return libelle;
|
||||
}
|
||||
|
||||
/** Vérifie si le paiement est finalisé (ne peut plus changer) */
|
||||
public boolean isFinalise() {
|
||||
return this == VALIDE || this == ECHOUE || this == ANNULE || this == REMBOURSE;
|
||||
}
|
||||
|
||||
/** Vérifie si le paiement est en cours de traitement */
|
||||
public boolean isEnTraitement() {
|
||||
return this == EN_ATTENTE || this == EN_COURS;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,26 @@
|
||||
package dev.lions.unionflow.server.api.enums.wave;
|
||||
|
||||
/**
|
||||
* Énumération des statuts de compte Wave
|
||||
*
|
||||
* @author UnionFlow Team
|
||||
* @version 3.0
|
||||
* @since 2025-01-29
|
||||
*/
|
||||
public enum StatutCompteWave {
|
||||
NON_VERIFIE("Non Vérifié"),
|
||||
VERIFIE("Vérifié"),
|
||||
SUSPENDU("Suspendu"),
|
||||
BLOQUE("Bloqué");
|
||||
|
||||
private final String libelle;
|
||||
|
||||
StatutCompteWave(String libelle) {
|
||||
this.libelle = libelle;
|
||||
}
|
||||
|
||||
public String getLibelle() {
|
||||
return libelle;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package dev.lions.unionflow.server.api.enums.wave;
|
||||
|
||||
/**
|
||||
* Énumération des statuts de transaction Wave
|
||||
*
|
||||
* @author UnionFlow Team
|
||||
* @version 3.0
|
||||
* @since 2025-01-29
|
||||
*/
|
||||
public enum StatutTransactionWave {
|
||||
INITIALISE("Initialisé"),
|
||||
EN_ATTENTE("En Attente"),
|
||||
EN_COURS("En Cours"),
|
||||
REUSSIE("Réussie"),
|
||||
ECHOUE("Échoué"),
|
||||
ANNULEE("Annulée"),
|
||||
EXPIRED("Expiré");
|
||||
|
||||
private final String libelle;
|
||||
|
||||
StatutTransactionWave(String libelle) {
|
||||
this.libelle = libelle;
|
||||
}
|
||||
|
||||
public String getLibelle() {
|
||||
return libelle;
|
||||
}
|
||||
|
||||
/** Vérifie si la transaction est finalisée */
|
||||
public boolean isFinalise() {
|
||||
return this == REUSSIE || this == ECHOUE || this == ANNULEE || this == EXPIRED;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package dev.lions.unionflow.server.api.enums.wave;
|
||||
|
||||
/**
|
||||
* Énumération des statuts de traitement de webhook Wave
|
||||
*
|
||||
* @author UnionFlow Team
|
||||
* @version 3.0
|
||||
* @since 2025-01-29
|
||||
*/
|
||||
public enum StatutWebhook {
|
||||
EN_ATTENTE("En Attente"),
|
||||
EN_TRAITEMENT("En Traitement"),
|
||||
TRAITE("Traité"),
|
||||
ECHOUE("Échoué"),
|
||||
IGNORE("Ignoré");
|
||||
|
||||
private final String libelle;
|
||||
|
||||
StatutWebhook(String libelle) {
|
||||
this.libelle = libelle;
|
||||
}
|
||||
|
||||
public String getLibelle() {
|
||||
return libelle;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,29 @@
|
||||
package dev.lions.unionflow.server.api.enums.wave;
|
||||
|
||||
/**
|
||||
* Énumération des types d'événements webhook Wave
|
||||
*
|
||||
* @author UnionFlow Team
|
||||
* @version 3.0
|
||||
* @since 2025-01-29
|
||||
*/
|
||||
public enum TypeEvenementWebhook {
|
||||
TRANSACTION_CREATED("Transaction Créée"),
|
||||
TRANSACTION_COMPLETED("Transaction Complétée"),
|
||||
TRANSACTION_FAILED("Transaction Échouée"),
|
||||
TRANSACTION_CANCELLED("Transaction Annulée"),
|
||||
ACCOUNT_VERIFIED("Compte Vérifié"),
|
||||
ACCOUNT_SUSPENDED("Compte Suspendu"),
|
||||
OTHER("Autre");
|
||||
|
||||
private final String libelle;
|
||||
|
||||
TypeEvenementWebhook(String libelle) {
|
||||
this.libelle = libelle;
|
||||
}
|
||||
|
||||
public String getLibelle() {
|
||||
return libelle;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package dev.lions.unionflow.server.api.enums.wave;
|
||||
|
||||
/**
|
||||
* Énumération des types de transaction Wave
|
||||
*
|
||||
* @author UnionFlow Team
|
||||
* @version 3.0
|
||||
* @since 2025-01-29
|
||||
*/
|
||||
public enum TypeTransactionWave {
|
||||
DEPOT("Dépôt"),
|
||||
RETRAIT("Retrait"),
|
||||
TRANSFERT("Transfert"),
|
||||
PAIEMENT("Paiement"),
|
||||
REMBOURSEMENT("Remboursement");
|
||||
|
||||
private final String libelle;
|
||||
|
||||
TypeTransactionWave(String libelle) {
|
||||
this.libelle = libelle;
|
||||
}
|
||||
|
||||
public String getLibelle() {
|
||||
return libelle;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user