remitosqc

How to get more information on didSynchronizeTransaction()

0 votes
Hello, Let's say I make three transactions offline. When I get connectivity back, the SDK automatically sync the three transactions and I receive data in the callback with didSynchronizeTransaction(). However, I only get a GUID but I don't know which of the three transactions is has been synced. In our case, it is really important to know what transaction has been synced to the servers so we can make some procedures afterwards. Is there a way to get more data of the transaction that was just synchronized ? Imagine if we do 10 to 20 transactions in a day, all offline, and then the morning after we sync all theses contracts, that would be really tricky to hope that everything syncs in the same order as it has been created. Hope the question is clear enough :)

Reply to: How to get more information on didSynchronizeTransaction()

0 votes
Hi there, I think you were asking how you can map the temporary package ID to the actual synchronized package ID, so that you know which package has been synchronized and safe to notify to your backend. If that's the case, because the OSS Mobile SDK synchronize queue cleared/synchronized the cached transactions one by one, it should be safe to consider the temporary ID returned in "didStartTransactionSynchronization" callback(D5E6243D-587D-418E-B90A-56EBF76AD656 below) matches the actual package ID returned in "didSynchronizeTransaction" callback (PioIYmNRiN11-ARBNFmjU02K29g= below). Below printed console log represents my test case -- created two transactions offline, then turn on wifi
2019-11-20 16:08:24.102453-0500 Sample[14731:601682] Sync Started for Transaction :D5E6243D-587D-418E-B90A-56EBF76AD656
2019-11-20 16:08:42.490782-0500 Sample[14731:601743] Transaction Successfully synchronized to the Server
2019-11-20 16:08:42.491103-0500 Sample[14731:601743] {
    guid = "PioIYmNRiN11-ARBNFmjU02K29g=";

}
2019-11-20 16:08:42.520255-0500 Sample[14731:601682] Sync Started for Transaction :81668522-A3EF-4117-AD9B-A3E64D513787
2019-11-20 16:08:59.791601-0500 Sample[14731:601746] Transaction Successfully synchronized to the Server
2019-11-20 16:08:59.791841-0500 Sample[14731:601746] {
    guid = "JwmdscONAvVzexMSLVrRwM2krXo=";
}
Duo

Duo Liang OneSpan Evangelism and Partner Integrations Developer


Hello! Looks like you're enjoying the discussion, but haven't signed up for an account.

When you create an account, we remember exactly what you've read, so you always come right back where you left off