Class DefaultStripeCustomerNotificationService
java.lang.Object
com.broadleafcommerce.vendor.stripe.service.customer.notification.DefaultStripeCustomerNotificationService
- All Implemented Interfaces:
StripeCustomerNotificationService
public class DefaultStripeCustomerNotificationService
extends Object
implements StripeCustomerNotificationService
- Author:
- Dima Myroniuk (dmyroniuk)
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultStripeCustomerNotificationService(StripeConfigurationProperties configurationProperties, StripeRestConfigurationProperties restConfigurationProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionbuildBaseData(@NonNull com.stripe.model.PaymentMethod paymentMethod, String applicationId, String tenantId) protected com.broadleafcommerce.paymentgateway.domain.PaymentCustomerNotificationbuildBaseNotification(@NonNull com.stripe.model.PaymentMethod paymentMethod, String applicationId, String tenantId) com.broadleafcommerce.paymentgateway.domain.PaymentCustomerNotificationbuildMandateConfirmationNotification(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull String paymentIntentId) Builds the mandate confirmation notification that should be sent to the customer after the PaymentIntent is confirmed.com.broadleafcommerce.paymentgateway.domain.PaymentCustomerNotificationbuildMandateConfirmationNotificationForSavedPaymentMethod(@NonNull com.broadleafcommerce.paymentgateway.domain.SavedPaymentMethodInfo savedPaymentMethodInfo, String applicationId, String tenantId) Builds the mandate confirmation notification that should be sent to the customer after the saved payment method is created.protected com.stripe.net.RequestOptionsbuildRequestOptions(String applicationId, String tenantId) protected StripeConfigurationPropertiesprotected InstantgetMandateAgreementDate(com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) protected Stringprotected StripeRestConfigurationPropertiesprotected com.broadleafcommerce.common.extension.TypeFactoryprotected booleanisSavedPaymentMethodRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) protected com.stripe.model.PaymentIntentretrievePaymentIntent(@NonNull String paymentIntentId, String applicationId, String tenantId) protected com.stripe.model.SetupIntentretrieveSetupIntent(@NonNull com.broadleafcommerce.paymentgateway.domain.SavedPaymentMethodInfo savedPaymentMethodInfo, String applicationId, String tenantId) protected booleanshouldSendCustomMandateEmail(String applicationId, String tenantId)
-
Constructor Details
-
DefaultStripeCustomerNotificationService
public DefaultStripeCustomerNotificationService(StripeConfigurationProperties configurationProperties, StripeRestConfigurationProperties restConfigurationProperties, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
buildMandateConfirmationNotification
public com.broadleafcommerce.paymentgateway.domain.PaymentCustomerNotification buildMandateConfirmationNotification(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull String paymentIntentId) Description copied from interface:StripeCustomerNotificationServiceBuilds the mandate confirmation notification that should be sent to the customer after the PaymentIntent is confirmed.- Specified by:
buildMandateConfirmationNotificationin interfaceStripeCustomerNotificationService- Parameters:
paymentRequest- the payment requestpaymentResponse- the payment responsepaymentIntentId- the payment intent ID- Returns:
- the notification that should be sent to the customer, or null if it is not needed to send anything
-
buildMandateConfirmationNotificationForSavedPaymentMethod
public com.broadleafcommerce.paymentgateway.domain.PaymentCustomerNotification buildMandateConfirmationNotificationForSavedPaymentMethod(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.SavedPaymentMethodInfo savedPaymentMethodInfo, @Nullable String applicationId, @Nullable String tenantId) Description copied from interface:StripeCustomerNotificationServiceBuilds the mandate confirmation notification that should be sent to the customer after the saved payment method is created.- Specified by:
buildMandateConfirmationNotificationForSavedPaymentMethodin interfaceStripeCustomerNotificationService- Parameters:
savedPaymentMethodInfo- the saved payment method infoapplicationId- the application idtenantId- the tenant id- Returns:
- the notification that should be sent to the customer, or null if it is not needed to send anything
-
isSavedPaymentMethodRequest
protected boolean isSavedPaymentMethodRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) -
buildBaseData
protected StripeMandateConfirmationNotificationData buildBaseData(@NonNull @NonNull com.stripe.model.PaymentMethod paymentMethod, @Nullable String applicationId, @Nullable String tenantId) -
buildBaseNotification
-
shouldSendCustomMandateEmail
-
retrievePaymentIntent
-
retrieveSetupIntent
-
buildRequestOptions
-
getMandateAgreementDate
protected Instant getMandateAgreementDate(com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) -
getNotificationType
-
getConfigurationProperties
-
getRestConfigurationProperties
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-