Class DonationPaymentController
java.lang.Object
ui.controller.donation.DonationPaymentController
- All Implemented Interfaces:
DonationSessionAware
Controller for the payment information page in the donation flow.
Handles validation of card number, expiry date and CVC.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidValidates payment information and continues to the confirmation step.voidsetDonationSession(DonationSession donationSession) Sets the donation session and updates the organization and amount labels.voidSets the callback to invoke when the user navigates back.voidsetOnContinue(Consumer<DonationSession> onContinue) Sets the callback to invoke when the user confirms the donation.
-
Constructor Details
-
DonationPaymentController
public DonationPaymentController()
-
-
Method Details
-
setDonationSession
Sets the donation session and updates the organization and amount labels.- Specified by:
setDonationSessionin interfaceDonationSessionAware- Parameters:
donationSession- the active donation session
-
setOnContinue
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
Sets the callback to invoke when the user navigates back.- Parameters:
onBack- the callback to run on back navigation
-