Class PisAuthorisationService


  • @Service
    public class PisAuthorisationService
    extends Object
    • Constructor Detail

      • PisAuthorisationService

        public PisAuthorisationService()
    • 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 payment
        psuData - 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 authorisation
        scaApproach - 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 authorisation
        scaApproach - 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 ID
        psuData - 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 identifier
        authorisationId - 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 identifier
        cancellationId - 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