Class CheckoutConfigurationProperties
- java.lang.Object
-
- com.broadleafcommerce.paymentgateway.properties.DiscriminatedProperties<CheckoutConfigurationProperties>
-
- com.broadleafcommerce.payment.service.gateway.autoconfigure.CheckoutConfigurationProperties
-
@ConfigurationProperties("broadleaf.checkout-com") public class CheckoutConfigurationProperties extends com.broadleafcommerce.paymentgateway.properties.DiscriminatedProperties<CheckoutConfigurationProperties>Properties used to configure the Checkout.com integration library. Note: the secret & public keys can be declared globally, or for specific applications or tenants.- Author:
- Jawad Tariq
-
-
Constructor Summary
Constructors Constructor Description CheckoutConfigurationProperties()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.checkout.EnvironmentgetEnvironment()Gathers the configured Checkout.com environment.StringgetPublicKey(String applicationId, String tenantId)Gathers the configured Checkout.com public key based on the provided context attributes.StringgetSecretKey(String applicationId, String tenantId)Gathers the configured Checkout.com secret key based on the provided context attributes.StringgetSignatureKey(String applicationId, String tenantId)Gathers the configured Checkout.com signature key.voidsetEnvironment(String environment)Environment can be either PRODUCTION or SANDBOX.voidsetPublicKey(String publicKey)Along with the Secret Key, the Public Key is also used to authenticate with the Checkout.com SDK.voidsetSecretKey(String secretKey)This Secret Key is the unique identifier provided by the checkout.com which is used to authenticate with the Checkout.com SDK.voidsetSignatureKey(String signatureKey)The HMAC is generated by taking the contents of the notification and hashing it using this key.
-
-
-
Method Detail
-
getEnvironment
public com.checkout.Environment getEnvironment()
Gathers the configured Checkout.com environment. Note, this is intentionally not application and/or tenant discriminated since we expect this value to be declared for the entire environment, not specific applications or tenants.- Returns:
- The configured Checkout.com environment
-
getSecretKey
public String getSecretKey(@Nullable String applicationId, @Nullable String tenantId)
Gathers the configured Checkout.com secret key based on the provided context attributes.- Parameters:
applicationId- the application IDtenantId- the tenant ID- Returns:
- The configured Checkout.com secret key
-
getPublicKey
public String getPublicKey(@Nullable String applicationId, @Nullable String tenantId)
Gathers the configured Checkout.com public key based on the provided context attributes.- Parameters:
applicationId- the application IDtenantId- the tenant ID- Returns:
- The configured Checkout.com public key
-
getSignatureKey
public String getSignatureKey(@Nullable String applicationId, @Nullable String tenantId)
Gathers the configured Checkout.com signature key.- Parameters:
applicationId- the application IDtenantId- the tenant ID- Returns:
- The configured Checkout.com signature key
- See Also:
WebhookSignatureUtil.generateSignature(java.lang.String, java.lang.String, java.lang.String)
-
setSecretKey
public void setSecretKey(String secretKey)
This Secret Key is the unique identifier provided by the checkout.com which is used to authenticate with the Checkout.com SDK.
-
setPublicKey
public void setPublicKey(String publicKey)
Along with the Secret Key, the Public Key is also used to authenticate with the Checkout.com SDK. Both of these keys needs to be provided in order to complete the authentication with checkout.com.
-
setSignatureKey
public void setSignatureKey(String signatureKey)
The HMAC is generated by taking the contents of the notification and hashing it using this key. The HMAC will be in every notification to validate the request. This key is required to integrate with the webhook.
-
setEnvironment
public void setEnvironment(String environment)
Environment can be either PRODUCTION or SANDBOX. Sandbox Environment is required to test the SDK locally while Production Environment will be used on Production.
-
-