public Application(ApplicationEntry e)
                {
                    PaymentMethod = e.PaymentMethod;
                    CardBrand     = e.CardBrand;

                    AcquirerNumber = e.AcquirerNumber;
                    RecordNumber   = e.RecordNumber;

                    EmvTags = new int[256];
                    var tags = e.EmvTags.Split(',').Select(int.Parse).ToArray();

                    for (var i = 0; i < tags.Length; i++)
                    {
                        EmvTags[i] = tags[i];
                    }
                    EmvTagsLength = tags.Length;
                }
Beispiel #2
0
        public void StoreApplicationRow(int paymentMethod, string cardBrand, int acquirerNumber, int recordNumber, int emvTagsLength, int[] emvTags)
        {
            int[] cleanEmvTags = new int[emvTagsLength];
            for (int i = 0; i < emvTagsLength; i++)
            {
                cleanEmvTags[i] = emvTags[i];
            }

            ApplicationEntry entry = new ApplicationEntry {
                PaymentMethod  = paymentMethod,
                CardBrand      = cardBrand,
                AcquirerNumber = acquirerNumber,
                RecordNumber   = recordNumber,
                EmvTags        = String.Join(",", cleanEmvTags)
            };

            db.Insert(entry);
        }