Interface PaymentAccessValidationService
- All Known Implementing Classes:
DefaultPaymentAccessValidationService
public interface PaymentAccessValidationService
Validates access to the payment based on passed in context.
-
Method Summary
Modifier and TypeMethodDescriptiondefault void
validateCustomerPaymentRequest
(Payment payment, CustomerRef customerRef, UpdatePaymentRequest updatePaymentRequest, String lockToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Validates access to the payment based on the passed in context.void
validateCustomerPaymentRequest
(Payment payment, CustomerRef customerRef, String lockToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Validates access to the payment based on the 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
- thePayment
requiring accesscustomerRef
- theCustomerRef
to validate againstlockToken
- the current lock tokencontext
- 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 aPayment
update request, the details of theUpdatePaymentRequest
can be factored into determining if the customer's request should be allowed or blocked- Parameters:
payment
- thePayment
requiring accesscustomerRef
- theCustomerRef
to validate againstupdatePaymentRequest
- the request payload related to an update request (only present for update requests)lockToken
- the current lock tokencontext
- context information surrounding multitenant state- Throws:
PaymentManagementAccessException
- if the request is blocked
-