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 TypeMethodDescriptionvoidvalidateOwnershipMatchWithPayment(@NonNull OwnershipSummary savedPaymentOwnership, @NonNull Payment payment) Validates the ownership of the saved payment method matches the ownership of the givenPayment.voidvalidateSavedPaymentMethodOwnership(@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
CustomerRefhas the correct ownership.- Parameters:
savedPaymentId- the id of the saved payment method requiring accesscustomerRef- theCustomerRefto 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
Paymentmatches with the owning user of the saved payment method.- Parameters:
savedPaymentOwnership- theOwnershipSummaryof the saved payment methodpayment- thePaymentto validate the ownership against
-