Class DefaultBraintreeTransactionService

java.lang.Object
com.broadleafcommerce.braintree.service.DefaultBraintreeTransactionService
All Implemented Interfaces:
BraintreeTransactionService, com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService, com.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware

public class DefaultBraintreeTransactionService extends Object implements BraintreeTransactionService
  • Constructor Summary

    Constructors
    Constructor
    Description
    DefaultBraintreeTransactionService(BraintreeExternalCallService braintreeExternalCallService, com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil paymentResponseUtil, com.broadleafcommerce.common.extension.TypeFactory typeFactory, BraintreeProvider braintreeProvider)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    authorize(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    authorizeAndCapture(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    capture(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected String
     
     
     
     
    protected String
    getNonce(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil
     
    protected String
    getTransactionId(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected String
    getTransactionStatus(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected com.broadleafcommerce.common.extension.TypeFactory
     
    protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    handleUnexpectedException(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull com.broadleafcommerce.paymentgateway.domain.enums.TransactionType transactionType, @NonNull Exception e)
     
    com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    refund(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    com.broadleafcommerce.paymentgateway.domain.PaymentResponse
    reverseAuthorize(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected void
    validateAuthorizeAndCaptureRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected void
    validateAuthorizeRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected void
    validateCaptureRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected void
    validateRefundRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     
    protected void
    validateReverseAuthorizeRequest(@NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService

    detachedCredit, identifyParentTransactionReferenceIfExists, identifyTransactionTypeFromTransactionResults
  • Constructor Details

    • DefaultBraintreeTransactionService

      public DefaultBraintreeTransactionService(BraintreeExternalCallService braintreeExternalCallService, com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil paymentResponseUtil, com.broadleafcommerce.common.extension.TypeFactory typeFactory, BraintreeProvider braintreeProvider)
  • Method Details

    • authorize

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse authorize(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
      Specified by:
      authorize in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
    • reverseAuthorize

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse reverseAuthorize(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
      Specified by:
      reverseAuthorize in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
    • authorizeAndCapture

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse authorizeAndCapture(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
      Specified by:
      authorizeAndCapture in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
    • capture

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse capture(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
      Specified by:
      capture in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
    • refund

      public com.broadleafcommerce.paymentgateway.domain.PaymentResponse refund(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
      Specified by:
      refund in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTransactionService
    • getGatewayType

      public String getGatewayType()
      Specified by:
      getGatewayType in interface com.broadleafcommerce.paymentgateway.service.PaymentGatewayTypeAware
    • validateAuthorizeRequest

      protected void validateAuthorizeRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • validateAuthorizeAndCaptureRequest

      protected void validateAuthorizeAndCaptureRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • validateCaptureRequest

      protected void validateCaptureRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • getTransactionStatus

      @Nullable protected String getTransactionStatus(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • validateRefundRequest

      protected void validateRefundRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • validateReverseAuthorizeRequest

      protected void validateReverseAuthorizeRequest(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • getNonce

      protected String getNonce(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • getTransactionId

      protected String getTransactionId(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest)
    • handleUnexpectedException

      protected com.broadleafcommerce.paymentgateway.domain.PaymentResponse handleUnexpectedException(@NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.PaymentRequest paymentRequest, @NonNull @NonNull com.broadleafcommerce.paymentgateway.domain.enums.TransactionType transactionType, @NonNull @NonNull Exception e)
    • determineFailureType

      protected String determineFailureType(Exception e)
    • getBraintreeExternalCallService

      protected BraintreeExternalCallService getBraintreeExternalCallService()
    • getPaymentResponseUtil

      protected com.broadleafcommerce.paymentgateway.util.PaymentResponseUtil getPaymentResponseUtil()
    • getTypeFactory

      protected com.broadleafcommerce.common.extension.TypeFactory getTypeFactory()
    • getBraintreeProvider

      protected BraintreeProvider getBraintreeProvider()