Android
3. Basic Login
This login is done by calling Goodie.setLogin() function. This function will retrieve based on the deviceUniqueId, username, password, merchantCode. Login to Goodie System to access Goodie Feature.
Here is example:
Goodie.setLogin(deviceUniqueId, username, password, merchantCode) .loginGoodie(this, new SetLoginListener(){ @Override public void onSuccess(LoginResponse response){ if(response.getAbstractResponse().getResponseStatus().equals("AUTH000")){ //on success } } @Override public void onError(Throwable throwable) { //on error } });
Where :
Param | Type | Description |
---|---|---|
deviceUniqueId | String | deviceUniqueId is identify android device |
username | String | username is used as a login member to sdk goodie |
password | String | password is used as for authentication purpose |
merchantCode | String | merchantCode is identifier that will be used to identity a merchant |
Response login :
{ "authToken": "2D16E169-2227-4BED-B96E-ACB58E8978AB", "authDevice": "tokentokenan", "expiryTime": "2019-04-02_09:27:32", "memberId": "8A2EC944-3E83-4D9F-9E0C-D47CEBF5C20C", "merchantId": "5F773EA1-1E66-4F9E-B9C8-E1FA8156AD20", "firstName": "hana", "lastName": "susan", "phoneNumber": "085778237247", "gender": "", "birthDate": "", "status": -1, "qrImage": null, "abstractResponse": { "responseStatus": "AUTH000", "responseMessage": "Authentication success" } }