Closed alexisdevtailor closed 3 years ago
Hi, there is no real solution to your problem. Terminal serial number is not available to wallet because mapping is not one-to-one. There might be for example only one sendCoins call for multiple transactions made on multiple machines when output queues are enabled and same destination address is used. Why do you need serial number inside sendCoins?
Hello,
Thank you for the reply. We would like to get the serial number in sendCoins() because we would like to know which atm terminal did the purchase. We need this information for auditing purposes. Thanks.
Maybe there is another way to save the terminal serial number together with the transaction in our database. In ITransactionListener.onTransactionUpdated(), what does ITransactionDetails.getRemoteTransactionId() return? Is this the same transactionId that IWallet.sendCoins() returned?
ITransactionDetails.getDetail() contains String that IWallet.sendCoins() returned.
Cool. Thank you for the reply.
Hello,
I would like to ask how to get the terminal serial number from within IWallet.sendCoins(). Our current setting is that we have one IWallet to be used by all atm terminals. My original approach was implementing the ITransactionListener interface and persisting the serial number in a private field of the Extension class. But this will not work since the ITransactionListener callbacks will be called by multiple atm terminals, thereby causing a potential race condition where the persisted serial number is not the correct one when IWallet.sendCoins() attempts to use it.
What is the most reliable way to get this information from inside IWallet.sendCoins()?
Thanks in advance.