com.braintreegateway
public class TransactionGateway extends Object
Transactions.
E.g. sales, credits, refunds, searches, etc.
This class does not need to be instantiated directly.
Instead, use BraintreeGateway.transaction() to get an instance of this class:
BraintreeGateway gateway = new BraintreeGateway(...); gateway.transaction().create(...)For more detailed information on
Transactions, see http://www.braintreepaymentsolutions.com/gateway/transaction-api| Modifier and Type | Field and Description |
|---|---|
private Configuration |
configuration |
private Http |
http |
| Constructor and Description |
|---|
TransactionGateway(Http http,
Configuration configuration) |
| Modifier and Type | Method and Description |
|---|---|
Result<Transaction> |
cancelRelease(String id)
Cancels a pending release of a transaction with the given id from escrow.
|
Result<Transaction> |
cloneTransaction(String id,
TransactionCloneRequest request) |
Result<Transaction> |
confirmTransparentRedirect(String queryString)
Deprecated.
|
Result<Transaction> |
credit(TransactionRequest request)
Creates a credit
Transaction. |
String |
creditTrData(TransactionRequest trData,
String redirectURL)
Creates transparent redirect data for a credit.
|
(package private) List<Transaction> |
fetchTransactions(TransactionSearchRequest query,
List<String> ids) |
Transaction |
find(String id)
Finds a
Transaction by id. |
Result<Transaction> |
holdInEscrow(String id)
Holds the transaction with the given id for escrow.
|
Result<Transaction> |
refund(String id)
Refunds all or part of a previous sale
Transaction. |
Result<Transaction> |
refund(String id,
BigDecimal amount) |
Result<Transaction> |
releaseFromEscrow(String id)
Submits the transaction with the given id for release.
|
Result<Transaction> |
sale(TransactionRequest request)
Creates a sale
Transaction. |
String |
saleTrData(TransactionRequest trData,
String redirectURL)
Creates transparent redirect data for a sale.
|
ResourceCollection<Transaction> |
search(TransactionSearchRequest query)
Finds all Transactions that match the query and returns a
ResourceCollection. |
Result<Transaction> |
submitForSettlement(String id)
Submits the transaction with the given id for settlement.
|
Result<Transaction> |
submitForSettlement(String id,
BigDecimal amount)
Submits the transaction with the given id to be settled for the given amount which must be less than or equal to the authorization amount.
|
String |
transparentRedirectURLForCreate()
Deprecated.
|
Result<Transaction> |
voidTransaction(String id)
Voids the transaction with the given id.
|
private Http http
private Configuration configuration
public TransactionGateway(Http http, Configuration configuration)
public Result<Transaction> cloneTransaction(String id, TransactionCloneRequest request)
@Deprecated public Result<Transaction> confirmTransparentRedirect(String queryString)
public Result<Transaction> credit(TransactionRequest request)
Transaction.request - the request.Resultpublic String creditTrData(TransactionRequest trData, String redirectURL)
trData - the request.redirectURL - the redirect URL.public Transaction find(String id)
Transaction by id.id - the id of the Transaction.Transaction or raises a NotFoundException.public Result<Transaction> refund(String id)
Transaction.id - the id of the (sale) Transaction to refund.Result.public Result<Transaction> refund(String id, BigDecimal amount)
public Result<Transaction> sale(TransactionRequest request)
Transaction.request - the request.Result.public String saleTrData(TransactionRequest trData, String redirectURL)
trData - the request.redirectURL - the redirect URL.public ResourceCollection<Transaction> search(TransactionSearchRequest query)
ResourceCollection.
See: http://www.braintreepaymentsolutions.com/gateway/transaction-api#searchingResourceCollection or raises a DownForMaintenanceException.List<Transaction> fetchTransactions(TransactionSearchRequest query, List<String> ids)
public Result<Transaction> cancelRelease(String id)
id - of the transaction to cancel release from escrow of.Result.public Result<Transaction> holdInEscrow(String id)
id - of the transaction to hold for escrow.Result.public Result<Transaction> releaseFromEscrow(String id)
id - of the transaction to submit for release.Result.public Result<Transaction> submitForSettlement(String id)
id - of the transaction to submit for settlement.Result.public Result<Transaction> submitForSettlement(String id, BigDecimal amount)
id - of the transaction to submit for settlement.amount - to settle. must be less than or equal to the authorization amount.Result.@Deprecated public String transparentRedirectURLForCreate()
public Result<Transaction> voidTransaction(String id)
id - of the transaction to void.Result.Copyright © 2013-2014. All Rights Reserved.