-
Notifications
You must be signed in to change notification settings - Fork 0
Core System
Mohamed Osman edited this page Oct 1, 2019
·
3 revisions
The core is the foundation of the Stash! Android SDK. It offers public functions for initializing and configuring the SDK as well as registering payment methods. All payment service provider module frameworks depend on the core framework.
Two main public classes are:
-
Stash
- offering functionality for configuring SDK, UI customization -
RegistrationManager
- offering functionality for registration of payment methods
Stash
is the first entry point to the SDK. It needs to be initialized with payment service provider modules for the SDK to function and allow registration of payment methods. Furthermore, it is used to retrieve instances of RegistrationManager
which can be used to perform payment method registration.
The RegistrationManager
allows payment method registration via various mechanisms:
- Direct registration: Here, the SDK expects the payment method data to be provided directly and it simply registers the payment method with the configured PSP based on that data.
- Specific UI registration: The SDK presents the configured module's UI for a given payment method type and registers based on the data the user provides.
- Generic UI registration: The SDK presents a payment method type picker and the user picks which payment method type they would like to register and provides the necessary data for that type.
The core provides the following functionality to its modules:
- All communication with the SDK backend is done by the core. The modules provide the data that is sent to the backend but do not communicate with it directly.
- UI handling is done by the core. The core interfaces directly with user-provided UI and manages the presentation of module payment method user interface screens.