Class BankTransferPayment
java.lang.Object
api.mpba.rastvdmy.service.impl.factory.BankTransferPayment
- All Implemented Interfaces:
PaymentProcess
Factory class for creating bank transfer payment objects.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreatePayment
(BankAccount senderAccount, String description, BankAccount recipientAccount, Card card) Creates a Payment object for a bank transfer.
-
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 interfacePaymentProcess
- Parameters:
senderAccount
- the bank account of the senderdescription
- a description for the paymentrecipientAccount
- the bank account of the recipientcard
- 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
-