SetCurrentCardByIndex()
The client sets the current card to be the one with the given index in the current wallet.
aa91
The client sets the current card to be the one with the given index in the current wallet.
This is a deprecated function use ImportArcotID() instead.
Syntax
boolean SetCurrentCardByIndex(index)
Parameters
The following are the parameters of this method:
Parameter
| Type
| Description
|
index | integer | The index number of the card you wish to set. Usually "0" since there is only one card in a wallet. |
Returns
If the method is successful, it returns TRUE. If the method is unsuccessful, 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>");}}