Class DefaultStripeSetupIntentService
java.lang.Object
com.broadleafcommerce.vendor.stripe.service.setupintent.DefaultStripeSetupIntentService
- All Implemented Interfaces:
StripeSetupIntentService
The default implementation for
StripeSetupIntentService.- Author:
- Dima Myroniuk (dmyroniuk)
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultStripeSetupIntentService(StripeExternalCallService stripeService, StripeRestConfigurationProperties restConfigurationProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.stripe.param.SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnectionsbuildFinancialConnections(@NonNull SetupIntentRequest request) buildMetadata(@NonNull SetupIntentRequest request) protected com.stripe.net.RequestOptionsbuildRequestOptions(@NonNull SetupIntentRequest request) protected com.stripe.net.RequestOptionsbuildRequestOptions(String applicationId, String tenantId) protected com.stripe.param.SetupIntentCreateParams.PaymentMethodOptions.UsBankAccountbuildUsBankAccountOptions(@NonNull SetupIntentRequest request) protected com.stripe.model.CustomercreateCustomer(@NonNull SetupIntentRequest request) createSetupIntent(@NonNull SetupIntentRequest request) Creates a SetupIntent object for the provided request.protected StripeRestConfigurationPropertiesprotected com.stripe.param.SetupIntentCreateParamsgetSetupIntentCreateParams(@NonNull SetupIntentRequest request) getSetupIntentInfo(@NonNull ReadSetupIntentRequest request) Gets aSetupIntentinfo for the specified id.protected StripeExternalCallServiceprotected com.stripe.param.SetupIntentCreateParams.UsagegetUsage(@NonNull SetupIntentRequest request) protected voidpopulateAdditionalParameters(com.stripe.param.SetupIntentCreateParams.Builder paramsBuilder, @NonNull SetupIntentRequest request) protected com.broadleafcommerce.paymentgateway.domain.GatewayCustomer<com.broadleafcommerce.paymentgateway.domain.PaymentRequest>populateCustomer(@NonNull com.broadleafcommerce.paymentgateway.domain.GatewayCustomer<com.broadleafcommerce.paymentgateway.domain.PaymentRequest> customer, @NonNull SetupIntentRequest request) protected com.broadleafcommerce.paymentgateway.domain.GatewayCustomer<com.broadleafcommerce.paymentgateway.domain.PaymentRequest>populateCustomerName(@NonNull com.broadleafcommerce.paymentgateway.domain.GatewayCustomer<com.broadleafcommerce.paymentgateway.domain.PaymentRequest> customer, @NonNull SetupIntentRequest request) protected SetupIntentResponsepopulateSetupIntentResponse(@NonNull com.stripe.model.SetupIntent setupIntent) protected voidvalidateSetupIntentRequest(@NonNull SetupIntentRequest request)
-
Field Details
-
US_BANK_ACCOUNT
- See Also:
-
-
Constructor Details
-
DefaultStripeSetupIntentService
public DefaultStripeSetupIntentService(StripeExternalCallService stripeService, StripeRestConfigurationProperties restConfigurationProperties)
-
-
Method Details
-
createSetupIntent
Description copied from interface:StripeSetupIntentServiceCreates a SetupIntent object for the provided request. It can be used to attach a payment method and confirm to collect any required permissions to charge the payment method later.If the
SetupIntentRequest.getStripeCustomerId()is not provided the newCustomerwill be created.This method supports creating the SetupIntent for the "us_bank_account" payment method type (ACH). To specify this type add
PAYMENT_METHOD_TYPEto theSetupIntentRequest.additionalFieldswith "us_bank_account" value.- Specified by:
createSetupIntentin interfaceStripeSetupIntentService- Parameters:
request- the request to create theSetupIntent- Returns:
- the response that contains the
SetupIntent.getClientSecret()and theCustomerID for which this intent was created
-
getSetupIntentInfo
Description copied from interface:StripeSetupIntentServiceGets aSetupIntentinfo for the specified id.- Specified by:
getSetupIntentInfoin interfaceStripeSetupIntentService- Parameters:
request- the request to read the SetupIntent- Returns:
- the SetupIntent info for the specified id
-
validateSetupIntentRequest
-
getSetupIntentCreateParams
protected com.stripe.param.SetupIntentCreateParams getSetupIntentCreateParams(@NonNull @NonNull SetupIntentRequest request) throws com.stripe.exception.StripeException - Throws:
com.stripe.exception.StripeException
-
buildMetadata
-
populateAdditionalParameters
protected void populateAdditionalParameters(@NonNull com.stripe.param.SetupIntentCreateParams.Builder paramsBuilder, @NonNull @NonNull SetupIntentRequest request) -
buildUsBankAccountOptions
protected com.stripe.param.SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount buildUsBankAccountOptions(@NonNull @NonNull SetupIntentRequest request) -
buildFinancialConnections
protected com.stripe.param.SetupIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnections buildFinancialConnections(@NonNull @NonNull SetupIntentRequest request) -
createCustomer
-
getUsage
protected com.stripe.param.SetupIntentCreateParams.Usage getUsage(@NonNull @NonNull SetupIntentRequest 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 SetupIntentRequest 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 SetupIntentRequest request) -
buildRequestOptions
protected com.stripe.net.RequestOptions buildRequestOptions(@NonNull @NonNull SetupIntentRequest request) -
buildRequestOptions
-
populateSetupIntentResponse
protected SetupIntentResponse populateSetupIntentResponse(@NonNull @NonNull com.stripe.model.SetupIntent setupIntent) -
getStripeService
-
getRestConfigurationProperties
-