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 Details

  • 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: StripeCustomerNotificationService
      Builds the mandate confirmation notification that should be sent to the customer after the PaymentIntent is confirmed.
      Specified by:
      buildMandateConfirmationNotification in interface StripeCustomerNotificationService
      Parameters:
      paymentRequest - the payment request
      paymentResponse - the payment response
      paymentIntentId - 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: StripeCustomerNotificationService
      Builds the mandate confirmation notification that should be sent to the customer after the saved payment method is created.
      Specified by:
      buildMandateConfirmationNotificationForSavedPaymentMethod in interface StripeCustomerNotificationService
      Parameters:
      savedPaymentMethodInfo - the saved payment method info
      applicationId - the application id
      tenantId - 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

      protected com.broadleafcommerce.paymentgateway.domain.PaymentCustomerNotification buildBaseNotification(@NonNull @NonNull com.stripe.model.PaymentMethod paymentMethod, @Nullable String applicationId, @Nullable String tenantId)
    • shouldSendCustomMandateEmail

      protected boolean shouldSendCustomMandateEmail(@Nullable String applicationId, @Nullable String tenantId)
    • retrievePaymentIntent

      @Nullable protected com.stripe.model.PaymentIntent retrievePaymentIntent(@NonNull @NonNull String paymentIntentId, @Nullable String applicationId, @Nullable String tenantId)
    • retrieveSetupIntent

      @Nullable protected com.stripe.model.SetupIntent retrieveSetupIntent(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.SavedPaymentMethodInfo savedPaymentMethodInfo, @Nullable String applicationId, @Nullable String tenantId)
    • buildRequestOptions

      protected com.stripe.net.RequestOptions buildRequestOptions(@Nullable String applicationId, @Nullable String tenantId)
    • getMandateAgreementDate

      protected Instant getMandateAgreementDate(com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • getNotificationType

      protected String getNotificationType()
    • getConfigurationProperties

      protected StripeConfigurationProperties getConfigurationProperties()
    • getRestConfigurationProperties

      protected StripeRestConfigurationProperties getRestConfigurationProperties()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()