SetCurrentWalletFromEncoding()
Sets the current wallet to be the wallet passed in as a string parameter. This function is typically called before calling AddCurrentCardToWallet() during a roaming download.
aa91
Sets the current wallet to be the wallet passed in as a string parameter. This function is typically called before calling AddCurrentCardToWallet() during a roaming download.
This is a deprecated function use ImportArcotID() instead.
Syntax
boolean SetCurrentWalletFromEncoding(walletEncoding)
Parameters
The following are the parameters of this method:
Parameter
| Type
| Description
|
walletEncoding | string | A base-64 encoded string of the wallet you wish to set. |
Returns
If the method is successful, then it returns TRUE. If the method is unsuccessful, then it returns FALSE.
Example
var arcotClient = new ArcotClient();var walletnameString = "GuestUser";var b64walletString = "MII0yAIBAAwHY3Rnb29kMTCCNDcwgjQzAgEBDARjYXJkoIHFMB8GCmCGSAGG+UYJAQEwEQQAAgEBAgILAgICAegCAgMYBIGhMIGeAgEAMA4GCmCGSA GG+UYJAgAFAASBiDCBhQJBAMzNUdGcaBZsiAt/88Dk9... ";// Wallet will be saved to either hard disk or USBarcotClient.SetAttribute("WalletInMemory", false);// Set the current walletarcotClient.SetCurrentWalletFromEncoding(b64walletString);// Set the card at index 0 as the current (and only) card in the walletvar returnValue = arcotClient.SetCurrentCardByIndex(0);if (returnValue){if (arcotClient.AddCurrentCardToWallet(walletnameString)){document.write("<P>Card added to wallet successfully</P>");}else{document.write("<P>Failed to add card to wallet</P>");}}