Package org.cyclos.services.banking
Interface PaymentService
-
- All Superinterfaces:
Service
- All Known Subinterfaces:
PaymentServiceLocal
public interface PaymentService extends Service
Service interface to perform payments and for searching and retrieve information about a payment. A payment is a transaction, and performing a payment normally starts by usingTransactionService.getPaymentData(org.cyclos.model.banking.accounts.InternalAccountOwner, org.cyclos.model.banking.accounts.InternalAccountOwner, org.cyclos.model.banking.transfertypes.TransferTypeVO). Then, at a certain point, the user canpreview(PerformPaymentDTO)and eventuallyperform(PerformPaymentDTO)the payment.- See Also:
TransactionService,ScheduledPaymentService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PaymentDatagetData(@NotNull Long id)Returns data about a paymentPaymentVOperform(@NotNull PerformPaymentDTO parameters)Performs a payment, according to the given parameters, returning the resulting payment.PaymentPreviewVOpreview(@NotNull PerformPaymentDTO parameters)Previews a payment to be performedPaymentPreviewVOpreviewReceive(@NotNull PerformPaymentDTO parameters)Previews a payment to be receivedPaymentVOreceive(@NotNull PerformPaymentDTO parameters)Receives a payment, according to the given parameters, returning the resulting payment.voidvalidate(@NotNull PerformPaymentDTO parameters)Validates the parameters to perform a payment without actually performing the payment.
-
-
-
Method Detail
-
getData
PaymentData getData(@NotNull @NotNull Long id) throws FrameworkException
Returns data about a payment- Throws:
FrameworkException
-
perform
PaymentVO perform(@NotNull @NotNull PerformPaymentDTO parameters) throws TransferException, FrameworkException
Performs a payment, according to the given parameters, returning the resulting payment.- Throws:
InsufficientBalanceException- When the source account, or source account for any generated fee is limited and had insufficient balance for such a paymentMaxAmountPerDayExceededException- When the maximum amount for payments of this transfer type has been exceeded, according to the transfer type configurationUpperCreditLimitReachedException- When the destination account, or destination account for any generated fee is limited and would have more balance than the allowed maximumPasswordException- When the confirmation password doesn't matchTransferExceptionFrameworkException
-
preview
PaymentPreviewVO preview(@NotNull @NotNull PerformPaymentDTO parameters) throws FrameworkException
Previews a payment to be performed- Throws:
FrameworkException
-
previewReceive
PaymentPreviewVO previewReceive(@NotNull @NotNull PerformPaymentDTO parameters) throws FrameworkException
Previews a payment to be received- Throws:
FrameworkException
-
receive
PaymentVO receive(@NotNull @NotNull PerformPaymentDTO parameters) throws TransferException, PosPayerException, FrameworkException
Receives a payment, according to the given parameters, returning the resulting payment.- Throws:
TransferExceptionPosPayerExceptionFrameworkException- See Also:
perform(PerformPaymentDTO)
-
validate
void validate(@NotNull @NotNull PerformPaymentDTO parameters) throws FrameworkExceptionValidates the parameters to perform a payment without actually performing the payment. Attention: will only validate for required / invalid fields, but will not check for balance, maximum amount per day or other validations that require access to actual accounts.- Throws:
FrameworkException
-
-