Interface BraintreeProvider
- All Known Implementing Classes:
ExternalBraintreeProvider
public interface BraintreeProvider
-
Method Summary
Modifier and TypeMethodDescriptionauthorizeAndCaptureTransaction
(BraintreePaymentRequest braintreePaymentRequest, String nonce, String applicationId, String tenantId) Executes theDefaultTransactionTypes.AUTHORIZE_AND_CAPTURE
transactions.authorizeTransaction
(BraintreePaymentRequest braintreePaymentRequest, String nonce, String applicationId, String tenantId) Executes theDefaultTransactionTypes.AUTHORIZE
transactions.captureTransaction
(String transactionId, BraintreePaymentRequest braintreePaymentRequest, String applicationId, String tenantId) Executes theDefaultTransactionTypes.CAPTURE
transactions.generateClientToken
(String customerId, String applicationId, String tenantId) This method generate Client Token which will be used on the Client Side integration for Drop-in callsgetTransactionStatus
(String transactionId, String applicationId, String tenantId) Get current status of the transaction.refundTransaction
(String transactionId, BraintreePaymentRequest braintreePaymentRequest, String applicationId, String tenantId) Executes theDefaultTransactionTypes.REFUND
transactions.reverseAuthorizeTransaction
(String transactionId, BraintreePaymentRequest braintreePaymentRequest, String applicationId, String tenantId) Executes theDefaultTransactionTypes.REVERSE_AUTH
transactions.
-
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 UIapplicationId
- the application idtenantId
- 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 theDefaultTransactionTypes.AUTHORIZE
transactions.- Parameters:
braintreePaymentRequest
- the request bodynonce
- - 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 BraintreeapplicationId
- the application idtenantId
- 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 theDefaultTransactionTypes.AUTHORIZE_AND_CAPTURE
transactions.- Parameters:
braintreePaymentRequest
- the request bodyapplicationId
- the application idtenantId
- the tenant idnonce
- 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 theDefaultTransactionTypes.REVERSE_AUTH
transactions.- Parameters:
transactionId
- the transaction id to reverseapplicationId
- the application idtenantId
- 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 theDefaultTransactionTypes.CAPTURE
transactions.- Parameters:
transactionId
- the transaction id to capturebraintreePaymentRequest
- the request bodyapplicationId
- the application idtenantId
- 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 theDefaultTransactionTypes.REFUND
transactions.- Parameters:
transactionId
- the transaction id to reversebraintreePaymentRequest
- the request bodyapplicationId
- the application idtenantId
- 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 reverseapplicationId
- the application idtenantId
- the tenant id- Returns:
- the response from Braintree API
- Throws:
ProviderApiException
- if the request failed
-