Requesting Manage Card
This method allows a 3rd party app to send a request to the Scan to Pay SDK in order for the cardholder to
“manage” their card list. Once invoked, the user is then able to add or delete bank cards.
Invoking the Manage Card Intent
The following snippet illustrates how to invoke the card management Intent:
Intent intent = new Intent(context, LibLiteWalletActivity.class);
intent.putExtra(LibLiteActivity.IN_API_KEY,"APIKEY");
intent.putExtra(LibLiteActivity.IN_SYSTEM, "LIVE");
context.startActivityForResult(intent, 10);
Values passed to the LibLiteWalletActivity
Name | Type | Description |
---|---|---|
LibLiteActivity.IN_API_KEY | String | This is the API key provided by Oltio/UKheshe that will enable the library to be used. This can be found on the Scan to Pay Portal under the Lib Lite Tokens menu item |
LibLiteActivity.IN_SYSTEM | String | This value can be “LIVE” or “TEST”, representing the Scan to Pay backend system to connect to. |
LibLiteActivity.IN_SUGGESTED_MSISDN | String | This is an optional field if you know the clients |
Handling the Manage Card Response
The following snippet illustrates how to handle the response from the LibLiteWalletActivity:
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{ switch (requestCode) {case 10:
if (resultCode == LibLiteActivity.LIBLITE_ERROR) { int erra
} else if (resultCode == LibLiteActivity.LIBLITE_PAYMENT_SUCCESS)
{ String txReference = data.getStringExtra(LibLiteActivity.OUT_TX_REFERENCE); ...
} else if (resultCode == LibLiteActivity.LIBLITE_REGISTRATION_SUCCESS)
{ boolean silent = data.getBooleanExtra(LibLiteActivity.OUT_SILENT_REGISTRATION,false);
}
break;
}
The following is a breakdown of resultCodes:
Updated 3 months ago