IEnumerable<Payload> TrackTransaction(Transaction transaction, SessionControl sessionControl = SessionControl.None, bool isNonInteractive = false)
        {
            yield return engine.TrackTransaction(transaction.TransactionId, transaction.Affiliation, (double)transaction.TotalCostInMicros / 1000000, (double)transaction.ShippingCostInMicros / 1000000, (double)transaction.TotalTaxInMicros / 1000000, transaction.CurrencyCode, sessionControl, isNonInteractive);

            foreach (var item in transaction.Items)
            {
                yield return engine.TrackTransactionItem(transaction.TransactionId, item.Name, (double)item.PriceInMicros / 1000000, item.Quantity, item.SKU, item.Category, transaction.CurrencyCode, sessionControl, isNonInteractive);
            }
        }
 public void SendTransaction(Transaction transaction)
 {
     platformInfoProvider.OnTracking(); // give platform info provider a chance to refresh.
     foreach (var payload in TrackTransaction(transaction, SessionControl))
     {
         SendPayload(payload);
     }
 }