Interface PaymentProcess
- All Known Implementing Classes:
BankTransferPayment
,CardPayment
public interface PaymentProcess
Factory interface for creating Payment objects.
-
Method Summary
Modifier and TypeMethodDescriptioncreatePayment
(BankAccount senderAccount, String description, BankAccount recipientAccount, Card card) Creates a Payment object.
-
Method Details
-
createPayment
Payment createPayment(BankAccount senderAccount, String description, BankAccount recipientAccount, Card card) throws Exception Creates a Payment object.- 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
-