public interface PaymentFlowManager
Modifier and Type | Method and Description |
---|---|
PaymentFlow |
getPaymentFlowByAnnotation(PaymentRequired paymentRequired,
CachableHttpServletRequest request)
Method to create a new instance of related mode of PaymentFlow initialized with
current state in the payment flow.
|
PaymentFlow |
getPaymentFlowFromToken(CachableHttpServletRequest request,
ExpectedTokenType expectedTokenType)
Method to create a new instance of related mode of PaymentFlow initialized with
current state in the payment flow.
|
PaymentFlow getPaymentFlowByAnnotation(PaymentRequired paymentRequired, CachableHttpServletRequest request) throws InternalErrorException, java.io.IOException, TokenException
paymentRequired
- the related annotation for the resource needing payment.request
- the HTTP request to parse JWT token from.java.io.IOException
- if communication problems occurred with underlying components.InternalErrorException
- if internal errors occurred processing the method.TokenException
- if problems occurred generating or validating related JWT Token.PaymentFlow getPaymentFlowFromToken(CachableHttpServletRequest request, ExpectedTokenType expectedTokenType) throws java.lang.IllegalArgumentException, InternalErrorException, java.io.IOException, TokenException
This method should be called in states that doesn't have access to the PaymentRequired annotation, such as status controllers and similar.
request
- the HTTP request to parse JWT token from.expectedTokenType
- the expected type of JWT token.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 problems occurred generating or validating related JWT Token.