Braintree
Braintree (Braintree 컴포넌트)
Braintree 컴포넌트는 Braintree Payments의 Java SDK를 통해 Braintree 결제 서비스에 접근하게 해 줘요. 프로듀서 전용 컴포넌트라서 라우트에서 고객·구독·거래 같은 17개 API를 호출하는 데 쓰입니다. 계정 연결에 필요한 자격 증명 설정부터 각 API의 메서드와 파라미터 구성까지 아래에서 하나씩 짚어 볼게요.
출처: 문서
본문
Camel 2.17부터 지원
프로듀서만 지원해요
Braintree 컴포넌트는 Braintree Payments의 Java SDK를 통해 Braintree에 접근하게 해 줘요.
모든 클라이언트 애플리케이션은 결제를 처리하려면 API 자격 증명이 필요해요. 내 계정으로 camel-braintree를 쓰려면 새 Sandbox 또는 Production 계정을 만들어야 합니다.
Maven 사용자는 이 컴포넌트를 쓰려면 pom.xml에 다음 의존성을 추가해야 해요:
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-braintree</artifactId>
<version>${camel-version}</version>
</dependency>
옵션 설정 방법 (Configuring Options)
Camel 컴포넌트는 두 단계로 나눠 설정합니다:
-
컴포넌트(component) 레벨
-
엔드포인트(endpoint) 레벨
컴포넌트 옵션 설정 (Configuring Component Options)
컴포넌트 레벨에서는 엔드포인트들이 물려받는 공통·일반 설정을 정해요. 설정 계층 중 가장 위에 해당합니다. 예를 들어 컴포넌트에는 보안 설정, 인증용 자격 증명, 네트워크 연결 URL 같은 것들이 들어가죠.
컴포넌트마다 옵션이 몇 개뿐인 경우도 있고 많은 경우도 있어요. 컴포넌트는 보통 널리 쓰는 기본값을 이미 갖고 있어서, 옵션을 몇 개만 설정하거나 아예 안 건드려도 되는 경우가 많습니다.
컴포넌트 설정 방법은 이렇게 있어요:
-
설정 파일(
application.properties,*.yaml파일 등). -
Java 코드에서 직접.
엔드포인트 옵션 설정 (Configuring Endpoint Options)
엔드포인트는 옵션이 많아서 설정에 시간을 더 쓰게 됩니다. 이 옵션들로 엔드포인트가 어떻게 동작할지 원하는 대로 조정할 수 있어요. 옵션은 엔드포인트를 consumer(from)로 쓰는지, producer(to)로 쓰는지, 둘 다 쓰는지에 따라 나눠집니다.
엔드포인트 설정은 보통 엔드포인트 URI에 _path_와 query 파라미터로 직접 하는 경우가 많아요. Java에서 엔드포인트와 데이터 포맷을 _타입 세이프_하게 설정하려면 Endpoint DSL과 DataFormat DSL을 쓸 수도 있습니다. 옵션을 설정할 때 좋은 습관은 프로퍼티 플레이스홀더를 쓰는 거예요. 플레이스홀더를 쓰면 이런 점이 좋아요:
-
URL, 포트 번호, 민감한 정보 등을 코드에 하드코딩하는 걸 막아줘요.
-
설정을 코드 밖으로 분리할 수 있어요.
-
코드가 더 유연해지고 재사용하기 좋아집니다.
아래 두 섹션에서 모든 옵션을 컴포넌트 먼저, 그다음 엔드포인트 순으로 나열해요.
컴포넌트 옵션 (Component Options)
Braintree 컴포넌트가 지원하는 옵션은 아래와 같아요.
| Name | Description | Default | Type |
|---|---|---|---|
| lazyStartProducer (producer) | producer를 lazy(첫 메시지 시점)로 시작할지 여부예요. lazy 시작을 쓰면 producer가 시작 중 실패해서 라우트 시작이 실패하는 상황에서도 CamelContext와 라우트가 시작될 수 있고, 시작 실패 처리를 Camel의 라우팅 에러 핸들러로 넘길 수 있어요. 다만 첫 메시지 처리 시점에 producer를 만들고 시작하는 데 시간이 좀 걸려서 전체 처리 시간이 길어질 수 있는 점은 유의하세요. | false | boolean |
| autowiredEnabled (advanced) | 오토와이어링 사용 여부예요. 레지스트리에서 일치하는 타입의 인스턴스가 하나만 있는지 찾아서 컴포넌트에 자동으로 설정하는(옵션이 autowired로 표시돼 있어야 함) 자동 오토와이어링에 쓰입니다. JDBC 데이터 소스, JMS 커넥션 팩토리, AWS 클라이언트 등을 자동 설정할 때 유용해요. | true | boolean |
| configuration (advanced) | 컴포넌트 설정이에요. | BraintreeConfiguration |
엔드포인트 옵션 (Endpoint Options)
Braintree 엔드포인트는 다음 URI 문법으로 설정해요:
braintree:apiName/methodName
다음 _path_와 query 파라미터를 씁니다:
경로 파라미터 (Path Parameters)
| Name | Description | Default | Type |
|---|---|---|---|
| apiName (producer) |
필수 수행할 연산 종류예요.
Enum values:
-
ADD_ON
-
ADDRESS
-
CLIENT_TOKEN
-
CREDIT_CARD_VERIFICATION
-
CUSTOMER
-
DISCOUNT
-
DISPUTE
-
DOCUMENT_UPLOAD
-
MERCHANT_ACCOUNT
-
PAYMENT_METHOD
-
PAYMENT_METHOD_NONCE
-
OAUTH
-
PLAN
-
REPORT
-
SETTLEMENT_BATCH_SUMMARY
-
SUBSCRIPTION
-
TRANSACTION
-
US_BANK_ACCOUNT
-
WEBHOOK_NOTIFICATION
| | BraintreeApiName | | methodName (producer) |
필수 선택한 연산에 사용할 하위 연산이에요.
Enum values:
-
accept
-
addFileEvidence
-
addTextEvidence
-
cancel
-
cancelRelease
-
cloneTransaction
-
create
-
createForCurrency
-
credit
-
delete
-
fetchMerchantAccounts
-
finalize
-
find
-
generate
-
grant
-
holdInEscrow
-
parse
-
refund
-
releaseFromEscrow
-
removeEvidence
-
retryCharge
-
revoke
-
sale
-
search
-
submitForPartialSettlement
-
submitForSettlement
-
transactionLevelFees
-
update
-
updateDetails
-
verify
-
voidTransaction
| | String |
쿼리 파라미터 (Query Parameters)
| Name | Description | Default | Type |
|---|---|---|---|
| environment (producer) | 환경이에요. SANDBOX 또는 PRODUCTION을 지정해요. | String | |
| inBody (producer) | exchange In Body로 전달할 파라미터의 이름을 설정해요. | String | |
| merchantId (producer) | Braintree가 제공하는 가맹점(merchant) ID예요. | String | |
| lazyStartProducer (producer (advanced)) | producer를 lazy(첫 메시지 시점)로 시작할지 여부예요. lazy 시작을 쓰면 producer가 시작 중 실패해서 라우트 시작이 실패하는 상황에서도 CamelContext와 라우트가 시작될 수 있고, 시작 실패 처리를 Camel의 라우팅 에러 핸들러로 넘길 수 있어요. 다만 첫 메시지 처리 시점에 producer를 만들고 시작하는 데 시간이 좀 걸려서 전체 처리 시간이 길어질 수 있는 점은 유의하세요. | false | boolean |
| httpReadTimeout (advanced) | HTTP 호출의 읽기(read) 타임아웃을 설정해요. | Integer | |
| httpLogLevel (logging) |
HTTP 호출의 로깅 레벨을 설정해요. 자세한 건 java.util.logging.Level를 보세요.
Enum values:
-
OFF
-
SEVERE
-
WARNING
-
INFO
-
CONFIG
-
FINE
-
FINER
-
FINEST
-
ALL
| | String | | httpLogName (logging) | HTTP 호출을 기록할 때 쓸 로그 카테고리를 설정해요. | Braintree | String | | logHandlerEnabled (logging) | BraintreeLogHandler를 켤지 설정해요. classpath에 이미 JUL - SLF4J 로거 브리지가 있으면 'false'로 두는 게 좋을 수 있어요. 이 옵션은 BraintreeComponent에서 전역으로 설정할 수도 있습니다. | true | boolean | | proxyHost (proxy) | 프록시 호스트예요. | | String | | proxyPort (proxy) | 프록시 포트예요. | | Integer | | accessToken (security) | 한 가맹점이 다른 가맹점을 대신해 거래를 처리할 수 있도록 부여한 액세스 토큰이에요. environment, merchant id, public key, private key 필드 대신 씁니다. | | String | | privateKey (security) | Braintree가 제공하는 프라이빗 키예요. | | String | | publicKey (security) | Braintree가 제공하는 퍼블릭 키예요. | | String |
API 파라미터 (API Parameters, 17개 API)
Braintree 엔드포인트는 API 기반 컴포넌트라서 어떤 API 이름과 API 메서드를 쓰느냐에 따라 추가 파라미터가 붙어요. API 이름과 API 메서드는 엔드포인트 URI에서 apiName/methodName path 파라미터로 지정해요:
braintree:apiName/methodName
API 이름은 아래 표에 나온 것처럼 17개가 있어요:
| API Name | Type | Description |
|---|---|---|
| address | Producer | Address 객체를 만들고, 삭제하고, 찾고, 업데이트하는 메서드를 제공해요 |
| clientToken | Producer | 가맹점을 대신해 직접 보내는 요청을 인증할 때 쓰는 클라이언트 토큰을 생성해요. 이 클래스는 직접 인스턴스화할 필요가 없어요 |
| creditCardVerification | Producer | 신용카드 정보를 검증해요 |
| customer | Producer | Customer 객체를 만들고, 삭제하고, 찾고, 업데이트하는 메서드를 제공해요 |
| dispute | Producer | Dispute 객체와 상호작용하는 메서드를 제공해요 |
| documentUpload | Producer | 증빙(evidence) 문서를 업로드하는 API예요 |
| merchantAccount | Producer | MerchantAccount 객체를 만들고, 찾고, 업데이트하는 메서드를 제공해요 |
| oauth | Producer | |
| paymentMethod | Producer | 결제와 상호작용하는 메서드를 제공해요 |
| paymentMethodNonce | Producer | nonce 결제와 상호작용하는 메서드를 제공해요 |
| plan | Producer | |
| report | Producer | 리포트와 상호작용하는 메서드를 제공해요 |
| settlementBatchSummary | Producer | 정산(settlement) 요약과 상호작용하는 메서드를 제공해요 |
| subscription | Producer | Subscription 객체와 상호작용하는 메서드를 제공해요 |
| transaction | Producer | Transaction 객체와 상호작용하는 메서드를 제공해요 |
| usBankAccount | Producer | |
| webhookNotification | Producer | 웹훅으로 알림을 가져와요 |
각 API는 아래 이어지는 섹션에서 하나씩 자세히 설명해요.
address API
프로듀서만 지원해요
address API의 문법은 다음과 같이 정의돼 있어요:
braintree:address/methodName?[parameters]
4개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [create | 고객(Customer)의 Address를 만들어요 | |
| [delete | 고객의 Address를 삭제해요 | |
| [find | 고객의 Address를 찾아요 | |
| [update | 고객의 Address를 업데이트해요 |
create 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Address> create(String customerId, com.braintreegateway.AddressRequest request);
braintree/create API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| customerId | Customer의 id예요 | String |
| request | 요청 객체예요 | AddressRequest |
delete 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Address> delete(String customerId, String id);
braintree/delete API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| customerId | Customer의 id예요 | String |
| id | 삭제할 Address의 id예요 | String |
find 메서드
시그니처:
- com.braintreegateway.Address find(String customerId, String id);
braintree/find API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| customerId | Customer의 id예요 | String |
| id | Address의 id예요 | String |
update 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Address> update(String customerId, String id, com.braintreegateway.AddressRequest request);
braintree/update API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| customerId | Customer의 id예요 | String |
| id | Address의 id예요 | String |
| request | AddressRequest 파라미터를 담은 요청 객체예요 | AddressRequest |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
clientToken API
프로듀서만 지원해요
clientToken API의 문법은 다음과 같이 정의돼 있어요:
braintree:clientToken/methodName?[parameters]
1개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [generate |
generate 메서드
시그니처:
- String generate();
- String generate(com.braintreegateway.ClientTokenRequest request);
braintree/generate API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
creditCardVerification API
프로듀서만 지원해요
creditCardVerification API의 문법은 다음과 같이 정의돼 있어요:
braintree:creditCardVerification/methodName?[parameters]
3개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [create | ||
| [find | ||
| [search |
create 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.CreditCardVerification> create(com.braintreegateway.CreditCardVerificationRequest request);
braintree/create API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request |
find 메서드
시그니처:
- com.braintreegateway.CreditCardVerification find(String id);
braintree/find API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id |
search 메서드
시그니처:
- com.braintreegateway.ResourceCollection<com.braintreegateway.CreditCardVerification> search(com.braintreegateway.CreditCardVerificationSearchRequest query);
braintree/search API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| query |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
customer API
프로듀서만 지원해요
customer API의 문법은 다음과 같이 정의돼 있어요:
braintree:customer/methodName?[parameters]
6개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [all | 모든 Customer를 찾아 ResourceCollection으로 돌려줘요 | |
| [create | Customer를 만들어요 | |
| [delete | id로 Customer를 삭제해요 | |
| [find | id로 Customer를 찾아요 | |
| [search | 쿼리에 맞는 모든 Transaction을 찾아 ResourceCollection으로 돌려줘요 | |
| [update | Customer를 업데이트해요 |
all 메서드
시그니처:
- com.braintreegateway.ResourceCollection<com.braintreegateway.Customer> all();
braintree/all API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|
create 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Customer> create(com.braintreegateway.CustomerRequest request);
braintree/create API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request | 요청이에요 | CustomerRequest |
delete 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Customer> delete(String id);
braintree/delete API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | Customer의 id예요 | String |
find 메서드
시그니처:
- com.braintreegateway.Customer find(String id);
- com.braintreegateway.Customer find(String id, String associationFilterId);
braintree/find API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| associationFilterId | 사용할 연관 필터(association filter)의 id예요 | String |
| id | Customer의 id예요 | String |
search 메서드
시그니처:
- com.braintreegateway.ResourceCollection<com.braintreegateway.Customer> search(com.braintreegateway.CustomerSearchRequest query);
braintree/search API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| query | 검색에 사용할 요청 쿼리예요 | CustomerSearchRequest |
update 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Customer> update(String id, com.braintreegateway.CustomerRequest request);
braintree/update API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | Customer의 id예요 | String |
| request | 요청이에요 | CustomerRequest |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
dispute API
프로듀서만 지원해요
dispute API의 문법은 다음과 같이 정의돼 있어요:
braintree:dispute/methodName?[parameters]
7개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [accept | 주어진 dispute ID로 Dispute를 수락해요 | |
| [addFileEvidence | 주어진 ID와 FileEvidenceRequest(파일 증빙 요청)로 Dispute에 파일 증빙을 추가해요 | |
| [addTextEvidence | 주어진 ID와 내용으로 Dispute에 텍스트 증빙을 추가해요 | |
| [finalize | 주어진 ID로 Dispute를 확정(finalize)해요 | |
| [find | 주어진 ID에 해당하는 Dispute를 돌려줘요 | |
| [removeEvidence | 주어진 ID와 DisputeEvidence ID로 Dispute에서 증빙을 제거해요 | |
| [search | 쿼리에 맞는 모든 Dispute를 찾아요 |
accept 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Dispute> accept(String id);
braintree/accept API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | 수락할 dispute의 id예요 | String |
addFileEvidence 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.DisputeEvidence> addFileEvidence(String disputeId, String documentId);
- com.braintreegateway.Result<com.braintreegateway.DisputeEvidence> addFileEvidence(String disputeId, com.braintreegateway.FileEvidenceRequest fileEvidenceRequest);
braintree/addFileEvidence API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| disputeId | 증빙을 추가할 dispute의 id예요 | String |
| documentId | 미리 업로드해 둔 문서의 문서 id예요 | String |
| fileEvidenceRequest | dispute의 파일 증빙 요청이에요 | FileEvidenceRequest |
addTextEvidence 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.DisputeEvidence> addTextEvidence(String id, String content);
- com.braintreegateway.Result<com.braintreegateway.DisputeEvidence> addTextEvidence(String id, com.braintreegateway.TextEvidenceRequest textEvidenceRequest);
braintree/addTextEvidence API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| content | dispute의 텍스트 증빙 내용이에요 | String |
| id | 텍스트 증빙을 추가할 dispute의 id예요 | String |
| textEvidenceRequest | dispute의 텍스트 증빙 요청이에요 | TextEvidenceRequest |
finalize 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Dispute> finalize(String id);
braintree/finalize API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | 확정할 dispute의 id예요 | String |
find 메서드
시그니처:
- com.braintreegateway.Dispute find(String id);
braintree/find API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | 찾을 dispute의 id예요 | String |
removeEvidence 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Dispute> removeEvidence(String disputeId, String evidenceId);
braintree/removeEvidence API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| disputeId | 증빙을 제거할 dispute의 id예요 | String |
| evidenceId | 제거할 증빙의 id예요 | String |
search 메서드
시그니처:
- com.braintreegateway.PaginatedCollection<com.braintreegateway.Dispute> search(com.braintreegateway.DisputeSearchRequest query);
braintree/search API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| query | 어떤 dispute를 찾을지 정하는 쿼리예요 | DisputeSearchRequest |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
documentUpload API
프로듀서만 지원해요
documentUpload API의 문법은 다음과 같이 정의돼 있어요:
braintree:documentUpload/methodName?[parameters]
1개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [create |
create 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.DocumentUpload> create(com.braintreegateway.DocumentUploadRequest request);
braintree/create API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
merchantAccount API
프로듀서만 지원해요
merchantAccount API의 문법은 다음과 같이 정의돼 있어요:
braintree:merchantAccount/methodName?[parameters]
4개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [all | ||
| [createForCurrency | ||
| [fetchMerchantAccounts | ||
| [find |
all 메서드
시그니처:
- com.braintreegateway.PaginatedCollection<com.braintreegateway.MerchantAccount> all();
braintree/all API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|
createForCurrency 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.MerchantAccount> createForCurrency(com.braintreegateway.MerchantAccountCreateForCurrencyRequest request);
braintree/createForCurrency API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| currencyRequest |
fetchMerchantAccounts 메서드
시그니처:
- com.braintreegateway.PaginatedResult<com.braintreegateway.MerchantAccount> fetchMerchantAccounts(int page);
braintree/fetchMerchantAccounts API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| page |
find 메서드
시그니처:
- com.braintreegateway.MerchantAccount find(String id);
braintree/find API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
oauth API
프로듀서만 지원해요
oauth API의 문법은 다음과 같이 정의돼 있어요:
braintree:oauth/methodName?[parameters]
4개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [connectUrl | ||
| [createTokenFromCode | ||
| [createTokenFromRefreshToken | ||
| [revokeAccessToken |
connectUrl 메서드
시그니처:
- String connectUrl(com.braintreegateway.OAuthConnectUrlRequest request);
braintree/connectUrl API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| connectRequest |
createTokenFromCode 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.OAuthCredentials> createTokenFromCode(com.braintreegateway.OAuthCredentialsRequest request);
braintree/createTokenFromCode API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request |
createTokenFromRefreshToken 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.OAuthCredentials> createTokenFromRefreshToken(com.braintreegateway.OAuthCredentialsRequest request);
braintree/createTokenFromRefreshToken API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request |
revokeAccessToken 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.OAuthResult> revokeAccessToken(String accessToken);
braintree/revokeAccessToken API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| accessToken |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
paymentMethod API
프로듀서만 지원해요
paymentMethod API의 문법은 다음과 같이 정의돼 있어요:
braintree:paymentMethod/methodName?[parameters]
6개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [create | ||
| [delete | ||
| [find | ||
| [grant | ||
| [revoke | ||
| [update |
create 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.? extends PaymentMethod> create(com.braintreegateway.PaymentMethodRequest request);
braintree/create API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request |
delete 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.? extends PaymentMethod> delete(String token);
- com.braintreegateway.Result<com.braintreegateway.? extends PaymentMethod> delete(String token, com.braintreegateway.PaymentMethodDeleteRequest request);
braintree/delete API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| deleteRequest | ||
| token |
find 메서드
시그니처:
- com.braintreegateway.PaymentMethod find(String token);
braintree/find API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| token |
grant 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce> grant(String token);
- com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce> grant(String token, com.braintreegateway.PaymentMethodGrantRequest grantRequest);
braintree/grant API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| grantRequest | ||
| token |
revoke 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.? extends PaymentMethod> revoke(String token);
braintree/revoke API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| token |
update 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.? extends PaymentMethod> update(String token, com.braintreegateway.PaymentMethodRequest request);
braintree/update API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request | ||
| token |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
paymentMethodNonce API
프로듀서만 지원해요
paymentMethodNonce API의 문법은 다음과 같이 정의돼 있어요:
braintree:paymentMethodNonce/methodName?[parameters]
2개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [create | ||
| [find |
create 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce> create(String paymentMethodToken);
- com.braintreegateway.Result<com.braintreegateway.PaymentMethodNonce> create(com.braintreegateway.PaymentMethodNonceRequest request);
braintree/create API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| paymentMethodToken | ||
| request |
find 메서드
시그니처:
- com.braintreegateway.PaymentMethodNonce find(String paymentMethodNonce);
braintree/find API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| paymentMethodNonce |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
plan API
프로듀서만 지원해요
plan API의 문법은 다음과 같이 정의돼 있어요:
braintree:plan/methodName?[parameters]
4개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [all | ||
| [create | ||
| [find | ||
| [update |
all 메서드
시그니처:
- java.util.List<com.braintreegateway.Plan> all();
braintree/all API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|
create 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Plan> create(com.braintreegateway.PlanRequest request);
braintree/create API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request |
find 메서드
시그니처:
- com.braintreegateway.Plan find(String id);
braintree/find API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id |
update 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Plan> update(String id, com.braintreegateway.PlanRequest request);
braintree/update API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | ||
| request |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
report API
프로듀서만 지원해요
report API의 문법은 다음과 같이 정의돼 있어요:
braintree:report/methodName?[parameters]
1개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [transactionLevelFees | Transaction-Level Fee Report를 가져와요 |
transactionLevelFees 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.TransactionLevelFeeReport> transactionLevelFees(com.braintreegateway.TransactionLevelFeeReportRequest request);
braintree/transactionLevelFees API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request | 요청이에요 | TransactionLevelFeeReportRequest |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
settlementBatchSummary API
프로듀서만 지원해요
settlementBatchSummary API의 문법은 다음과 같이 정의돼 있어요:
braintree:settlementBatchSummary/methodName?[parameters]
1개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [generate |
generate 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.SettlementBatchSummary> generate(java.util.Calendar settlementDate);
- com.braintreegateway.Result<com.braintreegateway.SettlementBatchSummary> generate(java.util.Calendar settlementDate, String groupByCustomField);
braintree/generate API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| groupByCustomField | ||
| settlementDate |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
subscription API
프로듀서만 지원해요
subscription API의 문법은 다음과 같이 정의돼 있어요:
braintree:subscription/methodName?[parameters]
7개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [cancel | 주어진 id의 Subscription을 취소해요 | |
| [create | Subscription을 만들어요 | |
| [delete | ||
| [find | id로 Subscription을 찾아요 | |
| [retryCharge | ||
| [search | Subscription을 검색해요 | |
| [update | Subscription을 업데이트해요 |
cancel 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Subscription> cancel(String id);
braintree/cancel API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | 취소할 Subscription의 id예요 | String |
create 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Subscription> create(com.braintreegateway.SubscriptionRequest request);
braintree/create API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request | 요청이에요 | SubscriptionRequest |
delete 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Subscription> delete(String customerId, String id);
braintree/delete API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| customerId | ||
| id |
find 메서드
시그니처:
- com.braintreegateway.Subscription find(String id);
braintree/find API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | Subscription의 id예요 | String |
retryCharge 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> retryCharge(String subscriptionId);
- com.braintreegateway.Result<com.braintreegateway.Transaction> retryCharge(String subscriptionId, Boolean submitForSettlement);
- com.braintreegateway.Result<com.braintreegateway.Transaction> retryCharge(String subscriptionId, java.math.BigDecimal amount);
- com.braintreegateway.Result<com.braintreegateway.Transaction> retryCharge(String subscriptionId, java.math.BigDecimal amount, Boolean submitForSettlement);
braintree/retryCharge API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| amount | ||
| submitForSettlement | ||
| subscriptionId |
search 메서드
시그니처:
- com.braintreegateway.ResourceCollection<com.braintreegateway.Subscription> search(com.braintreegateway.SubscriptionSearchRequest searchRequest);
braintree/search API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| searchRequest | SubscriptionSearchRequest예요 | SubscriptionSearchRequest |
update 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Subscription> update(String id, com.braintreegateway.SubscriptionRequest request);
braintree/update API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | Subscription의 id예요 | String |
| request | 요청이에요 | SubscriptionRequest |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
transaction API
프로듀서만 지원해요
transaction API의 문법은 다음과 같이 정의돼 있어요:
braintree:transaction/methodName?[parameters]
15개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [adjustAuthorization | 주어진 id의 거래를, 승인 금액 이하의 주어진 금액으로 조정하도록 제출해요 | |
| [cancelRelease | 주어진 id의 거래에 대해 escrow에서 보류 중인 release를 취소해요 | |
| [cloneTransaction | ||
| [credit | credit(입금) Transaction을 만들어요 | |
| [find | id로 Transaction을 찾아요 | |
| [packageTracking | 거래에 패키지 배송 추적 정보를 보충해요 | |
| [refund | 이전 sale Transaction의 전체 또는 일부를 환불해요 | |
| [releaseFromEscrow | 주어진 id의 거래를 release 대상으로 제출해요 | |
| [sale | sale(판매) Transaction을 만들어요 | |
| [search | 쿼리에 맞는 모든 Transaction을 찾아 ResourceCollection으로 돌려줘요 | |
| [submitForPartialSettlement | 주어진 id에 대해 부분 정산(partial settlement) 거래를 제출해요 | |
| [submitForSettlement | 주어진 id의 거래를 TransactionRequest 객체와 함께 정산 대상으로 제출해요 | |
| [updateCustomFields | 주어진 거래의 커스텀 필드 값을 업데이트해요 | |
| [updateDetails | 정산 제출이 끝난 거래의 상세 정보를 업데이트해요 | |
| [voidTransaction | 주어진 id의 거래를 무효(void) 처리해요 |
adjustAuthorization 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> adjustAuthorization(String id, com.braintreegateway.TransactionRequest request);
- com.braintreegateway.Result<com.braintreegateway.Transaction> adjustAuthorization(String id, java.math.BigDecimal amount);
braintree/adjustAuthorization API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| amount | 조정할 금액이에요 | BigDecimal |
| id | 조정할 거래의 id예요 | String |
| request | 금액 상세를 담은 TransactionRequest 객체예요 | TransactionRequest |
cancelRelease 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> cancelRelease(String id);
braintree/cancelRelease API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | escrow에서 release를 취소할 거래의 id예요 | String |
cloneTransaction 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> cloneTransaction(String id, com.braintreegateway.TransactionCloneRequest request);
braintree/cloneTransaction API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| cloneRequest | ||
| id |
credit 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> credit(com.braintreegateway.TransactionRequest request);
braintree/credit API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request | 요청이에요 | TransactionRequest |
find 메서드
시그니처:
- com.braintreegateway.Transaction find(String id);
braintree/find API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | Transaction의 id예요 | String |
packageTracking 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> packageTracking(String id, com.braintreegateway.PackageTrackingRequest packageTrackingRequest);
braintree/packageTracking API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | 패키지 상세를 보충할 거래의 id예요 | String |
| packageTrackingRequest | 거래와 관련된 패키지 추적 요청이에요 | PackageTrackingRequest |
refund 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> refund(String id);
- com.braintreegateway.Result<com.braintreegateway.Transaction> refund(String id, com.braintreegateway.TransactionRefundRequest request);
- com.braintreegateway.Result<com.braintreegateway.Transaction> refund(String id, java.math.BigDecimal amount);
braintree/refund API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| amount | ||
| id | ||
| refundRequest |
releaseFromEscrow 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> releaseFromEscrow(String id);
braintree/releaseFromEscrow API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | release 대상으로 제출할 거래의 id예요 | String |
sale 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> sale(com.braintreegateway.TransactionRequest request);
braintree/sale API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| request | 요청이에요 | TransactionRequest |
search 메서드
시그니처:
- com.braintreegateway.ResourceCollection<com.braintreegateway.Transaction> search(com.braintreegateway.TransactionSearchRequest query);
braintree/search API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| query | 검색 쿼리예요 | TransactionSearchRequest |
submitForPartialSettlement 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> submitForPartialSettlement(String id, com.braintreegateway.TransactionRequest request);
- com.braintreegateway.Result<com.braintreegateway.Transaction> submitForPartialSettlement(String id, java.math.BigDecimal amount);
braintree/submitForPartialSettlement API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| amount | 부분 정산 금액이에요 | BigDecimal |
| id | 부분 정산 거래를 추가할 거래의 id예요 | String |
| request | 요청이에요 | TransactionRequest |
submitForSettlement 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> submitForSettlement(String id);
- com.braintreegateway.Result<com.braintreegateway.Transaction> submitForSettlement(String id, com.braintreegateway.TransactionRequest request);
- com.braintreegateway.Result<com.braintreegateway.Transaction> submitForSettlement(String id, java.math.BigDecimal amount);
braintree/submitForSettlement API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| amount | 정산할 금액이에요. 승인 금액 이하여야 해요. | BigDecimal |
| id | 정산 대상으로 제출할 거래의 id예요 | String |
| request | 요청이에요 | TransactionRequest |
updateCustomFields 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> updateCustomFields(String id, com.braintreegateway.TransactionRequest request);
braintree/updateCustomFields API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | 업데이트 중인 거래의 id예요 | String |
| request | 커스텀 필드 정보를 담은 TransactionRequest 객체예요. | TransactionRequest |
updateDetails 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> updateDetails(String id, com.braintreegateway.TransactionRequest request);
braintree/updateDetails API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | 상세 정보를 업데이트할 거래의 id예요 | String |
| request | 요청이에요 | TransactionRequest |
voidTransaction 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> voidTransaction(String id);
- com.braintreegateway.Result<com.braintreegateway.Transaction> voidTransaction(String id, com.braintreegateway.TransactionVoidRequest request);
braintree/voidTransaction API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| id | 무효 처리할 거래의 id예요 | String |
| voidRequest | 요청이에요. 요청은 null일 수 있고, 멱등성(idempotency) 지원에 쓰여요. | TransactionVoidRequest |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
usBankAccount API
프로듀서만 지원해요
usBankAccount API의 문법은 다음과 같이 정의돼 있어요:
braintree:usBankAccount/methodName?[parameters]
2개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [find | ||
| [sale |
find 메서드
시그니처:
- com.braintreegateway.UsBankAccount find(String token);
braintree/find API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| token |
sale 메서드
시그니처:
- com.braintreegateway.Result<com.braintreegateway.Transaction> sale(String token, com.braintreegateway.TransactionRequest transactionRequest);
braintree/sale API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| token | ||
| transactionRequest |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
webhookNotification API
프로듀서만 지원해요
webhookNotification API의 문법은 다음과 같이 정의돼 있어요:
braintree:webhookNotification/methodName?[parameters]
3개의 메서드가 아래 표에 나열돼 있고, 이어서 각 메서드의 자세한 문법을 보여 줄게요. (API 메서드는 문법에서 이름 대신 쓸 수 있는 짧은 _별칭(alias)_을 가질 수 있어요)
| Method | Alias | Description |
|---|---|---|
| [parse | ||
| [parseWithoutSignatureVerification | ||
| [verify |
parse 메서드
시그니처:
- com.braintreegateway.WebhookNotification parse(String signature, String payload);
braintree/parse API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| payload | ||
| signature |
parseWithoutSignatureVerification 메서드
시그니처:
- com.braintreegateway.WebhookNotification parseWithoutSignatureVerification(String payload);
braintree/parseWithoutSignatureVerification API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| payload |
verify 메서드
시그니처:
- String verify(String challenge);
braintree/verify API 메서드의 파라미터는 아래 표에 정리돼 있어요:
| Parameter | Description | Type |
|---|---|---|
| challenge |
위 파라미터 외에도 braintree API는 쿼리 파라미터의 어떤 파라미터든 쓸 수 있어요.
파라미터는 엔드포인트 URI로 줄 수도 있고, 메시지 헤더로 동적으로 줄 수도 있습니다. 메시지 헤더 이름은 CamelBraintree.parameter 형식이어야 해요. inBody 파라미터는 메시지 헤더를 이기는데, 즉 엔드포인트 파라미터 inBody=myParameterNameHere를 지정하면 CamelBraintree.myParameterNameHere 헤더를 덮어써요.
참고 이 컴포넌트는 API 기반이라서 엔드포인트 옵션 외에 호출별 파라미터를
Camel접두사가 붙은 exchange 헤더로도 넘길 수 있어요. 라우트가 신뢰할 수 없는 producer에서 온 메시지를 소비한다면, 메시지가 이 컴포넌트에 닿기 전에 신뢰 경계(trust boundary)에서 내부 헤더를 걷어내세요 — 예를 들어removeHeaders("Camel*")를 쓰면 돼요 — 그래야 보낸 쪽이 API 호출을 덮어쓸 수 없습니다. 자세한 내용은 Camel 보안 모델 문서를 보세요.
예시 (Examples)
from("direct://GENERATE")
.to("braintree://clientToken/generate");
<route>
<from uri="direct://GENERATE"/>
<to uri="braintree://clientToken/generate"/>
</route>
- route:
from:
uri: direct:GENERATE
steps:
- to:
uri: braintree:clientToken/generate
더 알아보기 (Learn more)
엔드포인트와 옵션에 대한 자세한 정보는 https://developers.braintreepayments.com/reference/overview의 Braintree 레퍼런스를 참고하세요.