Class DefaultStripe3DSTransactionLookupService
java.lang.Object
com.broadleafcommerce.payment.service.gateway.DefaultStripe3DSTransactionLookupService
- All Implemented Interfaces:
Stripe3DSTransactionLookupService,com.broadleafcommerce.paymentgateway.service.PaymentGateway3DSTransactionLookupService,com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionLookupService,com.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
public class DefaultStripe3DSTransactionLookupService
extends Object
implements Stripe3DSTransactionLookupService
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultStripe3DSTransactionLookupService(StripeExternalCallService stripeService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, StripeConfigurationProperties configProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddRawResponse(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull Object response) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponsebuildPaymentResponse(com.stripe.model.PaymentIntent paymentIntent, String stripeMethodType, String tenantId, String applicationId) protected com.broadleafcommerce.paymentgateway.domain.PaymentRequestbuildPaymentRetrievalRequest(String paymentIntentId, String tenantId, String applicationId) protected com.broadleafcommerce.paymentgateway.domain.TransactionIdentifierbuildTransactionIdentifier(com.stripe.model.PaymentIntent paymentIntent) Builds aTransactionIdentifierbased on the givenPaymentIntent.protected javax.money.MonetaryAmountgetAmountInMajorUnits(@NonNull Long amount, @NonNull String currencyCode) protected StripeConfigurationPropertiesgetPaymentMethodPropertiesForFutureUse(@NonNull com.stripe.model.PaymentIntent paymentIntent) protected StringgetRequestId(@NonNull com.stripe.model.PaymentIntent paymentIntent) protected StringgetResponseCode(@NonNull com.stripe.model.PaymentIntent paymentIntent) protected StripeExternalCallServiceprotected StringgetTenantId(com.stripe.model.PaymentIntent paymentIntent) org.apache.commons.lang3.tuple.Pair<com.broadleafcommerce.paymentgateway.domain.TransactionIdentifier,com.broadleafcommerce.paymentgateway.domain.PaymentResponse> getTransactionDetails(@NonNull Map<String, String> requestParams, String tenantId, String applicationId) protected com.broadleafcommerce.paymentgateway.domain.enums.DefaultTransactionTypesgetTransactionType(@NonNull com.stripe.model.PaymentIntent paymentIntent) protected com.broadleafcommerce.common.extension.TypeFactoryprotected StringidentifyFailureType(com.stripe.model.StripeError stripePaymentError, String transactionReferenceId) com.broadleafcommerce.paymentgateway.domain.PaymentResponselookupTransactionDetails(@NonNull com.broadleafcommerce.paymentgateway.domain.TransactionLookupRequest transactionLookupRequest, String tenantId, String applicationId) voidvalidateRequestParams(@NonNull Map<String, String> requestParams) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionLookupService
validateRequestParams
-
Constructor Details
-
DefaultStripe3DSTransactionLookupService
public DefaultStripe3DSTransactionLookupService(StripeExternalCallService stripeService, com.broadleafcommerce.common.extension.TypeFactory typeFactory, StripeConfigurationProperties configProperties)
-
-
Method Details
-
validateRequestParams
- Specified by:
validateRequestParamsin interfacecom.broadleafcommerce.paymentgateway.service.PaymentGateway3DSTransactionLookupService- Specified by:
validateRequestParamsin interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionLookupService
-
getTransactionDetails
public org.apache.commons.lang3.tuple.Pair<com.broadleafcommerce.paymentgateway.domain.TransactionIdentifier,com.broadleafcommerce.paymentgateway.domain.PaymentResponse> getTransactionDetails(@NonNull @NonNull Map<String, String> requestParams, @Nullable String tenantId, @Nullable String applicationId) - Specified by:
getTransactionDetailsin interfacecom.broadleafcommerce.paymentgateway.service.PaymentGateway3DSTransactionLookupService- Specified by:
getTransactionDetailsin interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionLookupService
-
lookupTransactionDetails
public com.broadleafcommerce.paymentgateway.domain.PaymentResponse lookupTransactionDetails(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.TransactionLookupRequest transactionLookupRequest, @Nullable String tenantId, @Nullable String applicationId) - Specified by:
lookupTransactionDetailsin interfacecom.broadleafcommerce.paymentgateway.service.PaymentGateway3DSTransactionLookupService- Specified by:
lookupTransactionDetailsin interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionLookupService
-
buildPaymentRetrievalRequest
-
buildTransactionIdentifier
protected com.broadleafcommerce.paymentgateway.domain.TransactionIdentifier buildTransactionIdentifier(com.stripe.model.PaymentIntent paymentIntent) Builds aTransactionIdentifierbased on the givenPaymentIntent.- Parameters:
paymentIntent- thePaymentIntentto build theTransactionIdentifierfrom- Returns:
- a
TransactionIdentifierbased on the givenPaymentIntent
-
getTenantId
-
buildPaymentResponse
-
identifyFailureType
-
getTransactionType
protected com.broadleafcommerce.paymentgateway.domain.enums.DefaultTransactionTypes getTransactionType(@NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) -
getRequestId
@Nullable protected String getRequestId(@NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) -
getResponseCode
@Nullable protected String getResponseCode(@NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent) -
getAmountInMajorUnits
protected javax.money.MonetaryAmount getAmountInMajorUnits(@NonNull @NonNull Long amount, @NonNull @NonNull String currencyCode) - Parameters:
amount- the amount to convert toMonetaryAmountin major units fromcurrencyCode- the currency code of theMonetaryAmount- Returns:
- the
MonetaryAmountin major units from the givenamountandcurrencyCode - See Also:
-
Money.ofMinor(CurrencyUnit, long)
-
getPaymentMethodPropertiesForFutureUse
-
addRawResponse
protected void addRawResponse(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull Object response) -
getGatewayType
- Specified by:
getGatewayTypein interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
-
getStripeService
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getConfigProperties
-