Class DefaultStripePaymentIntentService

java.lang.Object
com.broadleafcommerce.vendor.stripe.service.paymentintent.DefaultStripePaymentIntentService
All Implemented Interfaces:
StripePaymentIntentService

public class DefaultStripePaymentIntentService extends Object implements StripePaymentIntentService
Author:
Divyank Chavan.
  • Field Details

  • Constructor Details

  • Method Details

    • createPaymentIntent

      public PaymentIntentResponse createPaymentIntent(@NonNull @NonNull PaymentIntentRequest paymentIntentRequest)
      Description copied from interface: StripePaymentIntentService
      Creates a PaymentIntent for the provided request.
      Specified by:
      createPaymentIntent in interface StripePaymentIntentService
      Parameters:
      paymentIntentRequest - Request used to create a PaymentIntent
      Returns:
      PaymentIntentResponse Information about the created PaymentIntent
    • getPaymentIntentInfo

      public PaymentIntentResponse getPaymentIntentInfo(@NonNull @NonNull String paymentIntentId, String paymentIntentAccessToken, @Nullable com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo)
      Description copied from interface: StripePaymentIntentService
      Gets a PaymentIntent info for the specified id.
      Specified by:
      getPaymentIntentInfo in interface StripePaymentIntentService
      Parameters:
      paymentIntentId - the payment intent id
      paymentIntentAccessToken - the payment intent access token
      contextInfo - Request context information around sandbox and multitenant state
      Returns:
      the payment intent info for the specified id
    • createCustomer

      protected com.stripe.model.Customer createCustomer(@NonNull @NonNull PaymentIntentRequest request)
    • populateCustomer

      protected com.broadleafcommerce.paymentgateway.domain.GatewayCustomer<com.broadleafcommerce.paymentgateway.domain.PaymentRequest> populateCustomer(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.GatewayCustomer<com.broadleafcommerce.paymentgateway.domain.PaymentRequest> customer, @NonNull @NonNull PaymentIntentRequest request)
    • populateCustomerName

      protected com.broadleafcommerce.paymentgateway.domain.GatewayCustomer<com.broadleafcommerce.paymentgateway.domain.PaymentRequest> populateCustomerName(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.GatewayCustomer<com.broadleafcommerce.paymentgateway.domain.PaymentRequest> customer, @NonNull @NonNull PaymentIntentRequest request)
    • buildRequestOptions

      protected com.stripe.net.RequestOptions buildRequestOptions(@NonNull @NonNull PaymentIntentRequest request)
    • buildRequestOptions

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

      protected com.stripe.param.PaymentIntentCreateParams populatePaymentIntentCreateParams(@NonNull @NonNull PaymentIntentRequest paymentIntentRequest, @Nullable com.stripe.model.Customer customer)
    • getAmountInMinorUnits

      protected Long getAmountInMinorUnits(@NonNull @NonNull javax.money.MonetaryAmount amount)
    • getCurrency

      protected String getCurrency(@NonNull @NonNull javax.money.MonetaryAmount amount)
    • buildPaymentMethodOptions

      protected com.stripe.param.PaymentIntentCreateParams.PaymentMethodOptions buildPaymentMethodOptions(@NonNull @NonNull PaymentIntentRequest paymentIntentRequest)
    • buildUsBankAccountOptions

      protected com.stripe.param.PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount buildUsBankAccountOptions(@NonNull @NonNull PaymentIntentRequest paymentIntentRequest)
    • buildFinancialConnections

      protected com.stripe.param.PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections buildFinancialConnections(@NonNull @NonNull PaymentIntentRequest paymentIntentRequest)
    • getCustomerId

      @Nullable protected String getCustomerId(@Nullable com.stripe.model.Customer customer)
    • getUsage

      protected com.stripe.param.PaymentIntentCreateParams.SetupFutureUsage getUsage(@NonNull @NonNull PaymentIntentRequest request)
    • populatePaymentIntentResponse

      protected PaymentIntentResponse populatePaymentIntentResponse(@NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent)
    • getStripeService

      protected StripeExternalCallService getStripeService()
    • getRestConfigurationProperties

      protected StripeRestConfigurationProperties getRestConfigurationProperties()
    • getAuthenticationUtils

      protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils()
    • getPaymentIntentAccessTokenService

      protected PaymentIntentAccessTokenService getPaymentIntentAccessTokenService()
    • setPaymentIntentAccessTokenService

      @Autowired public void setPaymentIntentAccessTokenService(PaymentIntentAccessTokenService paymentIntentAccessTokenService)