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 Details

  • Method Details

    • validateRequestParams

      public void validateRequestParams(@NonNull @NonNull Map<String,String> requestParams)
      Specified by:
      validateRequestParams in interface com.broadleafcommerce.paymentgateway.service.PaymentGateway3DSTransactionLookupService
      Specified by:
      validateRequestParams in interface com.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 interface com.broadleafcommerce.paymentgateway.service.PaymentGateway3DSTransactionLookupService
      Specified by:
      getTransactionDetails in interface com.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 interface com.broadleafcommerce.paymentgateway.service.PaymentGateway3DSTransactionLookupService
      Specified by:
      lookupTransactionDetails in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionLookupService
    • buildPaymentRetrievalRequest

      protected com.broadleafcommerce.paymentgateway.domain.PaymentRequest buildPaymentRetrievalRequest(String paymentIntentId, @Nullable String tenantId, @Nullable String applicationId)
    • buildTransactionIdentifier

      protected com.broadleafcommerce.paymentgateway.domain.TransactionIdentifier buildTransactionIdentifier(com.stripe.model.PaymentIntent paymentIntent)
      Builds a TransactionIdentifier based on the given PaymentIntent.
      Parameters:
      paymentIntent - the PaymentIntent to build the TransactionIdentifier from
      Returns:
      a TransactionIdentifier based on the given PaymentIntent
    • getTenantId

      protected String getTenantId(com.stripe.model.PaymentIntent paymentIntent)
    • buildPaymentResponse

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse buildPaymentResponse(com.stripe.model.PaymentIntent paymentIntent, String stripeMethodType, @Nullable String tenantId, @Nullable String applicationId)
    • identifyFailureType

      protected String identifyFailureType(com.stripe.model.StripeError stripePaymentError, String transactionReferenceId)
    • 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)
      Gets the MonetaryAmount in major units from the given amount and currencyCode.
      Parameters:
      amount - the amount to convert to MonetaryAmount in major units from
      currencyCode - the currency code of the MonetaryAmount
      Returns:
      the MonetaryAmount in major units from the given amount and currencyCode
      See Also:
      • Money.ofMinor(CurrencyUnit, long)
    • getPaymentMethodPropertiesForFutureUse

      protected Map<String,String> getPaymentMethodPropertiesForFutureUse(@NonNull @NonNull com.stripe.model.PaymentIntent paymentIntent)
    • addRawResponse

      protected void addRawResponse(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull Object response)
    • getGatewayType

      public String getGatewayType()
      Specified by:
      getGatewayType in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
    • getStripeService

      protected StripeExternalCallService getStripeService()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
    • getConfigProperties

      protected StripeConfigurationProperties getConfigProperties()