java.lang.Object
com.broadleafcommerce.vendor.chasepayment.provider.AbstractExternalProvider
com.broadleafcommerce.vendor.chasepayment.service.orbital.external.provider.DefaultOrbitalGatewayProvider
All Implemented Interfaces:
OrbitalGatewayProvider

public class DefaultOrbitalGatewayProvider extends AbstractExternalProvider implements OrbitalGatewayProvider
Default implementation of OrbitalGatewayProvider.
  • Constructor Details

  • Method Details

    • executeAuthorize

      public OrbitalCreatePaymentResponse executeAuthorize(@NonNull @NonNull OrbitalCreatePaymentRequest requestPayload, @NonNull @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper)
      Description copied from interface: OrbitalGatewayProvider
      Execute an DefaultTransactionTypes.AUTHORIZE transaction against the Orbital Gateway.
      Specified by:
      executeAuthorize in interface OrbitalGatewayProvider
      Parameters:
      requestPayload - a request payload that can be sent to the Orbital API, already populated with details from orbitalPaymentRequestWrapper
      orbitalPaymentRequestWrapper - the original payment request details containing additional context about the request
      Returns:
      the response payload received from the Orbital API
    • executeCreatePaymentRequest

      protected OrbitalCreatePaymentResponse executeCreatePaymentRequest(OrbitalCreatePaymentRequest requestPayload, OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper)
    • executeAuthorizeAndCapture

      public OrbitalCreatePaymentResponse executeAuthorizeAndCapture(@NonNull @NonNull OrbitalCreatePaymentRequest requestPayload, @NonNull @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper)
      Description copied from interface: OrbitalGatewayProvider
      Execute an DefaultTransactionTypes.AUTHORIZE_AND_CAPTURE transaction against the Orbital Gateway.
      Specified by:
      executeAuthorizeAndCapture in interface OrbitalGatewayProvider
      Parameters:
      requestPayload - a request payload that can be sent to the Orbital API, already populated with details from orbitalPaymentRequestWrapper
      orbitalPaymentRequestWrapper - the original payment request details containing additional context about the request
      Returns:
      the response payload received from the Orbital API
    • getBaseApiUri

      protected org.springframework.web.util.UriComponentsBuilder getBaseApiUri()
    • populateAuthenticationAndMerchantHeaders

      protected void populateAuthenticationAndMerchantHeaders(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, org.springframework.http.HttpHeaders httpHeaders)
    • getRequiredDiscriminatedPropValueOrThrow

      protected <T> T getRequiredDiscriminatedPropValueOrThrow(BiFunction<String,String,T> discriminatedPropValueSupplier, @Nullable String applicationId, @Nullable String tenantId, String missingPropertyFriendlyName)
      Type Parameters:
      T - the type of the property value
      Parameters:
      discriminatedPropValueSupplier - a function that takes in applicationId and tenantId, and returns a property value
      applicationId - the application ID to find the property value for
      tenantId - the tenant ID to find the property value for
      missingPropertyFriendlyName - the friendly name to include in an error message if not found
      Returns:
      the value for the discriminated property, if found
    • getRequiredPropertyValueOrThrow

      protected <T> T getRequiredPropertyValueOrThrow(Supplier<T> propertyValueSupplier, Supplier<String> errorMessage)
    • buildRequiredDiscriminatedPropMissingErrorMessage

      protected String buildRequiredDiscriminatedPropMissingErrorMessage(String missingPropertyFriendlyName, @Nullable String applicationId, @Nullable String tenantId)
    • getTenantId

      @Nullable protected String getTenantId(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper)
    • getApplicationId

      @Nullable protected String getApplicationId(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper)
    • executeCapture

      public OrbitalCaptureResponse executeCapture(@NonNull @NonNull OrbitalCaptureRequest requestPayload, @NonNull @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper)
      Description copied from interface: OrbitalGatewayProvider
      Execute a DefaultTransactionTypes.CAPTURE transaction against the Orbital Gateway.
      Specified by:
      executeCapture in interface OrbitalGatewayProvider
      Parameters:
      requestPayload - a request payload that can be sent to the Orbital API, already populated with details from orbitalPaymentRequestWrapper
      orbitalPaymentRequestWrapper - the original payment request details containing additional context about the request
      Returns:
      the response payload received from the Orbital API
    • executeRefund

      public OrbitalRefundResponse executeRefund(@NonNull @NonNull OrbitalRefundRequest requestPayload, @NonNull @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper)
      Description copied from interface: OrbitalGatewayProvider
      Execute a DefaultTransactionTypes.REFUND transaction against the Orbital Gateway.
      Specified by:
      executeRefund in interface OrbitalGatewayProvider
      Parameters:
      requestPayload - a request payload that can be sent to the Orbital API, already populated with details from orbitalPaymentRequestWrapper
      orbitalPaymentRequestWrapper - the original payment request details containing additional context about the request
      Returns:
      the response payload received from the Orbital API
    • executeReversal

      public OrbitalReversalResponse executeReversal(@NonNull @NonNull OrbitalReversalRequest requestPayload, @NonNull @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper)
      Description copied from interface: OrbitalGatewayProvider
      Execute a DefaultTransactionTypes.REVERSE_AUTH transaction against the Orbital Gateway.
      Specified by:
      executeReversal in interface OrbitalGatewayProvider
      Parameters:
      requestPayload - a request payload that can be sent to the Orbital API, already populated with details from orbitalPaymentRequestWrapper
      orbitalPaymentRequestWrapper - the original payment request details containing additional context about the request
      Returns:
      the response payload received from the Orbital API
    • getGlobalProperties

      protected OrbitalGatewayProviderGlobalProperties getGlobalProperties()
    • getDiscriminatedProperties

      protected OrbitalGatewayProviderDiscriminatedProperties getDiscriminatedProperties()