Class BraintreeRefundResponseTransformer
java.lang.Object
com.broadleafcommerce.braintree.service.requestresponse.AbstractBraintreeResponseTransformer
com.broadleafcommerce.braintree.service.requestresponse.BraintreeRefundResponseTransformer
- All Implemented Interfaces:
ResponseTransformer
-
Constructor Summary
ConstructorsConstructorDescriptionBraintreeRefundResponseTransformer(BraintreeConfigurationProperties configProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper) -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if this transformer can handle the specified transaction type.protected javax.money.MonetaryAmountprotected booleanisSuccessful(BraintreeResponse.Refund refund) com.broadleafcommerce.paymentgateway.domain.PaymentResponsepopulatePaymentResponse(@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.PaymentResponsepopulatePaymentResponse(@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
-
BraintreeRefundResponseTransformer
public BraintreeRefundResponseTransformer(BraintreeConfigurationProperties configProperties, com.fasterxml.jackson.databind.ObjectMapper objectMapper)
-
-
Method Details
-
canHandle
Description copied from interface:ResponseTransformerChecks 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:ResponseTransformerPopulates the payment response based on the response from the Braintree API.- Specified by:
populatePaymentResponsein interfaceResponseTransformer- Overrides:
populatePaymentResponsein 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
-
getRefundAmount
@Nullable protected javax.money.MonetaryAmount getRefundAmount(@NonNull BraintreeResponse.Refund refund)
-