PayPalClient
Used to tokenize PayPal accounts. For more information see the documentation
Constructors
Link copied to clipboard
Create a new instance of PayPalClient from within an Activity using a BraintreeClient.
Create a new instance of PayPalClient from within a Fragment using a BraintreeClient.
Create a new instance of PayPalClient using a BraintreeClient.
Functions
Link copied to clipboard
Make sure to call this method after parseBrowserSwitchResult parses a BrowserSwitchResult successfully to prevent multiple invocations of browser switch event handling logic.
Link copied to clipboard
open fun onBrowserSwitchResult(@NonNull browserSwitchResult: BrowserSwitchResult, @NonNull callback: PayPalBrowserSwitchResultCallback)
Use this method with the manual browser switch integration pattern.
Link copied to clipboard
open fun parseBrowserSwitchResult(@NonNull context: Context, @Nullable intent: Intent): BrowserSwitchResult
After calling tokenizePayPalAccount, call this method in your Activity or Fragment's onResume() method to see if a response was provided through deep linking.
Link copied to clipboard
open fun requestBillingAgreement(@NonNull activity: FragmentActivity, @NonNull payPalVaultRequest: PayPalVaultRequest, @NonNull callback: PayPalFlowStartedCallback)
Link copied to clipboard
open fun requestOneTimePayment(@NonNull activity: FragmentActivity, @NonNull payPalCheckoutRequest: PayPalCheckoutRequest, @NonNull callback: PayPalFlowStartedCallback)
Link copied to clipboard
Add a PayPalListener to your client to receive results or errors from the PayPal flow.
Link copied to clipboard
open fun tokenizePayPalAccount(@NonNull activity: FragmentActivity, @NonNull payPalRequest: PayPalRequest)
open fun tokenizePayPalAccount(@NonNull activity: FragmentActivity, @NonNull payPalRequest: PayPalRequest, @NonNull callback: PayPalFlowStartedCallback)
Tokenize a PayPal account for vault or checkout.