public interface PaymentFlow
Modifier and Type | Method and Description |
---|---|
InvoiceResult |
checkSettledInvoice()
Method to check if a invoice is settled and returns an InvoiceResult if it is settled, otherwise null.
|
byte[] |
getPreImageHash() |
SettlementResult |
getSettlement()
Method to retrieve a settlement and generate a settlement token.
|
boolean |
isPaymentRequired()
Method that should determine if the current state of payment flow.
|
boolean |
isPayPerRequest()
Method that should indicate if related payment flow is for one request only or valid
over a given period.
|
boolean |
isSettled()
Method to check if related payment is settled by the end user.
|
void |
markAsExecuted()
Method that should be called by a filter or equivalent after successful execution of
payed request and the related payment flow is payPerRequest.
|
InvoiceResult |
requestPayment()
Method to create and order and optionally an invoice (depending on system setup).
|
boolean isPaymentRequired() throws AlreadyExecutedException, java.lang.IllegalArgumentException, java.io.IOException, InternalErrorException
AlreadyExecutedException
- if related payment is pay per request and is already executed.java.lang.IllegalArgumentException
- if user specified parameters (used by the constructor) was invalid.java.io.IOException
- if communication problems occurred with underlying components.InternalErrorException
- if internal errors occurred processing the method.InvoiceResult requestPayment() throws java.lang.IllegalArgumentException, java.io.IOException, InternalErrorException, InvalidCurrencyException, TokenException
java.lang.IllegalArgumentException
- if user specified parameters (used by the constructor) was invalid.java.io.IOException
- if communication problems occurred with underlying components.InternalErrorException
- if internal errors occurred processing the method.InvalidCurrencyException
- if problems occurred converting the currency in the order to the one
used in the invoice.TokenException
- if problems occurred generating or validating related JWT Token.boolean isSettled() throws AlreadyExecutedException, java.lang.IllegalArgumentException, java.io.IOException, InternalErrorException
AlreadyExecutedException
- if related payment is pay per request and is already executed.java.lang.IllegalArgumentException
- if user specified parameters (used by the constructor) was invalid.java.io.IOException
- if communication problems occurred with underlying components.InternalErrorException
- if internal errors occurred processing the method.SettlementResult getSettlement() throws AlreadyExecutedException, java.lang.IllegalArgumentException, java.io.IOException, InternalErrorException, TokenException
AlreadyExecutedException
- if related payment is pay per request and is already executed.java.lang.IllegalArgumentException
- if user specified parameters (used by the constructor) was invalid.java.io.IOException
- if communication problems occurred with underlying components.InternalErrorException
- if internal errors occurred processing the method.TokenException
- if problem occurred generating the settlement token.InvoiceResult checkSettledInvoice() throws java.lang.IllegalArgumentException, java.io.IOException, InternalErrorException, TokenException
java.lang.IllegalArgumentException
- if user specified parameters (used by the constructor) was invalid.java.io.IOException
- if communication problems occurred with underlying components.InternalErrorException
- if internal errors occurred processing the method.TokenException
- if problem occurred generating the settlement token.boolean isPayPerRequest() throws java.lang.IllegalArgumentException, java.io.IOException, InternalErrorException
java.lang.IllegalArgumentException
- if user specified parameters (used by the constructor) was invalid.java.io.IOException
- if communication problems occurred with underlying components.InternalErrorException
- if internal errors occurred processing the method.void markAsExecuted() throws java.lang.IllegalArgumentException, java.io.IOException, InternalErrorException
java.lang.IllegalArgumentException
- if user specified parameters (used by the constructor) was invalid.java.io.IOException
- if communication problems occurred with underlying components.InternalErrorException
- if internal errors occurred processing the method.byte[] getPreImageHash()