With VP5300, how do I know the card is inserted or not after the Transaction started?
The VP5300 has the ability to broadcast card insert/removal notifications, even during a transaction. If you look in USDK demo, it is Device-> Start Listen Notifications. Once that is on, you will get a callback for every card state change: Inserted, seated, removed.
IDT_Device.SharedController.device_listenForNotifications(true);
Send "false" to turn them back off.
Once enabled, you will get all notifications to your main message callback as a DeviceState.Notification:
case DeviceState.Notification: if (cardData.Notification == EVENT_NOTIFICATION_Types.EVENT_NOTIFICATION_Card_Inserted_Not_Seated) { SetOutputText(IP2 + " Notification: Card inserted but not Seated\n"); } if (cardData.Notification == EVENT_NOTIFICATION_Types.EVENT_NOTIFICATION_Card_Removed) { SetOutputText(IP2 + " Notification: Card Removed\n"); } if (cardData.Notification == EVENT_NOTIFICATION_Types.EVENT_NOTIFICATION_Card_Not_Seated) { SetOutputText(IP2 + " Notification: Card not Seated\n"); } if (cardData.Notification == EVENT_NOTIFICATION_Types.EVENT_NOTIFICATION_Card_Seated) { SetOutputText(IP2 + " Notification: Card Seated\n"); } if (cardData.Notification == EVENT_NOTIFICATION_Types.EVENT_NOTIFICATION_Swipe_Card) { SetOutputText(IP2 + " Notification: Swipe Card\n"); }
Related articles