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.PaymentCustomerNotification
buildBaseNotification
(@NonNull com.stripe.model.PaymentMethod paymentMethod, String applicationId, String tenantId) com.broadleafcommerce.paymentgateway.domain.PaymentCustomerNotification
buildMandateConfirmationNotification
(@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.PaymentCustomerNotification
buildMandateConfirmationNotificationForSavedPaymentMethod
(@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.RequestOptions
buildRequestOptions
(String applicationId, String tenantId) protected StripeConfigurationProperties
protected Instant
getMandateAgreementDate
(com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) protected String
protected StripeRestConfigurationProperties
protected com.broadleafcommerce.common.extension.TypeFactory
protected boolean
isSavedPaymentMethodRequest
(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) protected com.stripe.model.PaymentIntent
retrievePaymentIntent
(@NonNull String paymentIntentId, String applicationId, String tenantId) protected com.stripe.model.SetupIntent
retrieveSetupIntent
(@NonNull com.broadleafcommerce.paymentgateway.domain.SavedPaymentMethodInfo savedPaymentMethodInfo, String applicationId, String tenantId) protected boolean
shouldSendCustomMandateEmail
(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:StripeCustomerNotificationService
Builds the mandate confirmation notification that should be sent to the customer after the PaymentIntent is confirmed.- Specified by:
buildMandateConfirmationNotification
in 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:StripeCustomerNotificationService
Builds the mandate confirmation notification that should be sent to the customer after the saved payment method is created.- Specified by:
buildMandateConfirmationNotificationForSavedPaymentMethod
in 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()
-