Class DefaultStripeTransactionService
java.lang.Object
com.broadleafcommerce.payment.service.gateway.DefaultStripeTransactionService
- All Implemented Interfaces:
- StripeTransactionService,- com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService,- com.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
- 
Field SummaryFields
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddRawResponse(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull Object response) com.broadleafcommerce.paymentgateway.domain.PaymentResponseauthorize(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) com.broadleafcommerce.paymentgateway.domain.PaymentResponseauthorizeAndCapture(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) protected com.broadleafcommerce.paymentgateway.domain.NextActionbuildNextAction(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.stripe.model.PaymentIntent paymentIntent) protected StringbuildRedirectUrl(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.stripe.model.PaymentIntent paymentIntent, @NonNull String customMicroDepositVerificationURL) com.broadleafcommerce.paymentgateway.domain.PaymentResponsecapture(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) protected StringdetermineRecommendedSavedPaymentMethodStatus(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) Returns the recommended saved payment method status if it should be created.protected com.broadleafcommerce.paymentgateway.domain.PaymentResponsedoAuthAndOrCapture(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, boolean capture) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponsedoAuthAndOrCaptureForAch(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) protected voidfillResponse(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.PaymentIntent paymentIntent) Deprecated.protected voidfillResponse(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.PaymentIntent paymentIntent, String stripeMethodType) Populates thePaymentResponsebased on the providedPaymentIntentSee the following for all possible values of Stripe's Payment Intent statuses: https://stripe.com/docs/payments/payment-intents/statusprotected voidfillResponse(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.Charge charge) Deprecated.in favor offillResponse(PaymentResponse, Charge, String)protected voidfillResponse(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.Charge charge, String stripeMethodType) Populates thePaymentResponsebased on the providedChargeprotected voidfillResponse(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.Refund refund) Deprecated.in favor offillResponse(PaymentResponse, Refund, String)protected voidfillResponse(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.Refund refund, String stripeMethodType) protected StripeConfigurationPropertiesprotected StripeCustomerNotificationServiceprotected StringgetCustomMicroDepositVerificationURL(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.stripe.model.PaymentIntent paymentIntent) protected StringgetGatewayTransactionId(@NonNull com.stripe.model.StripeObject stripeObject) protected StringgetHostedVerificationUrl(@NonNull com.stripe.model.PaymentIntent paymentIntent) protected StringgetMicroDepositType(@NonNull com.stripe.model.PaymentIntent paymentIntent) protected PaymentIntentAccessTokenServicegetPaymentMethodPropertiesForFutureUse(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.stripe.model.PaymentIntent paymentIntent) protected com.broadleafcommerce.paymentgateway.util.PaymentResponseUtilprotected StringgetRequestId(@NonNull com.stripe.model.Charge charge) Deprecated, for removal: This API element is subject to removal in a future version.usegetGatewayTransactionId(com.stripe.model.StripeObject)instead of thisprotected StringgetResponseCode(@NonNull com.stripe.model.PaymentIntent paymentIntent) protected StripeExternalCallServiceprotected com.broadleafcommerce.common.extension.TypeFactoryprotected voidhandlePaymentIntentErrors(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull com.stripe.model.PaymentIntent paymentIntent) protected voidhandlePaymentIntentProcessingStatus(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull com.stripe.model.PaymentIntent paymentIntent, String stripeMethodType) protected voidhandlePaymentIntentRequiresAction(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull com.stripe.model.PaymentIntent paymentIntent) protected voidhandlePaymentIntentRequiresPaymentMethod(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull com.stripe.model.PaymentIntent paymentIntent) protected StringidentifyFailureType(com.stripe.model.StripeError stripePaymentError, String transactionReferenceId) protected booleanisACHPaymentRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) protected BooleanisFlaggedForManualReview(@NonNull com.stripe.model.PaymentIntent paymentIntent) Determines whether the payment transaction has been flagged for manual review.protected com.broadleafcommerce.paymentgateway.domain.PaymentResponsepopulateMicroDepositVerificationDetails(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull com.stripe.model.PaymentIntent paymentIntent, String stripeMethodType) com.broadleafcommerce.paymentgateway.domain.PaymentResponserefund(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) protected booleanrequiresMicroDepositVerification(@NonNull com.stripe.model.PaymentIntent paymentIntent) com.broadleafcommerce.paymentgateway.domain.PaymentResponsereverseAuthorize(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) voidsetConfigProperties(StripeConfigurationProperties configProperties) voidsetCustomerNotificationService(StripeCustomerNotificationService customerNotificationService) voidsetPaymentIntentAccessTokenService(PaymentIntentAccessTokenService paymentIntentAccessTokenService) voidsetPaymentResponseUtil(com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil paymentResponseUtil) voidsetTypeFactory(com.broadleafcommerce.common.extension.TypeFactory typeFactory) Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionServicedetachedCredit, identifyParentTransactionReferenceIfExists, identifyTransactionReferenceIdOverrideForInitialTransaction, identifyTransactionTypeFromTransactionResults
- 
Field Details- 
REDIRECT_URL_PAYMENT_INTENT_ID_PARAM- See Also:
 
- 
REDIRECT_URL_PAYMENT_INTENT_ACCESS_TOKEN_PARAM- See Also:
 
 
- 
- 
Constructor Details- 
DefaultStripeTransactionService
 
- 
- 
Method Details- 
authorizepublic com.broadleafcommerce.paymentgateway.domain.PaymentResponse authorize(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) - Specified by:
- authorizein interface- com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
 
- 
capturepublic com.broadleafcommerce.paymentgateway.domain.PaymentResponse capture(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) - Specified by:
- capturein interface- com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
 
- 
authorizeAndCapturepublic com.broadleafcommerce.paymentgateway.domain.PaymentResponse authorizeAndCapture(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) - Specified by:
- authorizeAndCapturein interface- com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
 
- 
isACHPaymentRequestprotected boolean isACHPaymentRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) 
- 
doAuthAndOrCaptureForAchprotected com.broadleafcommerce.paymentgateway.domain.PaymentResponse doAuthAndOrCaptureForAch(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) 
- 
doAuthAndOrCaptureprotected com.broadleafcommerce.paymentgateway.domain.PaymentResponse doAuthAndOrCapture(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, boolean capture) 
- 
reverseAuthorizepublic com.broadleafcommerce.paymentgateway.domain.PaymentResponse reverseAuthorize(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) - Specified by:
- reverseAuthorizein interface- com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
 
- 
refundpublic com.broadleafcommerce.paymentgateway.domain.PaymentResponse refund(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest) - Specified by:
- refundin interface- com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
 
- 
fillResponse@Deprecated protected void fillResponse(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.Charge charge) Deprecated.in favor offillResponse(PaymentResponse, Charge, String)
- 
fillResponseprotected void fillResponse(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.Charge charge, @Nullable String stripeMethodType) Populates thePaymentResponsebased on the providedCharge- Parameters:
- paymentResponse- the response object that should be populated & which will be returned from this service's public methods
- charge- the Stripe API's returned object that hold the results of the transaction
 
- 
fillResponse@Deprecated protected void fillResponse(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.Refund refund) Deprecated.in favor offillResponse(PaymentResponse, Refund, String)
- 
fillResponseprotected void fillResponse(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.Refund refund, @Nullable String stripeMethodType) 
- 
fillResponse@Deprecated protected void fillResponse(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.PaymentIntent paymentIntent) throws StripePaymentIntentRequiresActionException Deprecated.
- 
fillResponseprotected void fillResponse(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, com.stripe.model.PaymentIntent paymentIntent, @Nullable String stripeMethodType) throws StripePaymentIntentRequiresActionException Populates thePaymentResponsebased on the providedPaymentIntentSee the following for all possible values of Stripe's Payment Intent statuses: https://stripe.com/docs/payments/payment-intents/status- Parameters:
- paymentRequest- the request object whose data was sent to Stripe for this transaction
- paymentResponse- the response object that should be populated & which will be returned from this service's public methods
- paymentIntent- the Stripe API's returned object that hold the results of the transaction
- Throws:
- StripePaymentIntentRequiresActionException
 
- 
handlePaymentIntentProcessingStatusprotected void handlePaymentIntentProcessingStatus(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent, @Nullable String stripeMethodType) 
- 
isFlaggedForManualReview@Nullable protected Boolean isFlaggedForManualReview(@NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) Determines whether the payment transaction has been flagged for manual review.- See Also:
- 
- Review.getOpen()
 
 
- 
getPaymentMethodPropertiesForFutureUse
- 
addRawResponseprotected void addRawResponse(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull Object response) 
- 
handlePaymentIntentRequiresActionprotected void handlePaymentIntentRequiresAction(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) throws StripePaymentIntentRequiresActionException 
- 
handlePaymentIntentRequiresPaymentMethodprotected void handlePaymentIntentRequiresPaymentMethod(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) throws StripePaymentIntentRequiresPaymentMethodException 
- 
handlePaymentIntentErrorsprotected void handlePaymentIntentErrors(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) 
- 
identifyFailureType
- 
getGatewayTransactionId@Nullable protected String getGatewayTransactionId(@NonNull @NonNull com.stripe.model.StripeObject stripeObject) 
- 
getRequestId@Deprecated(forRemoval=true) @Nullable protected String getRequestId(@NonNull @NonNull com.stripe.model.Charge charge) Deprecated, for removal: This API element is subject to removal in a future version.usegetGatewayTransactionId(com.stripe.model.StripeObject)instead of this
- 
getResponseCode@Nullable protected String getResponseCode(@NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) 
- 
requiresMicroDepositVerificationprotected boolean requiresMicroDepositVerification(@NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) 
- 
populateMicroDepositVerificationDetailsprotected com.broadleafcommerce.paymentgateway.domain.PaymentResponse populateMicroDepositVerificationDetails(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent, @Nullable String stripeMethodType) 
- 
buildNextActionprotected com.broadleafcommerce.paymentgateway.domain.NextAction buildNextAction(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) 
- 
getCustomMicroDepositVerificationURL@Nullable protected String getCustomMicroDepositVerificationURL(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) 
- 
buildRedirectUrl
- 
getHostedVerificationUrl@Nullable protected String getHostedVerificationUrl(@NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) 
- 
getMicroDepositType@Nullable protected String getMicroDepositType(@NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) 
- 
determineRecommendedSavedPaymentMethodStatus@Nullable protected String determineRecommendedSavedPaymentMethodStatus(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse) Returns the recommended saved payment method status if it should be created.- Returns:
- DefaultSavedPaymentMethodStatuses.INVALID_PAYMENT_METHODif the transaction's failure type is- DefaultSavedPaymentMethodStatuses.INVALID_PAYMENT_METHOD.- DefaultSavedPaymentMethodStatuses.AWAITING_ASYNC_RESULTSif the transaction succeeds but awaiting an asynchronous result
 
- 
getGatewayType- Specified by:
- getGatewayTypein interface- com.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
 
- 
getStripeService
- 
getPaymentResponseUtilprotected com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil getPaymentResponseUtil()
- 
setPaymentResponseUtil@Autowired public void setPaymentResponseUtil(com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil paymentResponseUtil) 
- 
getConfigProperties
- 
setConfigProperties
- 
getTypeFactoryprotected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
- 
setTypeFactory@Autowired public void setTypeFactory(com.broadleafcommerce.common.extension.TypeFactory typeFactory) 
- 
getPaymentIntentAccessTokenService
- 
setPaymentIntentAccessTokenService@Autowired public void setPaymentIntentAccessTokenService(PaymentIntentAccessTokenService paymentIntentAccessTokenService) 
- 
getCustomerNotificationService
- 
setCustomerNotificationService@Autowired public void setCustomerNotificationService(StripeCustomerNotificationService customerNotificationService) 
 
- 
fillResponse(PaymentRequest, PaymentResponse, PaymentIntent, String)