Interface BraintreeProvider

All Known Implementing Classes:
ExternalBraintreeProvider

public interface BraintreeProvider
  • Method Details

    • generateClientToken

      BraintreeGenerateTokenResponse generateClientToken(@Nullable String customerId, @Nullable String applicationId, @Nullable String tenantId)
      This method generate Client Token which will be used on the Client Side integration for Drop-in calls
      Parameters:
      customerId - Only applies to the Drop-in UI; not needed when generating client tokens for custom integrations. A string value representing an existing customer in your Vault. Passing this option allows customers to manage their vaulted payment methods via the Drop-in UI
      applicationId - the application id
      tenantId - the tenant id
      Returns:
      BraintreeGenerateTokenResponse which contains all authorization and configuration information your client needs to initialize the client SDK to communicate with Braintree
    • authorizeTransaction

      BraintreeResponse authorizeTransaction(BraintreePaymentRequest braintreePaymentRequest, String nonce, @Nullable String applicationId, @Nullable String tenantId)
      Executes the DefaultTransactionTypes.AUTHORIZE transactions.
      Parameters:
      braintreePaymentRequest - the request body
      nonce - - payment_method_nonce representing customer payment authorization. This value comes from the Client Side and can be generated by Drop-in, PayPal or any other payment methods supported by Braintree
      applicationId - the application id
      tenantId - the tenant id
      Returns:
      the response from Braintree API
      Throws:
      ProviderApiException - if the request failed
    • authorizeAndCaptureTransaction

      BraintreeResponse authorizeAndCaptureTransaction(BraintreePaymentRequest braintreePaymentRequest, String nonce, @Nullable String applicationId, @Nullable String tenantId)
      Executes the DefaultTransactionTypes.AUTHORIZE_AND_CAPTURE transactions.
      Parameters:
      braintreePaymentRequest - the request body
      applicationId - the application id
      tenantId - the tenant id
      nonce - the nonce from Client SDK
      Returns:
      the response from Braintree API
      Throws:
      ProviderApiException - if the request failed
    • reverseAuthorizeTransaction

      BraintreeResponse reverseAuthorizeTransaction(String transactionId, BraintreePaymentRequest braintreePaymentRequest, @Nullable String applicationId, @Nullable String tenantId)
      Executes the DefaultTransactionTypes.REVERSE_AUTH transactions.
      Parameters:
      transactionId - the transaction id to reverse
      applicationId - the application id
      tenantId - the tenant id
      Returns:
      the response from Braintree API
      Throws:
      ProviderApiException - if the request failed
    • captureTransaction

      BraintreeResponse captureTransaction(String transactionId, BraintreePaymentRequest braintreePaymentRequest, @Nullable String applicationId, @Nullable String tenantId)
      Executes the DefaultTransactionTypes.CAPTURE transactions.
      Parameters:
      transactionId - the transaction id to capture
      braintreePaymentRequest - the request body
      applicationId - the application id
      tenantId - the tenant id
      Returns:
      the response from Braintree API
      Throws:
      ProviderApiException - if the request failed
    • refundTransaction

      BraintreeResponse refundTransaction(String transactionId, BraintreePaymentRequest braintreePaymentRequest, @Nullable String applicationId, @Nullable String tenantId)
      Executes the DefaultTransactionTypes.REFUND transactions.
      Parameters:
      transactionId - the transaction id to reverse
      braintreePaymentRequest - the request body
      applicationId - the application id
      tenantId - the tenant id
      Returns:
      the response from Braintree API
      Throws:
      ProviderApiException - if the request failed
    • getTransactionStatus

      BraintreeResponse getTransactionStatus(String transactionId, @Nullable String applicationId, @Nullable String tenantId)
      Get current status of the transaction.
      Parameters:
      transactionId - the transaction id to reverse
      applicationId - the application id
      tenantId - the tenant id
      Returns:
      the response from Braintree API
      Throws:
      ProviderApiException - if the request failed