|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.braintreegateway.BraintreeGateway
public class BraintreeGateway
This is the primary interface to the Braintree Gateway. It is used to interact with:
Quick Start Example:
import java.math.BigDecimal;
import com.braintreegateway.*;
public class BraintreeExample {
public static void main(String[] args) {
BraintreeGateway gateway = new BraintreeGateway(Environment.SANDBOX, "the_merchant_id", "the_public_key", "the_private_key");
TransactionRequest request = new TransactionRequest().amount(new BigDecimal("100.00")).creditCard().number("4111111111111111").expirationDate("05/2012").done();
Transaction transaction = gateway.transaction().sale(request).getTarget();
System.out.println("Transaction ID: " + transaction.getId());
System.out.println("Status: " + transaction.getStatus());
}
}
| Field Summary | |
|---|---|
private Configuration |
configuration
|
private Environment |
environment
|
private Http |
http
|
private String |
merchantId
|
private String |
privateKey
|
private String |
publicKey
|
static String |
VERSION
|
| Constructor Summary | |
|---|---|
BraintreeGateway(Environment environment,
String merchantId,
String publicKey,
String privateKey)
Instantiates a BraintreeGateway. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String VERSION
private Configuration configuration
private Environment environment
private Http http
private String merchantId
private String privateKey
private String publicKey
| Constructor Detail |
|---|
public BraintreeGateway(Environment environment,
String merchantId,
String publicKey,
String privateKey)
environment - Either Environment.SANDBOX or
Environment.PRODUCTION.merchantId - the merchant id provided by Braintree.publicKey - the public key provided by Braintree.privateKey - the private key provided by Braintree.| Method Detail |
|---|
public AddOnGateway addOn()
AddOnGateway for interacting with AddOn
objects.
AddOnGateway.public AddressGateway address()
AddressGateway for interacting with Address
objects.
AddressGateway.public String baseMerchantURL()
public CreditCardGateway creditCard()
CreditCardGateway for interacting with
CreditCard objects.
CreditCardGateway.public CreditCardVerificationGateway creditCardVerification()
public CustomerGateway customer()
CustomerGateway for interacting with Customer
objects.
CustomerGateway.public DiscountGateway discount()
DiscountGateway for interacting with Discount
objects.
DiscountGateway.public String getAuthorizationHeader()
public Configuration getConfiguration()
public PlanGateway plan()
PlanGateway for interacting with Plan objects.
PlanGateway.public SettlementBatchSummaryGateway settlementBatchSummary()
public SubscriptionGateway subscription()
SubscriptionGateway for interacting with
Subscription objects.
SubscriptionGateway.public TransactionGateway transaction()
TransactionGateway for interacting with
Transaction objects.
TransactionGateway.public TransparentRedirectGateway transparentRedirect()
public String trData(Request trData,
String redirectURL)
Request
and redirect URL
trData - the transparent redirect data as a Request object.redirectURL - the redirect URL for the user after the transparent redirect
POST.
public WebhookNotificationGateway webhookNotification()
public WebhookTestingGateway webhookTesting()
public MerchantAccountGateway merchantAccount()
MerchantAccountGateway for interacting with
MerchantAccount objects.
MerchantAccountGateway.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||