Interface SavedPaymentMethodAccessValidationService
- All Known Implementing Classes:
DefaultSavedPaymentMethodAccessValidationService
public interface SavedPaymentMethodAccessValidationService
Validates access to the saved payment method based on passed in context.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
validateOwnershipMatchWithPayment
(@NonNull OwnershipSummary savedPaymentOwnership, @NonNull Payment payment) Validates the ownership of the saved payment method matches the ownership of the givenPayment
.void
validateSavedPaymentMethodOwnership
(@NonNull String savedPaymentId, @NonNull CustomerRef customerRef, com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Validates access to the saved payment method based on the passed in context.
-
Method Details
-
validateSavedPaymentMethodOwnership
void validateSavedPaymentMethodOwnership(@NonNull @NonNull String savedPaymentId, @NonNull @NonNull CustomerRef customerRef, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo context) Validates access to the saved payment method based on the passed in context.This ensures that the given saved payment method being accessed by the given
CustomerRef
has the correct ownership.- Parameters:
savedPaymentId
- the id of the saved payment method requiring accesscustomerRef
- theCustomerRef
to validate againstcontext
- context information surrounding multitenant state- Throws:
SavedPaymentMethodManagementAccessException
- if the authenticated user does not have the ownership to manage the saved payment methodUnsupportedOperationException
- if the owning user type of saved payment method is not supported- See Also:
-
validateOwnershipMatchWithPayment
void validateOwnershipMatchWithPayment(@NonNull @NonNull OwnershipSummary savedPaymentOwnership, @NonNull @NonNull Payment payment) Validates the ownership of the saved payment method matches the ownership of the givenPayment
.This ensures the owning user of the
Payment
matches with the owning user of the saved payment method.- Parameters:
savedPaymentOwnership
- theOwnershipSummary
of the saved payment methodpayment
- thePayment
to validate the ownership against
-