Class CardPayment
java.lang.Object
api.mpba.rastvdmy.service.impl.factory.CardPayment
- All Implemented Interfaces:
PaymentProcess
Factory class for creating card payment objects.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncreatePayment
(BankAccount senderAccount, String description, BankAccount recipientAccount, Card card) Creates a Payment object for a card payment.
-
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 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- Returns:
- the created Payment object
- Throws:
Exception
- if an error occurs during payment creation
-