Class BankTransferPayment

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

public class BankTransferPayment extends Object implements PaymentProcess
Factory class for creating bank transfer payment objects.
  • Constructor Details

    • BankTransferPayment

      public BankTransferPayment()
  • Method Details

    • createPayment

      public Payment createPayment(BankAccount senderAccount, String description, BankAccount recipientAccount, Card card) throws Exception
      Creates a Payment object for a bank transfer.
      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 (not used in bank transfer)
      Returns:
      the created Payment object
      Throws:
      Exception - if an error occurs during payment creation