Class HPSProviderDiscriminatedProperties
java.lang.Object
com.broadleafcommerce.paymentgateway.properties.DiscriminatedProperties<HPSProviderDiscriminatedProperties>
com.broadleafcommerce.vendor.chasepayment.service.hps.provider.autoconfigure.HPSProviderDiscriminatedProperties
@ConfigurationProperties("broadleaf.chase-payment.hps.provider.discriminated")
public class HPSProviderDiscriminatedProperties
extends com.broadleafcommerce.paymentgateway.properties.DiscriminatedProperties<HPSProviderDiscriminatedProperties>
Configuration properties configuring
HPSProvider that are discriminated by context.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classValues to override higher-level settings for a specific form name. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAllowedRequestableFormNames(String applicationId, String tenantId) protected <T> TgetContextSpecificPropertyValueOrDefault(Function<HPSProviderDiscriminatedProperties, T> valueGetter, String applicationId, String tenantId, T defaultValue) TheDiscriminatedProperties.getField(String, String, String, Class)method is limited in its ability to do deep traversal for nested properties, since it can only examine top-level fields.getFormName(String applicationId, String tenantId) protected <T> TgetFormSpecificPropertyValueOrDefault(String applicationId, String tenantId, String formName, Function<HPSProviderDiscriminatedProperties.FormSpecificProperties, T> formSpecificValueGetter, Function<HPSProviderDiscriminatedProperties, T> topLevelValueGetter, T defaultValue) getMitMsgType(String applicationId, String tenantId, String formName) protected Stringprotected Stringprotected Stringprotected Stringprotected Stringprotected StringgetRetryLimit(String applicationId, String tenantId, String formName) getSecureId(String applicationId, String tenantId) getTxnType(String applicationId, String tenantId, String formName) protected voidlogUnresolvedPropertyError(String propertyFriendlyName, String propertyPath, String applicationId, String tenantId) voidsetAllowedRequestableFormNames(List<String> allowedRequestableFormNames) Defines a whitelist of form names that can be requested inBroadleafHPSOrderAbstractionInitRequest.getHpsFormName()- the requested form name must be a member of this whitelist.voidThe API key (AKA API token) that can be used to access the HPS API.voidsetFormName(String formName) The name of the pre-configured HPF form in HPS that should be requested by default, if none is specified inBroadleafHPSOrderAbstractionInitRequest.getHpsFormName()voidsetFormSpecificProps(Map<String, HPSProviderDiscriminatedProperties.FormSpecificProperties> formSpecificProps) A map fromformName/BroadleafHPSOrderAbstractionInitRequest.getHpsFormName()to specific property value overrides.voidsetMitMsgType(String mitMsgType) This is the CIT/MIT message code categorizing the type of transaction that will happen upon HPF/HPP submission.voidsetRetryLimit(String retryLimit) Maximum number of times a customer may receive an error on the hosted page/form and be allowed to retry.voidsetSecureId(String secureId) Each HPS profile will be associated with a 'SecureID'.voidsetTxnType(String txnType) The transaction type that should engage upon HPS submission.Methods inherited from class com.broadleafcommerce.paymentgateway.properties.DiscriminatedProperties
getApplication, getField, getTenant, setApplication, setTenant
-
Constructor Details
-
HPSProviderDiscriminatedProperties
public HPSProviderDiscriminatedProperties()
-
-
Method Details
-
getRawSecureId
-
getSecureId
-
getRawApiKey
-
getApiKey
-
getRawTxnTypeValue
-
getTxnType
-
getRawFormName
-
getFormName
-
getRawAllowedRequestableFormNames
-
getAllowedRequestableFormNames
-
getRawFormSpecificProps
protected Map<String,HPSProviderDiscriminatedProperties.FormSpecificProperties> getRawFormSpecificProps() -
getRawRetryLimitValue
-
getRetryLimit
-
getFormSpecificPropertyValueOrDefault
@Nullable protected <T> T getFormSpecificPropertyValueOrDefault(@Nullable String applicationId, @Nullable String tenantId, @Nullable String formName, Function<HPSProviderDiscriminatedProperties.FormSpecificProperties, T> formSpecificValueGetter, Function<HPSProviderDiscriminatedProperties, T> topLevelValueGetter, @Nullable T defaultValue) -
getContextSpecificPropertyValueOrDefault
@Nullable protected <T> T getContextSpecificPropertyValueOrDefault(Function<HPSProviderDiscriminatedProperties, T> valueGetter, @Nullable String applicationId, @Nullable String tenantId, @Nullable T defaultValue) The
DiscriminatedProperties.getField(String, String, String, Class)method is limited in its ability to do deep traversal for nested properties, since it can only examine top-level fields. This loses the ability to do more granular overrides for more nested properties.This method serves as an alternative that looks for a specific set property value in each tier via a provided
valueGetter, which can actually extract a nested value from each instance as needed, whether fromDiscriminatedProperties.getApplication(),DiscriminatedProperties.getTenant(), or at the global level.- Type Parameters:
T- the value type of the requested property.- Parameters:
valueGetter- function that can obtain a property value fromHPSProviderDiscriminatedProperties. This should be simple and just getting the raw value from the specific properties instance.applicationId- (optional) the current application ID this property request is being processed fortenantId- (optional) the current tenant ID this property request is being processed fordefaultValue- (optional) if no value is explicitly set anywhere, the default value to return- Returns:
- the value of the property, narrowed to the current specific context
-
getRawMitMsgTypeValue
-
getMitMsgType
-
logUnresolvedPropertyError
-
setSecureId
Each HPS profile will be associated with a 'SecureID'. Secure ID starts with 'chs' followed by random numbers. Secure IDs in the testing environment end with 'sb'. This is a secret value that must be included in certain API requests. -
setApiKey
The API key (AKA API token) that can be used to access the HPS API. This is a secret value that must be included in certain API requests. -
setTxnType
The transaction type that should engage upon HPS submission. This should almost always be left at the default.- See Also:
-
setFormName
The name of the pre-configured HPF form in HPS that should be requested by default, if none is specified inBroadleafHPSOrderAbstractionInitRequest.getHpsFormName() -
setAllowedRequestableFormNames
Defines a whitelist of form names that can be requested inBroadleafHPSOrderAbstractionInitRequest.getHpsFormName()- the requested form name must be a member of this whitelist. This prevents an API caller from being able to request/use any arbitrary form name configured in Chase HPS. -
setFormSpecificProps
public void setFormSpecificProps(Map<String, HPSProviderDiscriminatedProperties.FormSpecificProperties> formSpecificProps) A map fromformName/BroadleafHPSOrderAbstractionInitRequest.getHpsFormName()to specific property value overrides. -
setRetryLimit
Maximum number of times a customer may receive an error on the hosted page/form and be allowed to retry. When unspecified, the default from HPS is 5. -
setMitMsgType
This is the CIT/MIT message code categorizing the type of transaction that will happen upon HPF/HPP submission. This should almost always be left at the default.- See Also:
-