subscription-dashboard Example
To start the widget
-
Open the widget using a “startWidget” call; widgetType = 'subscription-dashboard', and include all relevant Key Values.
startWidget ({"widgetType":"subscription-dashboard"})
-
Following this call, a pre-defined WebView should be opened by the bank, and the widget’s render should be injected to it.
-
Following this call, a pre-defined WebView should be opened by the bank, and the widget’s render should be injected to it.
-
In some cases, the startWidget may include additional payload parameters. In that case, the startWidget would include an additional “params” parameter:
startWidget ({"widgetType":"subscription-dashboard", "params”: {…}})
-
To display subscription data, the widget sends and API request to the server. The API name is getUserSubscriptions and it should include protocol version. The bank must decide between either options:
- The request can be sent by the widget, after the “startWidget” initialization, through the delegate function of the widget:
Personetics Subscription-Dashboard Widget --> Delegate: sendRequestToEnrichServer (requestHeaders, postParam, requestId) - by the bank application before the “startWidget” and provided as additional payload once “startWidget” is called:
Delegate --> PServer API: handleServerResponse (data, requestId)
- The request can be sent by the widget, after the “startWidget” initialization, through the delegate function of the widget:
-
Following this call, a pre-defined WebView should be opened by the bank, and the widget’s render should be injected to it.
Updated 10 months ago