Class DonationPaymentController

java.lang.Object
ui.controller.donation.DonationPaymentController
All Implemented Interfaces:
DonationSessionAware

public class DonationPaymentController extends Object implements DonationSessionAware
Controller for the payment information page in the donation flow. Handles validation of card number, expiry date and CVC.
  • Constructor Details

    • DonationPaymentController

      public DonationPaymentController()
  • Method Details

    • setDonationSession

      public void setDonationSession(DonationSession donationSession)
      Sets the donation session and updates the organization and amount labels.
      Specified by:
      setDonationSession in interface DonationSessionAware
      Parameters:
      donationSession - the active donation session
    • setOnContinue

      public void setOnContinue(Consumer<DonationSession> onContinue)
      Sets the callback to invoke when the user confirms the donation.
      Parameters:
      onContinue - the callback with the updated donation session
    • handleConfirmDonation

      public void handleConfirmDonation()
      Validates payment information and continues to the confirmation step.
    • setOnBack

      public void setOnBack(Runnable onBack)
      Sets the callback to invoke when the user navigates back.
      Parameters:
      onBack - the callback to run on back navigation