Class BraintreeAuthorizeResponseTransformer
java.lang.Object
com.broadleafcommerce.braintree.service.requestresponse.AbstractBraintreeResponseTransformer
com.broadleafcommerce.braintree.service.requestresponse.BraintreeAuthorizeResponseTransformer
- All Implemented Interfaces:
ResponseTransformer
-
Constructor Summary
ConstructorsConstructorDescriptionBraintreeAuthorizeResponseTransformer
(BraintreeConfigurationProperties configProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if this transformer can handle the specified transaction type.protected com.broadleafcommerce.common.extension.TypeFactory
protected boolean
isSuccessful
(BraintreeResponse.Transaction transaction) com.broadleafcommerce.paymentgateway.domain.PaymentResponse
populatePaymentResponse
(@NonNull BraintreePaymentRequest braintreePaymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull BraintreeResponse braintreeResponse) Populates the payment response based on the response from the Braintree API.protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse
populatePaymentResponse
(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull BraintreeResponse braintreeResponse, @NonNull String transactionReferenceId) Methods inherited from class com.broadleafcommerce.braintree.service.requestresponse.AbstractBraintreeResponseTransformer
getConfigProperties, getMessage, getObjectMapper, getTransactionAmount, identifyFailureType, putIfNotBlank
-
Constructor Details
-
BraintreeAuthorizeResponseTransformer
public BraintreeAuthorizeResponseTransformer(BraintreeConfigurationProperties configProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper, com.broadleafcommerce.common.extension.TypeFactory typeFactory)
-
-
Method Details
-
canHandle
Description copied from interface:ResponseTransformer
Checks if this transformer can handle the specified transaction type.- Parameters:
transactionType
- the transaction type of the request- Returns:
- true if this transformer can be used for the specified request
-
populatePaymentResponse
public com.broadleafcommerce.paymentgateway.domain.PaymentResponse populatePaymentResponse(@NonNull @NonNull BraintreePaymentRequest braintreePaymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull BraintreeResponse braintreeResponse) Description copied from interface:ResponseTransformer
Populates the payment response based on the response from the Braintree API.- Specified by:
populatePaymentResponse
in interfaceResponseTransformer
- Overrides:
populatePaymentResponse
in classAbstractBraintreeResponseTransformer
- Parameters:
braintreePaymentRequest
- the Braintree payment requestpaymentResponse
- the payment response to populatebraintreeResponse
- the response from Braintree API- Returns:
- the populated payment response
-
populatePaymentResponse
protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse populatePaymentResponse(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentResponse paymentResponse, @NonNull @NonNull BraintreeResponse braintreeResponse, @NonNull @NonNull String transactionReferenceId) -
isSuccessful
-
getTypeFactory
protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
-