Package org.bookstore.payment.service
Interface PaymentService
public interface PaymentService
The interface PaymentService defines a service to make credit card payments.
-
Method Summary
Modifier and TypeMethodDescriptionmakePayment
(Customer customer, CreditCard creditCard, BigDecimal amount) Makes a credit card payment.
-
Method Details
-
makePayment
Payment makePayment(Customer customer, CreditCard creditCard, BigDecimal amount) throws PaymentFailedException Makes a credit card payment.- Parameters:
customer
- the customercreditCard
- the credit card to be debitedamount
- the amount to be paid- Returns:
- the payment data
- Throws:
PaymentFailedException
- if the payment fails
-