public class PayPal
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
SCOPE_ADDRESS
PayPal Scope for obtaining the accounts address.
|
static java.lang.String |
SCOPE_EMAIL
PayPal Scope for email.
|
static java.lang.String |
SCOPE_FUTURE_PAYMENTS
PayPal Scope for Future Payments.
|
protected static boolean |
sFuturePaymentsOverride |
Constructor and Description |
---|
PayPal() |
Modifier and Type | Method and Description |
---|---|
static void |
authorizeAccount(BraintreeFragment fragment)
Starts the Pay With PayPal flow.
|
static void |
authorizeAccount(BraintreeFragment fragment,
java.util.List<java.lang.String> additionalScopes)
Starts the Pay With PayPal flow with additional scopes.
|
protected static void |
onActivityResult(BraintreeFragment fragment,
int resultCode,
android.content.Intent data)
The result from PayPal's request.
|
static void |
requestBillingAgreement(BraintreeFragment fragment,
PayPalRequest request)
Starts the Billing Agreement flow for PayPal.
|
static void |
requestBillingAgreement(BraintreeFragment fragment,
PayPalRequest request,
PayPalApprovalHandler handler)
Starts the Billing Agreement flow for PayPal with custom PayPal approval handler.
|
static void |
requestOneTimePayment(BraintreeFragment fragment,
PayPalRequest request)
Starts the Single Payment flow for PayPal.
|
static void |
requestOneTimePayment(BraintreeFragment fragment,
PayPalRequest request,
PayPalApprovalHandler handler)
Starts the Single Payment flow for PayPal with custom PayPal approval handler.
|
public static final java.lang.String SCOPE_FUTURE_PAYMENTS
public static final java.lang.String SCOPE_EMAIL
public static final java.lang.String SCOPE_ADDRESS
authorizeAccount(BraintreeFragment, List)
.protected static boolean sFuturePaymentsOverride
public static void authorizeAccount(BraintreeFragment fragment)
fragment
- A BraintreeFragment
used to process the request.public static void authorizeAccount(BraintreeFragment fragment, java.util.List<java.lang.String> additionalScopes)
fragment
- A BraintreeFragment
used to process the request.additionalScopes
- A List
of additional scopes. Ex: SCOPE_ADDRESS
. Acceptable scopes are defined in PayPal
.public static void requestBillingAgreement(BraintreeFragment fragment, PayPalRequest request)
fragment
- A BraintreeFragment
used to process the request.request
- A PayPalRequest
used to customize the request.public static void requestBillingAgreement(BraintreeFragment fragment, PayPalRequest request, PayPalApprovalHandler handler)
fragment
- A BraintreeFragment
used to process the request.request
- A PayPalRequest
used to customize the request.handler
- A PayPalApprovalHandler
for custom approval handling.public static void requestOneTimePayment(BraintreeFragment fragment, PayPalRequest request)
fragment
- A BraintreeFragment
used to process the request.request
- A PayPalRequest
used to customize the request. An amount MUST be specified.public static void requestOneTimePayment(BraintreeFragment fragment, PayPalRequest request, PayPalApprovalHandler handler)
fragment
- A BraintreeFragment
used to process the request.request
- A PayPalRequest
used to customize the request. An amount MUST be specified.handler
- A PayPalApprovalHandler
for custom approval handling.protected static void onActivityResult(BraintreeFragment fragment, int resultCode, android.content.Intent data)
fragment
- A BraintreeFragment
used to process the request.data
- Data associated with the result.