Interface PaymentStrategy

All Known Implementing Classes:
PoWPaymentStrategy

public interface PaymentStrategy
Interface pour le patron de conception Stratégie (Payment Strategy). Permet de définir différents moyens de financer les commandes (Minage, Carte Bleue, PayPal...).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    pay(long amountNeeded, long currentBalance, ApiSender api)
    Méthode appelée lorsqu'un paiement ou une vérification de solde est nécessaire.
  • Method Details

    • pay

      void pay(long amountNeeded, long currentBalance, ApiSender api) throws IOException
      Méthode appelée lorsqu'un paiement ou une vérification de solde est nécessaire.
      Parameters:
      amountNeeded - Le montant total requis pour l'opération.
      currentBalance - Le solde actuel disponible sur le compte.
      api - Une référence vers l'API (Callback) pour effectuer des actions (ex: recharge).
      Throws:
      IOException - Si une opération réseau échoue.