Class DefaultPaymentResponseUtil
java.lang.Object
com.broadleafcommerce.paymentgateway.util.DefaultPaymentResponseUtil
- All Implemented Interfaces:
PaymentResponseUtil
-
Constructor Summary
ConstructorDescriptionDefaultPaymentResponseUtil
(com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionbuildInitialPaymentResponse
(@NonNull GatewayTransactionResponse transactionResponse, @NonNull PaymentGatewayType gatewayType) Builds and populates aPaymentResponse
based on the providedGatewayTransactionResponse
andPaymentGatewayType
buildPaymentResponse
(@NonNull PaymentRequest paymentRequest, @NonNull PaymentGatewayType gatewayType, @NonNull TransactionType transactionType) Builds and populates aPaymentResponse
based on the providedPaymentRequest
protected com.broadleafcommerce.common.extension.TypeFactory
protected PaymentResponse
populateBillTo
(@NonNull PaymentResponse paymentResponse, @NonNull Address<?> requestBillTo) protected PaymentResponse
populateCustomer
(@NonNull PaymentResponse paymentResponse, @NonNull GatewayCustomer<?> requestCustomer) protected PaymentResponse
populateShipTo
(@NonNull PaymentResponse paymentResponse, @NonNull Address<?> requestShipTo)
-
Constructor Details
-
DefaultPaymentResponseUtil
public DefaultPaymentResponseUtil(com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
buildPaymentResponse
public PaymentResponse buildPaymentResponse(@NonNull @NonNull PaymentRequest paymentRequest, @NonNull @NonNull PaymentGatewayType gatewayType, @NonNull @NonNull TransactionType transactionType) Description copied from interface:PaymentResponseUtil
Builds and populates aPaymentResponse
based on the providedPaymentRequest
- Specified by:
buildPaymentResponse
in interfacePaymentResponseUtil
- Parameters:
paymentRequest
- the PaymentRequest used to initiate the related transactiongatewayType
- the type of gateway used to execute the transactiontransactionType
- the type of transaction that was executed- Returns:
- a PaymentResponse populated based on the provided PaymentRequest
-
buildInitialPaymentResponse
public PaymentResponse buildInitialPaymentResponse(@NonNull @NonNull GatewayTransactionResponse transactionResponse, @NonNull @NonNull PaymentGatewayType gatewayType) Description copied from interface:PaymentResponseUtil
Builds and populates aPaymentResponse
based on the providedGatewayTransactionResponse
andPaymentGatewayType
- Specified by:
buildInitialPaymentResponse
in interfacePaymentResponseUtil
- Parameters:
transactionResponse
- the GatewayTransactionResponse used to create the related transactiongatewayType
- the type of gateway used to execute the transaction- Returns:
- a PaymentResponse populated based on the provided GatewayTransactionResponse and Payment
-
populateCustomer
protected PaymentResponse populateCustomer(@NonNull @NonNull PaymentResponse paymentResponse, @NonNull @NonNull GatewayCustomer<?> requestCustomer) -
populateBillTo
protected PaymentResponse populateBillTo(@NonNull @NonNull PaymentResponse paymentResponse, @NonNull @NonNull Address<?> requestBillTo) -
populateShipTo
protected PaymentResponse populateShipTo(@NonNull @NonNull PaymentResponse paymentResponse, @NonNull @NonNull Address<?> requestShipTo) -
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-