Class DefaultPaymentIntentAccessTokenService

java.lang.Object
com.broadleafcommerce.vendor.stripe.service.paymentintent.DefaultPaymentIntentAccessTokenService
All Implemented Interfaces:
PaymentIntentAccessTokenService

public class DefaultPaymentIntentAccessTokenService extends Object implements PaymentIntentAccessTokenService
The default implementation for PaymentIntentAccessTokenService.
Author:
Dima Myroniuk (dmyroniuk)
  • Constructor Details

  • Method Details

    • validatePaymentIntentAccess

      public void validatePaymentIntentAccess(@NonNull @NonNull String paymentIntentId, @NonNull @NonNull String accessToken, @Nullable String applicationId, @Nullable String tenantId)
      Description copied from interface: PaymentIntentAccessTokenService
      Validates that the PaymentIntent can be read
      Specified by:
      validatePaymentIntentAccess in interface PaymentIntentAccessTokenService
      Parameters:
      paymentIntentId - the PaymentIntent ID
      accessToken - the access token
      applicationId - the id for the current application
      tenantId - the id for the current tenant
    • generateAccessToken

      public String generateAccessToken(@NonNull @NonNull String paymentIntentId, @Nullable String applicationId, @Nullable String tenantId)
      Description copied from interface: PaymentIntentAccessTokenService
      Generates the access token based on the PaymentIntent's id
      Specified by:
      generateAccessToken in interface PaymentIntentAccessTokenService
      Parameters:
      paymentIntentId - the PaymentIntent ID
      applicationId - the id for the current application
      tenantId - the id for the current tenant
      Returns:
      the access token
    • computeHmacSha256

      protected String computeHmacSha256(@NonNull @NonNull String accessTokenSecret, @NonNull @NonNull String paymentIntentId)
    • getProperties

      protected StripeConfigurationProperties getProperties()