Class DefaultStripePaymentIntentService
java.lang.Object
com.broadleafcommerce.vendor.stripe.service.paymentintent.DefaultStripePaymentIntentService
- All Implemented Interfaces:
StripePaymentIntentService
- Author:
- Divyank Chavan.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDefaultStripePaymentIntentService(StripeExternalCallService stripeService, StripeRestConfigurationProperties restConfigurationProperties, com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.stripe.param.PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount.FinancialConnectionsbuildFinancialConnections(@NonNull PaymentIntentRequest paymentIntentRequest) protected com.stripe.param.PaymentIntentCreateParams.PaymentMethodOptionsbuildPaymentMethodOptions(@NonNull PaymentIntentRequest paymentIntentRequest) protected com.stripe.net.RequestOptionsbuildRequestOptions(@NonNull PaymentIntentRequest request) protected com.stripe.net.RequestOptionsbuildRequestOptions(String applicationId, String tenantId) protected com.stripe.param.PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccountbuildUsBankAccountOptions(@NonNull PaymentIntentRequest paymentIntentRequest) protected com.stripe.model.CustomercreateCustomer(@NonNull PaymentIntentRequest request) createPaymentIntent(@NonNull PaymentIntentRequest paymentIntentRequest) Creates aPaymentIntentfor the provided request.protected LonggetAmountInMinorUnits(@NonNull javax.money.MonetaryAmount amount) protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtilsprotected StringgetCurrency(@NonNull javax.money.MonetaryAmount amount) protected StringgetCustomerId(com.stripe.model.Customer customer) protected PaymentIntentAccessTokenServicegetPaymentIntentInfo(@NonNull String paymentIntentId, String paymentIntentAccessToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets aPaymentIntentinfo for the specified id.protected StripeRestConfigurationPropertiesprotected StripeExternalCallServiceprotected com.stripe.param.PaymentIntentCreateParams.SetupFutureUsagegetUsage(@NonNull PaymentIntentRequest 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 PaymentIntentRequest 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 PaymentIntentRequest request) protected com.stripe.param.PaymentIntentCreateParamspopulatePaymentIntentCreateParams(@NonNull PaymentIntentRequest paymentIntentRequest, com.stripe.model.Customer customer) protected PaymentIntentResponsepopulatePaymentIntentResponse(@NonNull com.stripe.model.PaymentIntent paymentIntent) voidsetPaymentIntentAccessTokenService(PaymentIntentAccessTokenService paymentIntentAccessTokenService)
-
Field Details
-
US_BANK_ACCOUNT
- See Also:
-
-
Constructor Details
-
DefaultStripePaymentIntentService
public DefaultStripePaymentIntentService(StripeExternalCallService stripeService, StripeRestConfigurationProperties restConfigurationProperties, com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils authenticationUtils)
-
-
Method Details
-
createPaymentIntent
public PaymentIntentResponse createPaymentIntent(@NonNull @NonNull PaymentIntentRequest paymentIntentRequest) Description copied from interface:StripePaymentIntentServiceCreates aPaymentIntentfor the provided request.- Specified by:
createPaymentIntentin interfaceStripePaymentIntentService- Parameters:
paymentIntentRequest- Request used to create aPaymentIntent- 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:StripePaymentIntentServiceGets aPaymentIntentinfo for the specified id.- Specified by:
getPaymentIntentInfoin interfaceStripePaymentIntentService- Parameters:
paymentIntentId- the payment intent idpaymentIntentAccessToken- the payment intent access tokencontextInfo- Request context information around sandbox and multitenant state- Returns:
- the payment intent info for the specified id
-
createCustomer
-
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
-
populatePaymentIntentCreateParams
protected com.stripe.param.PaymentIntentCreateParams populatePaymentIntentCreateParams(@NonNull @NonNull PaymentIntentRequest paymentIntentRequest, @Nullable com.stripe.model.Customer customer) -
getAmountInMinorUnits
-
getCurrency
-
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
-
getUsage
protected com.stripe.param.PaymentIntentCreateParams.SetupFutureUsage getUsage(@NonNull @NonNull PaymentIntentRequest request) -
populatePaymentIntentResponse
protected PaymentIntentResponse populatePaymentIntentResponse(@NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) -
getStripeService
-
getRestConfigurationProperties
-
getAuthenticationUtils
protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils getAuthenticationUtils() -
getPaymentIntentAccessTokenService
-
setPaymentIntentAccessTokenService
@Autowired public void setPaymentIntentAccessTokenService(PaymentIntentAccessTokenService paymentIntentAccessTokenService)
-