public void Transaction_AmountInDecimal_SetZero()
        {
            var transaction = new Transaction { AmountInDecimal = 0 };

            Assert.AreEqual(0, transaction.Amount);
        }
        public void Transaction_AmountInDecimal_GetCorrectly()
        {
            var transaction = new Transaction { Amount = 3495 };

            Assert.AreEqual(34.95, transaction.AmountInDecimal);
        }
        public void Transaction_AmountInDecimal_SetsCorrectly()
        {
            var transaction = new Transaction { AmountInDecimal = 3.45m };

            Assert.AreEqual(345, transaction.Amount);
        }
        // To save having to install AutoMapper
        public void PopulateFromTransaction(Transaction transaction, string redirectUrl, string apiLogin)
        {
            if (transaction == null || transaction.TransactionPaymentMethod == null)
                return;

            ApiEnvironment = apiLogin;
            RedirectUrl = redirectUrl;
            PaymentMethodToken = transaction.TransactionPaymentMethod.Token;

            FirstName = transaction.TransactionPaymentMethod.FirstName;
            LastName = transaction.TransactionPaymentMethod.LastName;
            Email = transaction.TransactionPaymentMethod.Email;
            PhoneNumber = transaction.TransactionPaymentMethod.PhoneNumber;
            Address1 = transaction.TransactionPaymentMethod.Address1;
            Address2 = transaction.TransactionPaymentMethod.Address2;
            City = transaction.TransactionPaymentMethod.City;
            State = transaction.TransactionPaymentMethod.State;
            Zip = transaction.TransactionPaymentMethod.Zip;
            Country = transaction.TransactionPaymentMethod.Country;
            Number = transaction.TransactionPaymentMethod.Number;
            VerificationValue = transaction.TransactionPaymentMethod.VerificationValue;
            Month = transaction.TransactionPaymentMethod.Month;
            Year = transaction.TransactionPaymentMethod.Year;
            Succeeded = transaction.Succeeded;
            Message = transaction.Message;
            Errors = transaction.TransactionPaymentMethod.Errors;
        }