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 Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptionprotected StringcomputeHmacSha256(@NonNull String accessTokenSecret, @NonNull String paymentIntentId) generateAccessToken(@NonNull String paymentIntentId, String applicationId, String tenantId) Generates the access token based on the PaymentIntent's idprotected StripeConfigurationPropertiesvoidvalidatePaymentIntentAccess(@NonNull String paymentIntentId, @NonNull String accessToken, String applicationId, String tenantId) Validates that the PaymentIntent can be read
-
Constructor Details
-
DefaultPaymentIntentAccessTokenService
-
-
Method Details
-
validatePaymentIntentAccess
public void validatePaymentIntentAccess(@NonNull @NonNull String paymentIntentId, @NonNull @NonNull String accessToken, @Nullable String applicationId, @Nullable String tenantId) Description copied from interface:PaymentIntentAccessTokenServiceValidates that the PaymentIntent can be read- Specified by:
validatePaymentIntentAccessin interfacePaymentIntentAccessTokenService- Parameters:
paymentIntentId- the PaymentIntent IDaccessToken- the access tokenapplicationId- the id for the current applicationtenantId- the id for the current tenant
-
generateAccessToken
public String generateAccessToken(@NonNull @NonNull String paymentIntentId, @Nullable String applicationId, @Nullable String tenantId) Description copied from interface:PaymentIntentAccessTokenServiceGenerates the access token based on the PaymentIntent's id- Specified by:
generateAccessTokenin interfacePaymentIntentAccessTokenService- Parameters:
paymentIntentId- the PaymentIntent IDapplicationId- the id for the current applicationtenantId- the id for the current tenant- Returns:
- the access token
-
computeHmacSha256
-
getProperties
-