Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.Este conteúdo não está disponível no idioma selecionado.
Chapter 16. Braintree
Braintree Component Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Available as of Camel 2.17
The Braintree component provides access to Braintree Payments services which support the following payment methods:
In order to use
camel-braintree
, you need to provide some API credentials, which you can obtain from your account (Sandbox or Production).
Maven users will need to add the following dependency to their
pom.xml
for this component:
URI format Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
braintree://endpoint-prefix/endpoint?[options]
braintree://endpoint-prefix/endpoint?[options]
Endpoint prefix can be one of:
addOn
address
clientToken
creditCardverification
customer
discount
merchantAccount
paymentmethod
paymentmethodNonce
plan
settlementBatchSummary
subscription
transaction
webhookNotification
BraintreeComponent Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The Braintree Component can be configured with the options below. These options can be provided using the component's bean property configuration of type org.apache.camel.component.braintree.BraintreeConfiguration.
Option | Type | Description |
---|---|---|
environment
|
String
|
value that specifies where requests should be directed – sandbox or production |
merchantId
|
String
|
a unique identifier for your gateway account, which is different than your merchant account ID |
publicKey
|
String
|
user-specific public identifier |
privateKey
|
String
|
user-specific secure identifier that should not be shared – even with us! |
httpLogLevel
|
java.util.logging.Level
|
camel 2.17.1 Logging level for HTTP calls |
httpLogName
|
String
|
camel 2.17.1 Log category to use to log http calls, default "Braintree" |
httpReadTimeout
|
Integer
|
camel 2.17.1 Read timeout for HTTP calls |
All the options above are provided by Braintree Payments
Producer Endpoints: Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Producer endpoints can use endpoint prefixes followed by endpoint names and associated options described next. A shorthand alias can be used for some endpoints. The endpoint URI MUST contain a prefix.
Endpoint options that are not mandatory are denoted by []. When there are no mandatory options for an endpoint, one of the set of [] options MUST be provided. Producer endpoints can also use a special option inBody that in turn should contain the name of the endpoint option whose value will be contained in the Camel Exchange In message.
Any of the endpoint options can be provided in either the endpoint URI, or dynamically in a message header. The message header name must be of the format CamelBraintree.<option>. Note that the inBody option overrides message header, i.e. the endpoint option inBody=option would override a CamelBraintree.option header.
For more information on the endpoints and options see Braintree references at https://developers.braintreepayments.com/reference/overview
Endpoint prefix addOn Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix addOn as follows:
braintree://addOn/endpoint
braintree://addOn/endpoint
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
all | List<com.braintreegateway.Addon> |
Endpoint prefix address Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix address as follows:
braintree://address/endpoint?[options]
braintree://address/endpoint?[options]
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
create
|
customerId , request
|
com.braintreegateway.Result<com.braintreegateway.Address>
|
|
delete
|
customerId, id
|
com.braintreegateway.Result< com.braintreegateway.Address>
|
|
find
|
customerId, id
|
com.braintreegateway.Address
|
|
update
|
customerId, id, request
|
com.braintreegateway.Result<com.braintreegateway.Address>
|
Name | Type |
---|---|
customerId
|
String
|
request
|
com.braintreegateway.AddressRequest
|
id
|
String
|
Endpoint prefix clientToken Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix clientToken as follows:
braintree://clientToken/endpoint?[options]
braintree://clientToken/endpoint?[options]
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
generate
|
request
|
String
|
Name | Type |
---|---|
request
|
com.braintreegateway.ClientTokenrequest
|
Endpoint prefix creditCardVerification Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix creditCardverification as follows:
braintree://creditCardVerification/endpoint?[options]
braintree://creditCardVerification/endpoint?[options]
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
find
|
id
|
com.braintreegateway. CreditCardVerification
|
|
search
|
query
|
com.braintreegateway.ResourceCollection<com.braintreegateway.CreditCardVerification>
|
Name | Type |
---|---|
id
|
String
|
query
|
com.braintreegateway. CreditCardVerificationSearchRequest
|
Endpoint prefix customer Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix customer as follows:
braintree://customer/endpoint?[options]
braintree://customer/endpoint?[options]
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
all | |||
create | request | com.braintreegateway.Result<com.braintreegateway.Customer> | |
delete | id |
com.braintreegateway.Result<com.braintreegateway.Customer>
|
|
find | id |
com.braintreegateway.Customer
|
|
search | query |
com.braintreegateway. ResourceCollection< com.braintreegateway.Customer >
|
|
update | id, request |
com.braintreegateway.Result<com.braintreegateway.Customer>
|
Name | Type |
---|---|
id | String |
request |
com.braintreegateway.CustomerRequest
|
query |
com.braintreegateway.CustomerSearchRequest
|
Endpoint prefix discount Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix discount as follows:
braintree://discount/endpoint
braintree://discount/endpoint
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
all | List<com.braintreegateway.Discount> |
Endpoint prefix merchantAccount Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix merchantAccount as follows:
braintree://merchantAccount/endpoint?[options]
braintree://merchantAccount/endpoint?[options]
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
create | request | com.braintreegateway.Result<com.braintreegateway.MerchantAccount> | |
find | id | com.braintreegateway.MerchantAccount | |
update | id, request | com.braintreegateway.Result<com.braintreegateway.MerchantAccount> |
Name | Type |
---|---|
id | String |
request |
com.braintreegateway.MerchantAccountRequest
|
Endpoint prefix paymentMethod Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix paymentMethod as follows:
braintree://paymentMethod/endpoint?[options]
braintree://paymentMethod/endpoint?[options]
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
create | request | com.braintreegateway.Result<com.braintreegateway.PaymentMethod> | |
delete | token |
com.braintreegateway.Result<com.braintreegateway. PaymentMethod >
|
|
find |
token
|
com.braintreegateway.PaymentMethod | |
update |
token , request
|
com.braintreegateway.Result<com.braintreegateway.PaymentMethod> |
Name | Type |
---|---|
token | String |
request | com.braintreegateway.PaymentMethodRequest |
Endpoint prefix paymentMethodNonce Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix paymentMethodNonce as follows:
braintree://paymentMethodNonce/endpoint?[options]
braintree://paymentMethodNonce/endpoint?[options]
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
create | paymentMethodToken | com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce> | |
find | paymentMethodNonce | com.braintreegateway.PaymentMethodNonce |
Name | Type |
---|---|
paymentMethodToken
|
String |
paymentMethodNonce
|
String
|
Endpoint prefix plan Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix plan as follows:
braintree://plan/endpoint
braintree://plan/endpoint
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
all | List<com.braintreegateway.Plan> |
Endpoint prefix settlementBatchSummary Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix settlementBatchSummary as follows:
braintree://settlementBatchSummary/endpoint?[options]
braintree://settlementBatchSummary/endpoint?[options]
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
generate | request |
com.braintreegateway.Result<com.braintreegateway. SettlementBatchSummary>
|
Name | Type |
---|---|
settlementDate | Calendar |
groupByCustomField | String |
Endpoint prefix subscription Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix subscription as follows:
braintree://subscription/endpoint?[options]
braintree://subscription/endpoint?[options]
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
cancel | id |
com.braintreegateway.Result<com.braintreegateway. Subscription>
|
|
create | request |
com.braintreegateway.Result<com.braintreegateway.Subscription >
|
|
delete | customerId, id |
com.braintreegateway.Result<com.braintreegateway.Subscription >
|
|
find | id |
com.braintreegateway. Subscription
|
|
retryCharge | subscriptionId, amount |
com.braintreegateway.Result<com.braintreegateway.Transaction>
|
|
search | searchRequest |
com.braintreegateway.ResourceCollection<com.braintreegateway.Subscription >
|
|
update | id, request |
com.braintreegateway.Result<com.braintreegateway.Subscription >
|
Name | Type |
---|---|
id | String |
request | com.braintreegateway.SubscriptionRequest |
customerId
|
String |
subscriptionId
|
String |
amount
|
BigDecimal |
searchRequest
|
com.braintreegateway.SubscriptionSearchRequest. |
Endpoint prefix transaction Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix transaction as follows:
braintree://transaction/endpoint?[options]
braintree://transaction/endpoint?[options]
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
cancelRelease | id |
com.braintreegateway.Result<com.braintreegateway.Transaction >
|
|
cloneTransaction | id, cloneRequest |
com.braintreegateway.Result<com.braintreegateway.Transaction >
|
|
credit | request |
com.braintreegateway.Result<com.braintreegateway.Transaction >
|
|
find | id | com.braintreegateway.Transaction | |
holdInEscrow | id | com.braintreegateway.Result<com.braintreegateway.Transaction> | |
releaseFromEscrow |
id
|
com.braintreegateway.Result<com.braintreegateway.Transaction>
|
|
refund | id, amount |
com.braintreegateway.Result<com.braintreegateway.Transaction >
|
|
sale | request |
com.braintreegateway.Result<com.braintreegateway. Transaction >
|
|
search | query |
com.braintreegateway.ResourceCollection<com.braintreegateway.Transaction>
|
|
submitForPartialSettlement | id, amount |
com.braintreegateway.Result<com.braintreegateway. Transaction >
|
|
submitForSettlement | id, amount, request |
com.braintreegateway.Result<com.braintreegateway. Transaction >
|
|
voidTransaction | id |
com.braintreegateway.Result<com.braintreegateway. Transaction >
|
Name | Type |
---|---|
id | String |
request | com.braintreegateway.TransactionCloneRequest |
cloneRequest
|
com.braintreegateway.TransactionCloneRequest |
amount | BigDecimal |
query
|
com.braintreegateway.TransactionSearchRequest |
Endpoint prefix webhookNotification Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
The following endpoints can be invoked with the prefix webhookNotification as follows:
braintree://webhookNotification/endpoint?[options]
braintree://webhookNotification/endpoint?[options]
Endpoint | Shorthand Alias | Options | Result Body Type |
---|---|---|---|
parse | signature, payload | com.braintreegateway.WebhookNotification | |
verify | challenge | String |
Name | Type |
---|---|
signature
|
String
|
payload
|
String |
challenge
|
String
|
Consumer Endpoints Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Any of the producer endpoints can be used as a consumer endpoint. Consumer endpoints can use Scheduled Poll Consumer Options with a consumer. prefix to schedule endpoint invocation. By default Consumer endpoints that return an array or collection will generate one exchange per element, and their routes will be executed once for each exchange. To change this behavior use the property consumer.splitResults=true to return a single exchange for the entire list or array.
Message Headers Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
Any URI option can be provided in a message header for producer endpoints with a CamelBraintree. prefix.
Message body Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!
All result message bodies utilize objects provided by the Braintree Java SDK. Producer endpoints can specify the option name for incoming message body in the inBody endpoint parameter.
Examples Copiar o linkLink copiado para a área de transferência!
Copiar o linkLink copiado para a área de transferência!