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 String
computeHmacSha256
(@NonNull String accessTokenSecret, @NonNull String paymentIntentId) generateAccessToken
(@NonNull String paymentIntentId, String applicationId, String tenantId) Generates the access token based on the PaymentIntent's idprotected StripeConfigurationProperties
void
validatePaymentIntentAccess
(@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:PaymentIntentAccessTokenService
Validates that the PaymentIntent can be read- Specified by:
validatePaymentIntentAccess
in 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:PaymentIntentAccessTokenService
Generates the access token based on the PaymentIntent's id- Specified by:
generateAccessToken
in interfacePaymentIntentAccessTokenService
- Parameters:
paymentIntentId
- the PaymentIntent IDapplicationId
- the id for the current applicationtenantId
- the id for the current tenant- Returns:
- the access token
-
computeHmacSha256
-
getProperties
-