Class PisAuthorisationService
- java.lang.Object
-
- de.adorsys.psd2.xs2a.service.authorization.pis.PisAuthorisationService
-
@Service public class PisAuthorisationService extends Object
-
-
Constructor Summary
Constructors Constructor Description PisAuthorisationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description de.adorsys.psd2.consent.api.authorisation.CreateAuthorisationResponsecreatePisAuthorisation(String paymentId, de.adorsys.psd2.xs2a.core.psu.PsuIdData psuData)Sends a POST request to CMS to store created pis authorisationde.adorsys.psd2.consent.api.authorisation.CreateAuthorisationResponsecreatePisAuthorisationCancellation(String paymentId, de.adorsys.psd2.xs2a.core.psu.PsuIdData psuData)Sends a POST request to CMS to store created pis authorisation cancellationOptional<de.adorsys.psd2.xs2a.core.sca.AuthorisationScaApproachResponse>getAuthorisationScaApproach(String authorisationId)Gets SCA approach of the authorisation by its id and typeOptional<de.adorsys.psd2.xs2a.core.sca.ScaStatus>getAuthorisationScaStatus(String paymentId, String authorisationId)Gets SCA status of the authorisationOptional<List<String>>getAuthorisationSubResources(String paymentId)Sends a GET request to CMS to get authorisation sub resourcesOptional<de.adorsys.psd2.xs2a.core.sca.ScaStatus>getCancellationAuthorisationScaStatus(String paymentId, String cancellationId)Gets SCA status of the cancellation authorisationOptional<List<String>>getCancellationAuthorisationSubResources(String paymentId)Sends a GET request to CMS to get cancellation authorisation sub resourcesvoidupdateAuthorisation(UpdateAuthorisationRequest request, AuthorisationProcessorResponse response)voidupdateCancellationAuthorisation(UpdateAuthorisationRequest request, AuthorisationProcessorResponse response)Xs2aUpdatePisCommonPaymentPsuDataResponseupdatePisAuthorisation(Xs2aUpdatePisCommonPaymentPsuDataRequest request, de.adorsys.psd2.xs2a.core.profile.ScaApproach scaApproach)Updates PIS authorisation according to psu's sca methods with embedded and decoupled SCA approachXs2aUpdatePisCommonPaymentPsuDataResponseupdatePisCancellationAuthorisation(Xs2aUpdatePisCommonPaymentPsuDataRequest request, de.adorsys.psd2.xs2a.core.profile.ScaApproach scaApproach)Updates PIS cancellation authorisation according to psu's sca methods with embedded and decoupled SCA approach
-
-
-
Method Detail
-
createPisAuthorisation
public de.adorsys.psd2.consent.api.authorisation.CreateAuthorisationResponse createPisAuthorisation(String paymentId, de.adorsys.psd2.xs2a.core.psu.PsuIdData psuData)
Sends a POST request to CMS to store created pis authorisation- Parameters:
paymentId- String representation of identifier of stored paymentpsuData- PsuIdData container of authorisation data about PSU- Returns:
- a response object containing authorisation id
-
updatePisAuthorisation
public Xs2aUpdatePisCommonPaymentPsuDataResponse updatePisAuthorisation(Xs2aUpdatePisCommonPaymentPsuDataRequest request, de.adorsys.psd2.xs2a.core.profile.ScaApproach scaApproach)
Updates PIS authorisation according to psu's sca methods with embedded and decoupled SCA approach- Parameters:
request- Provides transporting data when updating pis authorisationscaApproach- current SCA approach, preferred by the server- Returns:
- update pis authorisation response, which contains payment id, authorisation id, sca status, psu message and links
-
updatePisCancellationAuthorisation
public Xs2aUpdatePisCommonPaymentPsuDataResponse updatePisCancellationAuthorisation(Xs2aUpdatePisCommonPaymentPsuDataRequest request, de.adorsys.psd2.xs2a.core.profile.ScaApproach scaApproach)
Updates PIS cancellation authorisation according to psu's sca methods with embedded and decoupled SCA approach- Parameters:
request- Provides transporting data when updating pis cancellation authorisationscaApproach- current SCA approach, preferred by the server- Returns:
- update pis authorisation response, which contains payment id, authorisation id, sca status, psu message and links
-
createPisAuthorisationCancellation
public de.adorsys.psd2.consent.api.authorisation.CreateAuthorisationResponse createPisAuthorisationCancellation(String paymentId, de.adorsys.psd2.xs2a.core.psu.PsuIdData psuData)
Sends a POST request to CMS to store created pis authorisation cancellation- Parameters:
paymentId- String representation of identifier of payment IDpsuData- PsuIdData container of authorisation data about PSU- Returns:
- long representation of identifier of stored pis authorisation cancellation
-
getCancellationAuthorisationSubResources
public Optional<List<String>> getCancellationAuthorisationSubResources(String paymentId)
Sends a GET request to CMS to get cancellation authorisation sub resources- Parameters:
paymentId- String representation of identifier of payment ID- Returns:
- list of pis authorisation IDs
-
getAuthorisationSubResources
public Optional<List<String>> getAuthorisationSubResources(String paymentId)
Sends a GET request to CMS to get authorisation sub resources- Parameters:
paymentId- String representation of identifier of payment ID- Returns:
- list of pis authorisation IDs
-
getAuthorisationScaStatus
public Optional<de.adorsys.psd2.xs2a.core.sca.ScaStatus> getAuthorisationScaStatus(String paymentId, String authorisationId)
Gets SCA status of the authorisation- Parameters:
paymentId- String representation of the payment identifierauthorisationId- String representation of the authorisation identifier- Returns:
- SCA status of the authorisation
-
getCancellationAuthorisationScaStatus
public Optional<de.adorsys.psd2.xs2a.core.sca.ScaStatus> getCancellationAuthorisationScaStatus(String paymentId, String cancellationId)
Gets SCA status of the cancellation authorisation- Parameters:
paymentId- String representation of the payment identifiercancellationId- String representation of the cancellation authorisation identifier- Returns:
- SCA status of the authorisation
-
getAuthorisationScaApproach
public Optional<de.adorsys.psd2.xs2a.core.sca.AuthorisationScaApproachResponse> getAuthorisationScaApproach(String authorisationId)
Gets SCA approach of the authorisation by its id and type- Parameters:
authorisationId- String representation of the authorisation identifier- Returns:
- SCA approach of the authorisation
-
updateAuthorisation
public void updateAuthorisation(UpdateAuthorisationRequest request, AuthorisationProcessorResponse response)
-
updateCancellationAuthorisation
public void updateCancellationAuthorisation(UpdateAuthorisationRequest request, AuthorisationProcessorResponse response)
-
-