public final class

RetailSDK

extends Object
java.lang.Object
   ↳ com.paypal.paypalretailsdk.RetailSDK

Summary

Nested Classes
interface RetailSDK.AppState  
interface RetailSDK.DeviceDiscoveredObserver A PaymentDevice has been discovered. 
interface RetailSDK.LastActiveCardReaderCallbackCallback  
interface RetailSDK.MerchantInitializedCallback The callback signature for initializeMerchant  
interface RetailSDK.NetworkInterceptorCallback  
interface RetailSDK.PageViewedObserver A page has been viewed  
Fields
public static SoundNotification sAudio
public static Context sContext
public static SDK sJsSdk
Public Constructors
RetailSDK()
Public Methods
static void addDeviceDiscoveredObserver(RetailSDK.DeviceDiscoveredObserver observer)
Add an observer for the deviceDiscovered event
static TransactionContext createTransaction(Invoice invoice)
This method is deprecated. use getTransactionManager.createNewTransaction()
static DeviceManager getDeviceManager()
static Merchant getMerchant()
static TransactionManager getTransactionManager()
static void initialize(Context context, RetailSDK.AppState appState)
This is the first call you should make to the PayPal Retail SDK (typically in application startup, but if you are using the SDK only in certain cases or for certain customers, then at the appropriate time)
static void initializeMerchant(String token, String repository, RetailSDK.MerchantInitializedCallback callback)
Once you have retrieved a token for your merchant (typically from a backend server), call initializeMerchant and wait for the completionHandler to be called before doing more SDK operations.
static void initializeMerchant(SdkCredential credentials, RetailSDK.MerchantInitializedCallback callback)
static void logout()
static void removeDeviceDiscoveredObserver(RetailSDK.DeviceDiscoveredObserver observer)
Remove an observer for the deviceDiscovered event
static void removePageViewedObserver(RetailSDK.PageViewedObserver observer)
Remove an observer for the deviceDiscovered event
static void setAppInfo(SdkEnvironmentInfo envInfo)
static void setCurrentApplicationActivity(Activity activity)
At various points during a transaction flow we need to present UI.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

public static SoundNotification sAudio

public static Context sContext

public static SDK sJsSdk

Public Constructors

public RetailSDK ()

Public Methods

public static void addDeviceDiscoveredObserver (RetailSDK.DeviceDiscoveredObserver observer)

Add an observer for the deviceDiscovered event

public static TransactionContext createTransaction (Invoice invoice)

This method is deprecated.
use getTransactionManager.createNewTransaction()

This is the primary starting point for taking a payment. First, create an invoice, then create a transaction, then begin the transaction to have the SDK listen for events and go through the relevant flows for a payment type.

public static DeviceManager getDeviceManager ()

public static Merchant getMerchant ()

public static TransactionManager getTransactionManager ()

public static void initialize (Context context, RetailSDK.AppState appState)

This is the first call you should make to the PayPal Retail SDK (typically in application startup, but if you are using the SDK only in certain cases or for certain customers, then at the appropriate time)

public static void initializeMerchant (String token, String repository, RetailSDK.MerchantInitializedCallback callback)

Once you have retrieved a token for your merchant (typically from a backend server), call initializeMerchant and wait for the completionHandler to be called before doing more SDK operations.

public static void initializeMerchant (SdkCredential credentials, RetailSDK.MerchantInitializedCallback callback)

Throws
Exception

public static void logout ()

public static void removeDeviceDiscoveredObserver (RetailSDK.DeviceDiscoveredObserver observer)

Remove an observer for the deviceDiscovered event

public static void removePageViewedObserver (RetailSDK.PageViewedObserver observer)

Remove an observer for the deviceDiscovered event

public static void setAppInfo (SdkEnvironmentInfo envInfo)

public static void setCurrentApplicationActivity (Activity activity)

At various points during a transaction flow we need to present UI. Typically, before you kick off a transaction flow you should call this method to give us the launching point for our activities.

Parameters
activity The foreground activity for your application