Class DefaultOrbitalGatewayExternalCallService
java.lang.Object
com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<OrbitalPaymentRequestWrapper,com.broadleafcommerce.paymentgateway.domain.PaymentResponse>
com.broadleafcommerce.vendor.chasepayment.service.orbital.external.DefaultOrbitalGatewayExternalCallService
- All Implemented Interfaces:
com.broadleafcommerce.paymentgateway.service.FailureCountExposable,com.broadleafcommerce.paymentgateway.vendor.service.monitor.ServiceStatusDetectable<OrbitalPaymentRequestWrapper>,OrbitalGatewayExternalCallService
public class DefaultOrbitalGatewayExternalCallService
extends com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<OrbitalPaymentRequestWrapper,com.broadleafcommerce.paymentgateway.domain.PaymentResponse>
implements OrbitalGatewayExternalCallService
Default implementation of
OrbitalGatewayExternalCallService.-
Field Summary
Fields inherited from class com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall
failureCount, isUp -
Constructor Summary
ConstructorsConstructorDescriptionDefaultOrbitalGatewayExternalCallService(ChaseOrbitalGatewayConfigurationProperties orbitalGatewayConfigProperties, com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil paymentResponseUtil, OrbitalGatewayProvider orbitalGatewayProvider, List<OrbitalRequestResponseTransformer> requestResponseTransformers, com.broadleafcommerce.common.extension.TypeFactory typeFactory, OrbitalResponseCodeEvaluator responseCodeEvaluator) -
Method Summary
Modifier and TypeMethodDescriptionprotected com.broadleafcommerce.paymentgateway.domain.PaymentResponsebuildEagerPaymentResponse(@NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) protected OrbitalCaptureRequestbuildOrbitalCaptureRequest(OrbitalRequestResponseTransformer requestResponseTransformer, OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) protected OrbitalCreatePaymentRequestbuildOrbitalCreatePaymentRequest(OrbitalRequestResponseTransformer requestResponseTransformer, OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) protected OrbitalRefundRequestbuildOrbitalRefundRequest(OrbitalRequestResponseTransformer requestResponseTransformer, OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) protected OrbitalReversalRequestbuildOrbitalReversalRequest(OrbitalRequestResponseTransformer requestResponseTransformer, OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) com.broadleafcommerce.paymentgateway.domain.PaymentResponsecall(OrbitalPaymentRequestWrapper paymentRequest) Make an external request to the gateway to execute the transaction corresponding to the provided payment request.com.broadleafcommerce.paymentgateway.domain.PaymentResponsecommunicateWithVendor(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) protected voidexecuteAuthorizeAndCaptureRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformer requestResponseTransformer) protected voidexecuteAuthorizeRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformer requestResponseTransformer) protected voidexecuteCaptureRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformer requestResponseTransformer) protected voidexecuteRefundRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformer requestResponseTransformer) protected voidexecuteRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate) protected voidexecuteReverseAuthRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformer requestResponseTransformer) protected StringgetGatewayTransactionType(@NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) protected OrbitalGatewayProviderprotected com.broadleafcommerce.paymentgateway.util.PaymentResponseUtilprotected List<OrbitalRequestResponseTransformer>protected OrbitalResponseCodeEvaluatorprotected com.broadleafcommerce.common.extension.TypeFactoryprotected voidhandleExecuteCustomRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate) Hook point to allow clients to handle additional transaction types.protected voidhandleMissingRequiredConfigurationException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, MissingRequiredConfigurationException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aMissingRequiredConfigurationException, this method is called to capture error details on the response.protected voidhandleOrbitalRequestCreationException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestCreationException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aOrbitalRequestCreationException, this method is called to capture error details on the response.protected voidhandleOrbitalRequestResponseTransformerNotFoundException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformerNotFoundException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aOrbitalRequestResponseTransformerNotFoundException, this method is called to capture error details on the response.protected voidhandleOrbitalResponseInterpretationException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalResponseInterpretationException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aOrbitalResponseInterpretationException, this method is called to capture error details on the response.protected voidhandleProviderApiException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, ProviderApiException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aProviderApiException, this method is called to capture error details on the response.protected voidhandleUnexpectedOrbitalRequestResponseException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, UnexpectedOrbitalRequestResponseException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aUnexpectedOrbitalRequestResponseException, this method is called to capture error details on the response.protected OrbitalRequestResponseTransformeridentifyRequestResponseTransformer(@NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) Methods inherited from class com.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall
clearStatus, getServiceStatus, incrementFailure, process
-
Constructor Details
-
DefaultOrbitalGatewayExternalCallService
public DefaultOrbitalGatewayExternalCallService(ChaseOrbitalGatewayConfigurationProperties orbitalGatewayConfigProperties, com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil paymentResponseUtil, OrbitalGatewayProvider orbitalGatewayProvider, List<OrbitalRequestResponseTransformer> requestResponseTransformers, com.broadleafcommerce.common.extension.TypeFactory typeFactory, OrbitalResponseCodeEvaluator responseCodeEvaluator)
-
-
Method Details
-
call
public com.broadleafcommerce.paymentgateway.domain.PaymentResponse call(OrbitalPaymentRequestWrapper paymentRequest) Description copied from interface:OrbitalGatewayExternalCallServiceMake an external request to the gateway to execute the transaction corresponding to the provided payment request.- Specified by:
callin interfaceOrbitalGatewayExternalCallService- Parameters:
paymentRequest- The request payload that should be used to form the transaction- Returns:
- object that carries the response from the external gateway service
-
communicateWithVendor
public com.broadleafcommerce.paymentgateway.domain.PaymentResponse communicateWithVendor(@NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) throws Exception - Specified by:
communicateWithVendorin classcom.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<OrbitalPaymentRequestWrapper,com.broadleafcommerce.paymentgateway.domain.PaymentResponse> - Throws:
Exception
-
buildEagerPaymentResponse
protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse buildEagerPaymentResponse(@NonNull @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) - Parameters:
orbitalPaymentRequestWrapper- the received request details- Returns:
- an initial payment response placeholder object that defaults to reporting 'unsuccessful'. This can serve as an initial starting point for the payment response and fleshed out as the flow progresses.
-
getGatewayTransactionType
protected String getGatewayTransactionType(@NonNull @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) -
executeRequest
protected void executeRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate) -
identifyRequestResponseTransformer
protected OrbitalRequestResponseTransformer identifyRequestResponseTransformer(@NonNull @NonNull OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) -
executeAuthorizeRequest
protected void executeAuthorizeRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformer requestResponseTransformer) -
buildOrbitalCreatePaymentRequest
protected OrbitalCreatePaymentRequest buildOrbitalCreatePaymentRequest(OrbitalRequestResponseTransformer requestResponseTransformer, OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) -
executeAuthorizeAndCaptureRequest
protected void executeAuthorizeAndCaptureRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformer requestResponseTransformer) -
executeCaptureRequest
protected void executeCaptureRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformer requestResponseTransformer) -
buildOrbitalCaptureRequest
protected OrbitalCaptureRequest buildOrbitalCaptureRequest(OrbitalRequestResponseTransformer requestResponseTransformer, OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) -
executeRefundRequest
protected void executeRefundRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformer requestResponseTransformer) -
buildOrbitalRefundRequest
protected OrbitalRefundRequest buildOrbitalRefundRequest(OrbitalRequestResponseTransformer requestResponseTransformer, OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) -
executeReverseAuthRequest
protected void executeReverseAuthRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformer requestResponseTransformer) -
buildOrbitalReversalRequest
protected OrbitalReversalRequest buildOrbitalReversalRequest(OrbitalRequestResponseTransformer requestResponseTransformer, OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper) -
handleExecuteCustomRequest
protected void handleExecuteCustomRequest(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate) Hook point to allow clients to handle additional transaction types. Default throws an error.- Parameters:
orbitalPaymentRequestWrapper- request detailsresponseToPopulate- response object to populate with results
-
handleProviderApiException
protected void handleProviderApiException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, ProviderApiException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aProviderApiException, this method is called to capture error details on the response.- Parameters:
orbitalPaymentRequestWrapper- the original request detailsresponseToPopulate- the response on which any error details should be populatede- the thrown exception
-
handleMissingRequiredConfigurationException
protected void handleMissingRequiredConfigurationException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, MissingRequiredConfigurationException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aMissingRequiredConfigurationException, this method is called to capture error details on the response.- Parameters:
orbitalPaymentRequestWrapper- the original request detailsresponseToPopulate- the response on which any error details should be populatede- the thrown exception
-
handleOrbitalRequestResponseTransformerNotFoundException
protected void handleOrbitalRequestResponseTransformerNotFoundException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestResponseTransformerNotFoundException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aOrbitalRequestResponseTransformerNotFoundException, this method is called to capture error details on the response.- Parameters:
orbitalPaymentRequestWrapper- the original request detailsresponseToPopulate- the response on which any error details should be populatede- the thrown exception
-
handleOrbitalRequestCreationException
protected void handleOrbitalRequestCreationException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalRequestCreationException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aOrbitalRequestCreationException, this method is called to capture error details on the response.- Parameters:
orbitalPaymentRequestWrapper- the original request detailsresponseToPopulate- the response on which any error details should be populatede- the thrown exception
-
handleUnexpectedOrbitalRequestResponseException
protected void handleUnexpectedOrbitalRequestResponseException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, UnexpectedOrbitalRequestResponseException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aUnexpectedOrbitalRequestResponseException, this method is called to capture error details on the response.- Parameters:
orbitalPaymentRequestWrapper- the original request detailsresponseToPopulate- the response on which any error details should be populatede- the thrown exception
-
handleOrbitalResponseInterpretationException
protected void handleOrbitalResponseInterpretationException(OrbitalPaymentRequestWrapper orbitalPaymentRequestWrapper, com.broadleafcommerce.paymentgateway.domain.PaymentResponse responseToPopulate, OrbitalResponseInterpretationException e) IfexecuteRequest(OrbitalPaymentRequestWrapper, PaymentResponse)throws aOrbitalResponseInterpretationException, this method is called to capture error details on the response.- Parameters:
orbitalPaymentRequestWrapper- the original request detailsresponseToPopulate- the response on which any error details should be populatede- the thrown exception
-
getFailureReportingThreshold
- Specified by:
getFailureReportingThresholdin interfacecom.broadleafcommerce.paymentgateway.service.FailureCountExposable- Specified by:
getFailureReportingThresholdin classcom.broadleafcommerce.paymentgateway.service.AbstractExternalPaymentGatewayCall<OrbitalPaymentRequestWrapper,com.broadleafcommerce.paymentgateway.domain.PaymentResponse>
-
getServiceName
- Specified by:
getServiceNamein interfacecom.broadleafcommerce.paymentgateway.vendor.service.monitor.ServiceStatusDetectable<OrbitalPaymentRequestWrapper>
-
getOrbitalGatewayConfigProperties
-
getPaymentResponseUtil
protected com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil getPaymentResponseUtil() -
getOrbitalGatewayProvider
-
getRequestResponseTransformers
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory() -
getResponseCodeEvaluator
-