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 void
addRawResponse
(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull Object response) protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse
buildPaymentResponse
(com.stripe.model.PaymentIntent paymentIntent, String stripeMethodType, String tenantId, String applicationId) protected com.broadleafcommerce.paymentgateway.domain.PaymentRequest
buildPaymentRetrievalRequest
(String paymentIntentId, String tenantId, String applicationId) protected com.broadleafcommerce.paymentgateway.domain.TransactionIdentifier
buildTransactionIdentifier
(com.stripe.model.PaymentIntent paymentIntent) Builds aTransactionIdentifier
based on the givenPaymentIntent
.protected javax.money.MonetaryAmount
getAmountInMajorUnits
(@NonNull Long amount, @NonNull String currencyCode) protected StripeConfigurationProperties
getPaymentMethodPropertiesForFutureUse
(@NonNull com.stripe.model.PaymentIntent paymentIntent) protected String
getRequestId
(@NonNull com.stripe.model.PaymentIntent paymentIntent) protected String
getResponseCode
(@NonNull com.stripe.model.PaymentIntent paymentIntent) protected StripeExternalCallService
protected String
getTenantId
(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.DefaultTransactionTypes
getTransactionType
(@NonNull com.stripe.model.PaymentIntent paymentIntent) protected com.broadleafcommerce.common.extension.TypeFactory
protected String
identifyFailureType
(com.stripe.model.StripeError stripePaymentError, String transactionReferenceId) com.broadleafcommerce.paymentgateway.domain.PaymentResponse
lookupTransactionDetails
(@NonNull com.broadleafcommerce.paymentgateway.domain.TransactionLookupRequest transactionLookupRequest, String tenantId, String applicationId) void
validateRequestParams
(@NonNull Map<String, String> requestParams) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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:
validateRequestParams
in interfacecom.broadleafcommerce.paymentgateway.service.PaymentGateway3DSTransactionLookupService
- Specified by:
validateRequestParams
in 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:
getTransactionDetails
in interfacecom.broadleafcommerce.paymentgateway.service.PaymentGateway3DSTransactionLookupService
- Specified by:
getTransactionDetails
in 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:
lookupTransactionDetails
in interfacecom.broadleafcommerce.paymentgateway.service.PaymentGateway3DSTransactionLookupService
- Specified by:
lookupTransactionDetails
in interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionLookupService
-
buildPaymentRetrievalRequest
-
buildTransactionIdentifier
protected com.broadleafcommerce.paymentgateway.domain.TransactionIdentifier buildTransactionIdentifier(com.stripe.model.PaymentIntent paymentIntent) Builds aTransactionIdentifier
based on the givenPaymentIntent
.- Parameters:
paymentIntent
- thePaymentIntent
to build theTransactionIdentifier
from- Returns:
- a
TransactionIdentifier
based 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 toMonetaryAmount
in major units fromcurrencyCode
- the currency code of theMonetaryAmount
- Returns:
- the
MonetaryAmount
in major units from the givenamount
andcurrencyCode
- 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:
getGatewayType
in interfacecom.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
-
getStripeService
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getConfigProperties
-