Interface PaymentAccessValidationService

All Known Implementing Classes:
DefaultPaymentAccessValidationService

public interface PaymentAccessValidationService
Validates access to the payment based on passed in context.
  • Method Details

    • validateCustomerPaymentRequest

      void validateCustomerPaymentRequest(Payment payment, CustomerRef customerRef, @Nullable String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Validates access to the payment based on the passed in context
      Parameters:
      payment - the Payment requiring access
      customerRef - the CustomerRef to validate against
      lockToken - the current lock token
      context - context information surrounding multitenant state
      Throws:
      PaymentManagementAccessException - if the request is blocked
    • validateCustomerPaymentRequest

      default void validateCustomerPaymentRequest(Payment payment, CustomerRef customerRef, UpdatePaymentRequest updatePaymentRequest, @Nullable String lockToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context)
      Validates access to the payment based on the passed in context. In the case of a Payment update request, the details of the UpdatePaymentRequest can be factored into determining if the customer's request should be allowed or blocked
      Parameters:
      payment - the Payment requiring access
      customerRef - the CustomerRef to validate against
      updatePaymentRequest - the request payload related to an update request (only present for update requests)
      lockToken - the current lock token
      context - context information surrounding multitenant state
      Throws:
      PaymentManagementAccessException - if the request is blocked