RedeemPointByStaffView
#
IntroductionUse this built-in view to allow your customers to spend loyalty points for shopping at stores/showrooms. The staff can click on it to open Scan QR screen
and scan loyalty code of the customer.
#
Installation- Android
- iOS
#
Usage- Android
- iOS
#
PrerequiresiteTo use loyalty-component
, the main app needs to use androidx component for its fragment/activity:
LoyaltyRedeemPointByStaffView
to your layout#
Add #
Setting up the controller in activity/fragmentThere is a note when we use the LoyaltyRedeemPointByStaffView
. When we add that view to our screen, it will fetch data of your loyalty network automatically. This process can cause some errors like network connect... In these cases, that view will notify error to the client via callback. The client can show dialog or something for these errors and try to reload LoyaltyRedeemPointByStaffView
by reload method.
- Setup in Activity
- Or setup in Fragment
#
UsageYou can embed LoyaltyRedeemPointByStaffView
as a subview in .xib
files, or can create it programatically.
LoyaltyRedeemPointByStaffView
use LoyaltyRedeemPointByStaffController
as its controller.
- Step 1: Create an instance of
LoyaltyRedeemPointByStaffController
- Step 2: Set that instance for
redeemPointView
- Step 3: Call method
controller.enable()
When controller.enable()
, it will get network config.
In case there is an error, client app can call controller.reload()
to retry request the data.
The parent ViewController
must conform to LoyaltyRedeemPointDelegate
RedeemPointError
includes these cases: