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.
  • Constructor Details

    • HPSProviderDiscriminatedProperties

      public HPSProviderDiscriminatedProperties()
  • Method Details

    • getRawSecureId

      @Nullable protected String getRawSecureId()
    • getSecureId

      public String getSecureId(@Nullable String applicationId, @Nullable String tenantId)
    • getRawApiKey

      @Nullable protected String getRawApiKey()
    • getApiKey

      public String getApiKey(@Nullable String applicationId, @Nullable String tenantId)
    • getRawTxnTypeValue

      @Nullable protected String getRawTxnTypeValue()
    • getTxnType

      public String getTxnType(@Nullable String applicationId, @Nullable String tenantId, @Nullable String formName)
    • getRawFormName

      @Nullable protected String getRawFormName()
    • getFormName

      @Nullable public String getFormName(@Nullable String applicationId, @Nullable String tenantId)
    • getRawAllowedRequestableFormNames

      @Nullable protected List<String> getRawAllowedRequestableFormNames()
    • getAllowedRequestableFormNames

      @Nullable public List<String> getAllowedRequestableFormNames(@Nullable String applicationId, @Nullable String tenantId)
    • getRawFormSpecificProps

    • getRawRetryLimitValue

      @Nullable protected String getRawRetryLimitValue()
    • getRetryLimit

      @Nullable public String getRetryLimit(@Nullable String applicationId, @Nullable String tenantId, @Nullable String formName)
    • 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 from DiscriminatedProperties.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 from HPSProviderDiscriminatedProperties. 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 for
      tenantId - (optional) the current tenant ID this property request is being processed for
      defaultValue - (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

      @Nullable protected String getRawMitMsgTypeValue()
    • getMitMsgType

      @Nullable public String getMitMsgType(@Nullable String applicationId, @Nullable String tenantId, @Nullable String formName)
    • logUnresolvedPropertyError

      protected void logUnresolvedPropertyError(String propertyFriendlyName, String propertyPath, @Nullable String applicationId, @Nullable String tenantId)
    • setSecureId

      public void setSecureId(String secureId)
      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

      public void setApiKey(String apiKey)
      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

      public void setTxnType(String txnType)
      The transaction type that should engage upon HPS submission. This should almost always be left at the default.
      See Also:
    • setFormName

      public void setFormName(String formName)
      The name of the pre-configured HPF form in HPS that should be requested by default, if none is specified in BroadleafHPSOrderAbstractionInitRequest.getHpsFormName()
    • setAllowedRequestableFormNames

      public void setAllowedRequestableFormNames(List<String> allowedRequestableFormNames)
      Defines a whitelist of form names that can be requested in BroadleafHPSOrderAbstractionInitRequest.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 from formName/BroadleafHPSOrderAbstractionInitRequest.getHpsFormName() to specific property value overrides.
    • setRetryLimit

      public void setRetryLimit(String retryLimit)
      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

      public void setMitMsgType(String mitMsgType)
      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: