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.FinancialConnections
buildFinancialConnections
(@NonNull PaymentIntentRequest paymentIntentRequest) protected com.stripe.param.PaymentIntentCreateParams.PaymentMethodOptions
buildPaymentMethodOptions
(@NonNull PaymentIntentRequest paymentIntentRequest) protected com.stripe.net.RequestOptions
buildRequestOptions
(@NonNull PaymentIntentRequest request) protected com.stripe.net.RequestOptions
buildRequestOptions
(String applicationId, String tenantId) protected com.stripe.param.PaymentIntentCreateParams.PaymentMethodOptions.UsBankAccount
buildUsBankAccountOptions
(@NonNull PaymentIntentRequest paymentIntentRequest) protected com.stripe.model.Customer
createCustomer
(@NonNull PaymentIntentRequest request) createPaymentIntent
(@NonNull PaymentIntentRequest paymentIntentRequest) Creates aPaymentIntent
for the provided request.protected Long
getAmountInMinorUnits
(@NonNull javax.money.MonetaryAmount amount) protected com.broadleafcommerce.resource.security.utils.service.AuthenticationUtils
protected String
getCurrency
(@NonNull javax.money.MonetaryAmount amount) protected String
getCustomerId
(com.stripe.model.Customer customer) protected PaymentIntentAccessTokenService
getPaymentIntentInfo
(@NonNull String paymentIntentId, String paymentIntentAccessToken, com.broadleafcommerce.data.tracking.core.context.ContextInfo contextInfo) Gets aPaymentIntent
info for the specified id.protected StripeRestConfigurationProperties
protected StripeExternalCallService
protected com.stripe.param.PaymentIntentCreateParams.SetupFutureUsage
getUsage
(@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.PaymentIntentCreateParams
populatePaymentIntentCreateParams
(@NonNull PaymentIntentRequest paymentIntentRequest, com.stripe.model.Customer customer) protected PaymentIntentResponse
populatePaymentIntentResponse
(@NonNull com.stripe.model.PaymentIntent paymentIntent) void
setPaymentIntentAccessTokenService
(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:StripePaymentIntentService
Creates aPaymentIntent
for the provided request.- Specified by:
createPaymentIntent
in 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:StripePaymentIntentService
Gets aPaymentIntent
info for the specified id.- Specified by:
getPaymentIntentInfo
in 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)
-