Class CreatePaymentValidator

    • Constructor Detail

      • CreatePaymentValidator

        public CreatePaymentValidator()
    • Method Detail

      • validate

        @NotNull
        public @NotNull ValidationResult validate​(@NotNull
                                                  @NotNull CreatePaymentRequestObject createPaymentRequestObject)
        Validates create payment request by checking whether:
        • Payment product and payment type are correct
        • PSU Data is present in the request if it's mandated by the profile
        • Account references are supported by ASPSP
        Specified by:
        validate in interface BusinessValidator<CreatePaymentRequestObject>
        Parameters:
        createPaymentRequestObject - payment request object with information about the payment
        Returns:
        valid result if the parameters are valid, invalid result with appropriate error otherwise
      • buildWarningMessages

        @NotNull
        public @NotNull Set<de.adorsys.psd2.xs2a.core.domain.TppMessageInformation> buildWarningMessages​(@NotNull
                                                                                                         @NotNull CreatePaymentRequestObject createPaymentRequestObject)
        Description copied from interface: BusinessValidator
        Checks some object according to some business rules and creates warning messages if there is inconsistency in the logic
        Specified by:
        buildWarningMessages in interface BusinessValidator<CreatePaymentRequestObject>
        Parameters:
        createPaymentRequestObject - business object to be validated
        Returns:
        empty set if the object doesn't have inconsistencies, set of warning messages otherwise