Class DefaultOrbitalGatewayProvider
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 Summary
ConstructorsConstructorDescriptionDefaultOrbitalGatewayProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, OrbitalGatewayProviderGlobalProperties globalProperties, OrbitalGatewayProviderDiscriminatedProperties discriminatedProperties) -
Method Summary
Modifier and TypeMethodDescriptionprotected StringbuildRequiredDiscriminatedPropMissingErrorMessage(String missingPropertyFriendlyName, String applicationId, String tenantId) executeAuthorize(@NonNull OrbitalCreatePaymentRequest requestPayload, @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) Execute anDefaultTransactionTypes.AUTHORIZEtransaction against the Orbital Gateway.executeAuthorizeAndCapture(@NonNull OrbitalCreatePaymentRequest requestPayload, @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) Execute anDefaultTransactionTypes.AUTHORIZE_AND_CAPTUREtransaction against the Orbital Gateway.executeCapture(@NonNull OrbitalCaptureRequest requestPayload, @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) Execute aDefaultTransactionTypes.CAPTUREtransaction against the Orbital Gateway.protected OrbitalCreatePaymentResponseexecuteCreatePaymentRequest(OrbitalCreatePaymentRequest requestPayload, OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) executeRefund(@NonNull OrbitalRefundRequest requestPayload, @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) Execute aDefaultTransactionTypes.REFUNDtransaction against the Orbital Gateway.executeReversal(@NonNull OrbitalReversalRequest requestPayload, @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) Execute aDefaultTransactionTypes.REVERSE_AUTHtransaction against the Orbital Gateway.protected StringgetApplicationId(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) protected org.springframework.web.util.UriComponentsBuilderprotected OrbitalGatewayProviderGlobalPropertiesprotected <T> TgetRequiredDiscriminatedPropValueOrThrow(BiFunction<String, String, T> discriminatedPropValueSupplier, String applicationId, String tenantId, String missingPropertyFriendlyName) protected <T> TgetRequiredPropertyValueOrThrow(Supplier<T> propertyValueSupplier, Supplier<String> errorMessage) protected StringgetTenantId(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) protected voidpopulateAuthenticationAndMerchantHeaders(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, org.springframework.http.HttpHeaders httpHeaders) Methods inherited from class com.broadleafcommerce.vendor.chasepayment.provider.AbstractExternalProvider
executeRequest, getApplicationId, getObjectMapper, getTenantId, getWebClient
-
Constructor Details
-
DefaultOrbitalGatewayProvider
public DefaultOrbitalGatewayProvider(org.springframework.web.reactive.function.client.WebClient webClient, com.fasterxml.jackson.databind.ObjectMapper objectMapper, OrbitalGatewayProviderGlobalProperties globalProperties, OrbitalGatewayProviderDiscriminatedProperties discriminatedProperties)
-
-
Method Details
-
executeAuthorize
public OrbitalCreatePaymentResponse executeAuthorize(@NonNull @NonNull OrbitalCreatePaymentRequest requestPayload, @NonNull @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) Description copied from interface:OrbitalGatewayProviderExecute anDefaultTransactionTypes.AUTHORIZEtransaction against the Orbital Gateway.- Specified by:
executeAuthorizein interfaceOrbitalGatewayProvider- Parameters:
requestPayload- a request payload that can be sent to the Orbital API, already populated with details fromorbitalPaymentRequestWrapperorbitalPaymentRequestWrapper- 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:OrbitalGatewayProviderExecute anDefaultTransactionTypes.AUTHORIZE_AND_CAPTUREtransaction against the Orbital Gateway.- Specified by:
executeAuthorizeAndCapturein interfaceOrbitalGatewayProvider- Parameters:
requestPayload- a request payload that can be sent to the Orbital API, already populated with details fromorbitalPaymentRequestWrapperorbitalPaymentRequestWrapper- 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 valueapplicationId- the application ID to find the property value fortenantId- the tenant ID to find the property value formissingPropertyFriendlyName- the friendly name to include in an error message if not found- Returns:
- the value for the discriminated property, if found
-
getRequiredPropertyValueOrThrow
-
buildRequiredDiscriminatedPropMissingErrorMessage
-
getTenantId
-
getApplicationId
@Nullable protected String getApplicationId(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) -
executeCapture
public OrbitalCaptureResponse executeCapture(@NonNull @NonNull OrbitalCaptureRequest requestPayload, @NonNull @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) Description copied from interface:OrbitalGatewayProviderExecute aDefaultTransactionTypes.CAPTUREtransaction against the Orbital Gateway.- Specified by:
executeCapturein interfaceOrbitalGatewayProvider- Parameters:
requestPayload- a request payload that can be sent to the Orbital API, already populated with details fromorbitalPaymentRequestWrapperorbitalPaymentRequestWrapper- 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:OrbitalGatewayProviderExecute aDefaultTransactionTypes.REFUNDtransaction against the Orbital Gateway.- Specified by:
executeRefundin interfaceOrbitalGatewayProvider- Parameters:
requestPayload- a request payload that can be sent to the Orbital API, already populated with details fromorbitalPaymentRequestWrapperorbitalPaymentRequestWrapper- 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:OrbitalGatewayProviderExecute aDefaultTransactionTypes.REVERSE_AUTHtransaction against the Orbital Gateway.- Specified by:
executeReversalin interfaceOrbitalGatewayProvider- Parameters:
requestPayload- a request payload that can be sent to the Orbital API, already populated with details fromorbitalPaymentRequestWrapperorbitalPaymentRequestWrapper- the original payment request details containing additional context about the request- Returns:
- the response payload received from the Orbital API
-
getGlobalProperties
-
getDiscriminatedProperties
-