PayPalRetailSDK Class Reference

Inherits from NSObject
Declared in PayPalRetailSDK.h

+ startDeviceErrorSimulation:

Start simulation of the device error in the sandbox environment.

+ (BOOL)startDeviceErrorSimulation:(PPRetailDeviceError)deviceErrorCode

Parameters

deviceErrorCode

error code of the error to be simulated

Return Value

True if the simulation is supported

Discussion

Start simulation of the device error in the sandbox environment.

Declared In

PayPalRetailSDK.h

+ stopDeviceErrorSimulation

Stop simulation of the device error set by startDeviceErrorSimulation

+ (void)stopDeviceErrorSimulation

Discussion

Stop simulation of the device error set by startDeviceErrorSimulation

Declared In

PayPalRetailSDK.h

+ setRetailSDKAppDelegate:

Use PPHRetailSDKAppDelegate if you use UINavigationController in your app. This lets you provide the app’s navigationController for the SDK to use for its UIs.

+ (void)setRetailSDKAppDelegate:(id<PPHRetailSDKAppDelegate>)delegate

Discussion

Use PPHRetailSDKAppDelegate if you use UINavigationController in your app. This lets you provide the app’s navigationController for the SDK to use for its UIs.

Declared In

PayPalRetailSDK.h

+ addLoggingService:

Used for Instrumentaion using the Instrumentation-SDK to log for various loggers.

+ (void)addLoggingService:(id<PPRetailInstrumentationDelegate>)logingService

Discussion

Used for Instrumentaion using the Instrumentation-SDK to log for various loggers.

Declared In

PayPalRetailSDK.h

+ initializeSDK

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

+ (PPRetailError *)initializeSDK

Discussion

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

Declared In

PayPalRetailSDK.h

+ checkIfSwiperIsEligibleForMerchant

Use this call to determine whether the current merchant is elegible to use a swiper

+ (BOOL)checkIfSwiperIsEligibleForMerchant

Discussion

Use this call to determine whether the current merchant is elegible to use a swiper

Declared In

PayPalRetailSDK.h

+ shutdownSDK

If for some reason you want to shutdown all SDK activity and uninitialize the SDK, call shutdownSDK. You will need to call initializeSDK and initializeMerchant again to start using the SDK afterwards. Same as logout.

+ (void)shutdownSDK

Discussion

If for some reason you want to shutdown all SDK activity and uninitialize the SDK, call shutdownSDK. You will need to call initializeSDK and initializeMerchant again to start using the SDK afterwards. Same as logout.

Declared In

PayPalRetailSDK.h

+ initializeMerchant:repository:completionHandler:

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.

+ (PPRetailError *)initializeMerchant:(NSString *)merchantToken repository:(NSString *)repository completionHandler:(PPRetailMerchantHandler)handler

Discussion

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.

Declared In

PayPalRetailSDK.h

+ initializeFakeMerchant:

Initialize fake merchant for testing

+ (PPRetailError *)initializeFakeMerchant:(PPRetailMerchantHandler)handler

Discussion

Initialize fake merchant for testing

Declared In

PayPalRetailSDK.h

+ initializeMerchantOffline:

If you are whitelisted for offline payments and you have initialized online once on the current device then you can initialize the merchant offline

+ (PPRetailError *)initializeMerchantOffline:(PPRetailMerchantHandler)handler

Discussion

If you are whitelisted for offline payments and you have initialized online once on the current device then you can initialize the merchant offline

Declared In

PayPalRetailSDK.h

+ initializeMerchantWithCredentials:completionHandler:

Once you have SdkCredentials, call initializeMerchantWithCredentials and wait for the completionHandler to be called before doing more SDK operations.

+ (void)initializeMerchantWithCredentials:(SdkCredential *)credentials completionHandler:(PPRetailMerchantHandler)handler

Discussion

Once you have SdkCredentials, call initializeMerchantWithCredentials and wait for the completionHandler to be called before doing more SDK operations.

Declared In

PayPalRetailSDK.h

+ addDeviceDiscoveredListener:

Add a listener for the deviceDiscovered event

+ (PPRetailDeviceDiscoveredSignal)addDeviceDiscoveredListener:(PPRetailDeviceDiscoveredEvent)listener

Return Value

PPRetailDeviceDiscoveredSignal an object that can be used to remove the listener when you’re done with it.

Discussion

Add a listener for the deviceDiscovered event

Declared In

PayPalRetailSDK.h

+ removeDeviceDiscoveredListener:

Remove a listener for the deviceDiscovered event given the signal object that was returned from addDeviceDiscoveredListener

+ (void)removeDeviceDiscoveredListener:(PPRetailDeviceDiscoveredSignal)listenerToken

Discussion

Remove a listener for the deviceDiscovered event given the signal object that was returned from addDeviceDiscoveredListener

Declared In

PayPalRetailSDK.h

+ isDeviceSimulated

whether the device is being simulated or not

+ (BOOL)isDeviceSimulated

Return Value

whether the device is being simulated or not

Declared In

PayPalRetailSDK.h

+ startSimulationWithOptions:

Start Simulating Payment Device - This will allow you to mock the Payment Device and the server. This will only work in “DEBUG” mode

+ (void)startSimulationWithOptions:(PPRetailSimulationOptions *)options

Discussion

Start Simulating Payment Device - This will allow you to mock the Payment Device and the server. This will only work in “DEBUG” mode

Declared In

PayPalRetailSDK.h

+ addUntrustedNetworkListener:

Add a listener for the untrustedNetwork event

+ (PPRetailUntrustedNetworkSignal)addUntrustedNetworkListener:(PPRetailUntrustedNetworkEvent)listener

Return Value

PPRetailUntrustedNetworkEvent an object that can be used to remove the listener when you’re done with it.

Discussion

Add a listener for the untrustedNetwork event

Declared In

PayPalRetailSDK.h

+ removeUntrustedNetworkListener:

Remove a listener for the untrustedNetwork event given the signal object that was returned from addUntrustedNetworkListener

+ (void)removeUntrustedNetworkListener:(PPRetailUntrustedNetworkSignal)listenerToken

Discussion

Remove a listener for the untrustedNetwork event given the signal object that was returned from addUntrustedNetworkListener

Declared In

PayPalRetailSDK.h

+ captureAuthorizedTransaction:invoiceId:totalAmount:gratuityAmount:currency:callback:

Capture a authorized transaction by providing authorization ID and final amount to be captured

+ (void)captureAuthorizedTransaction:(NSString *_Nullable)authorizationId invoiceId:(NSString *_Nullable)invoiceId totalAmount:(NSDecimalNumber *_Nullable)totalAmount gratuityAmount:(NSDecimalNumber *_Nullable)gratuityAmount currency:(NSString *_Nullable)currency callback:(PPRetailTransactionManagerCaptureAuthorizedTransactionHandler _Nullable)callback

Discussion

Capture a authorized transaction by providing authorization ID and final amount to be captured

Declared In

PayPalRetailSDK.h

+ retrieveAuthorizedTransactions:endDateTime:pageSize:status:callback:

Capture a list of authorized transactions

+ (void)retrieveAuthorizedTransactions:(NSDate *_Nullable)startDateTime endDateTime:(NSDate *_Nullable)endDateTime pageSize:(int)pageSize status:(NSArray *_Nullable)status callback:(PPRetailTransactionManagerRetrieveAuthorizedTransactionsHandler _Nullable)callback

Discussion

Capture a list of authorized transactions

Declared In

PayPalRetailSDK.h

+ initializePPHRetailMerchant:deviceId:completionHandler:

Initialize merchant for PayPal Here app use only

+ (void)initializePPHRetailMerchant:(PPHRetailMerchant *)merchant deviceId:(NSUUID *)deviceId completionHandler:(PPRetailMerchantHandler)handler

Discussion

Initialize merchant for PayPal Here app use only

Declared In

PayPalRetailSDK.h

+ initializeFakePPHRetailMerchant:completionHandler:

Initialize fake merchant for testing

+ (void)initializeFakePPHRetailMerchant:(PPHRetailMerchant *)merchant completionHandler:(PPRetailMerchantHandler)handler

Discussion

Initialize fake merchant for testing

Declared In

PayPalRetailSDK.h

+ connectToLastActiveReader

Connect to the last active reader. PPHRetailSDKAppDelegate’s lastActiveReaderConnected is called when the reader connects. It internally invokes DeviceManager’s connectToLastActiveReader

+ (void)connectToLastActiveReader

Discussion

Connect to the last active reader. PPHRetailSDKAppDelegate’s lastActiveReaderConnected is called when the reader connects. It internally invokes DeviceManager’s connectToLastActiveReader

Declared In

PayPalRetailSDK.h

+ startWatchingAudio

Watch for audio readers. This will show a microphone connection permission prompt on the initial call Time this call such that it does not interfere with any other alerts Requires a merchant, so start watching after a successful initializeMerchant The audio reader may not be available to some merchants based on their location or other criteria

+ (void)startWatchingAudio

Discussion

Watch for audio readers. This will show a microphone connection permission prompt on the initial call Time this call such that it does not interfere with any other alerts Requires a merchant, so start watching after a successful initializeMerchant The audio reader may not be available to some merchants based on their location or other criteria

Declared In

PayPalRetailSDK.h

+ endCardReaderDiscovery

DEPRECATED since 2.3.0021161010: endCardReaderDiscovery is no longer needed.

+ (void)endCardReaderDiscovery

Discussion

DEPRECATED since 2.3.0021161010: endCardReaderDiscovery is no longer needed.

Declared In

PayPalRetailSDK.h

+ deviceManager

DeviceManager is responsible for exposing APIs regarding the devices. Currently, you can use DeviceManager to prompt the List to select the device or set/get the active device.

+ (PPRetailDeviceManager *)deviceManager

Discussion

DeviceManager is responsible for exposing APIs regarding the devices. Currently, you can use DeviceManager to prompt the List to select the device or set/get the active device.

Declared In

PayPalRetailSDK.h

+ transactionManager

TransactionManager is a public facing facade to everything related to a Transaction.

+ (PPRetailTransactionManager *)transactionManager

Discussion

TransactionManager is a public facing facade to everything related to a Transaction.

Declared In

PayPalRetailSDK.h

+ braintreeManager

BraintreeManager is responsible for exposing APIs regarding the BrainTree interfaces

+ (PPRetailBraintreeManager *)braintreeManager

Discussion

BraintreeManager is responsible for exposing APIs regarding the BrainTree interfaces

Declared In

PayPalRetailSDK.h

+ logout

If for some reason you want to shutdown all SDK activity and uninitialize the SDK, call logout. You will need to call initializeSDK and initializeMerchant again to start using the SDK afterwards. Same as shutdownSDK.

+ (void)logout

Discussion

If for some reason you want to shutdown all SDK activity and uninitialize the SDK, call logout. You will need to call initializeSDK and initializeMerchant again to start using the SDK afterwards. Same as shutdownSDK.

Declared In

PayPalRetailSDK.h

+ sendReceiptWithUI:invoice:isEmail:callback:

Send receipt using the sdk’s receipt UI

+ (void)sendReceiptWithUI:(UINavigationController *)navigationController invoice:(PPRetailRetailInvoice *)invoice isEmail:(BOOL)isEmail callback:(void ( ^ ) ( PPRetailError *error , NSDictionary *receiptDestination ))callback

Discussion

Send receipt using the sdk’s receipt UI

Declared In

PayPalRetailSDK.h

+ setUITheme:

Set the sdk’s UI theme

+ (void)setUITheme:(PPRetailUITheme)theme

Discussion

Set the sdk’s UI theme

Declared In

PayPalRetailSDK.h

+ getUITheme

Get the current UI theme of the sdk

+ (PPRetailUITheme)getUITheme

Discussion

Get the current UI theme of the sdk

Declared In

PayPalRetailSDK.h

+ setReceiptScreenOrientation:

Set the receipt screen orientation. Use this to force the orientation to a specific value or based on the device’s orientation.

+ (void)setReceiptScreenOrientation:(PPRetailReceiptScreenOrientation)orientation

Discussion

Set the receipt screen orientation. Use this to force the orientation to a specific value or based on the device’s orientation.

Declared In

PayPalRetailSDK.h

+ getReceiptScreenOrientation

Get the orientation of the receipt screeen

+ (PPRetailReceiptScreenOrientation)getReceiptScreenOrientation

Discussion

Get the orientation of the receipt screeen

Declared In

PayPalRetailSDK.h

+ getSdkVersion

Get the version of the PPH sdk.

+ (NSString *)getSdkVersion

Discussion

Get the version of the PPH sdk.

Declared In

PayPalRetailSDK.h

+ isLightTheme

Check whether the sdk UI theme is set to light

+ (BOOL)isLightTheme

Discussion

Check whether the sdk UI theme is set to light

Declared In

PayPalRetailSDK.h

+ localizedStringNamed:withDefault:forTable:

Used by the Paypal Here app to get localized strings

+ (NSString *)localizedStringNamed:(NSString *)name withDefault:(NSString *)defaultValue forTable:(NSString *)table

Discussion

Used by the Paypal Here app to get localized strings

Declared In

PayPalRetailSDK.h