Class PaymentService


  • @Service
    public class PaymentService
    extends Object
    • Constructor Detail

      • PaymentService

        public PaymentService()
    • Method Detail

      • createPayment

        public ResponseObject<PaymentInitiationResponse> createPayment​(byte[] payment,
                                                                       PaymentInitiationParameters paymentInitiationParameters)
        Initiates a payment though "payment service" corresponding service method
        Parameters:
        payment - Payment information
        paymentInitiationParameters - Parameters for payment initiation
        Returns:
        Response containing information about created payment or corresponding error
      • getPaymentById

        public ResponseObject<CommonPayment> getPaymentById​(de.adorsys.psd2.xs2a.core.profile.PaymentType paymentType,
                                                            String paymentProduct,
                                                            String encryptedPaymentId)
        Retrieves payment from ASPSP by its ASPSP identifier, product and payment type
        Parameters:
        paymentType - type of payment (payments, bulk-payments, periodic-payments)
        paymentProduct - payment product used for payment creation (e.g. sepa-credit-transfers, instant-sepa-credit-transfers...)
        encryptedPaymentId - ASPSP identifier of the payment
        Returns:
        Response containing information about payment or corresponding error
      • getPaymentStatusById

        public ResponseObject<GetPaymentStatusResponse> getPaymentStatusById​(de.adorsys.psd2.xs2a.core.profile.PaymentType paymentType,
                                                                             String paymentProduct,
                                                                             String encryptedPaymentId)
        Retrieves payment status from ASPSP
        Parameters:
        paymentType - The addressed payment category Single, Periodic or Bulk
        paymentProduct - payment product used for payment creation (e.g. sepa-credit-transfers, instant-sepa-credit-transfers...)
        encryptedPaymentId - String representation of payment primary ASPSP identifier
        Returns:
        Information about the status of a payment
      • cancelPayment

        public ResponseObject<CancelPaymentResponse> cancelPayment​(de.adorsys.psd2.consent.api.pis.proto.PisPaymentCancellationRequest paymentCancellationRequest)
        Cancels payment by its ASPSP identifier and payment type
        Parameters:
        paymentCancellationRequest - PisPaymentCancellationRequest
        Returns:
        Response containing information about cancelled payment or corresponding error