Class CardPayment

java.lang.Object
api.mpba.rastvdmy.service.impl.factory.CardPayment
All Implemented Interfaces:
PaymentProcess

public class CardPayment extends Object implements PaymentProcess
Factory class for creating card payment objects.
  • Constructor Details

    • CardPayment

      public CardPayment()
  • Method Details

    • createPayment

      public Payment createPayment(BankAccount senderAccount, String description, BankAccount recipientAccount, Card card) throws Exception
      Creates a Payment object for a card payment.
      Specified by:
      createPayment in interface PaymentProcess
      Parameters:
      senderAccount - the bank account of the sender
      description - a description for the payment
      recipientAccount - the bank account of the recipient
      card - the card used for the payment
      Returns:
      the created Payment object
      Throws:
      Exception - if an error occurs during payment creation