private void processNotPresent_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                decimal total = decimal.Parse(purchaseAmount.Text);
                string exp = expMonth.Text + expYear.Text;
                string card = cardNumber.Text;
                string desc = purchaseDesc.Text;

                //process card
                var auth = new staunchAuthorizeNet(cnpLogin.Text, cnpKey.Text);
                var response = auth.cardNotPresent(card, exp, total, desc);

                //show output
                debugApproved.Text = response.Approved.ToString();
                debugMessage.Text = response.Message;
                debugAuth.Text = response.AuthorizationCode;
                debugTransaction.Text = response.TransactionID;

            }
            catch (Exception ex)
            {
                debugMessage.Text = "Error converting purchase amount";
            }
        }
        private void processPresent_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                decimal total = decimal.Parse(purchaseAmount.Text);

                //process card
                var auth = new staunchAuthorizeNet(cpLogin.Text, cpKey.Text);
                var response = auth.cardPresent(total, track1Box.Text, track2Box.Text);

                //show output
                debugApproved.Text = response.Approved.ToString();
                debugMessage.Text = response.Message;
                debugAuth.Text = response.AuthorizationCode;
                debugTransaction.Text = response.TransactionID;

            }
            catch (Exception ex)
            {
                debugMessage.Text = "Error converting purchase amount";
            }
        }
        private void batchInitialize_Click(object sender, RoutedEventArgs e)
        {
            var batchWindow = new batchUploads();

            var auth = new staunchAuthorizeNet();
            staunchAuthorizeNet.BatchResult batchResult = auth.BatchUpload(batchUsername.Text, batchPassword.Text, batchDataBox.Text);

            if (batchResult.success)
            {
                debugApproved.Text = "Batch Success";
                debugMessage.Text = batchResult.result;
                debugTransaction.Text = batchResult.id;
                debugAuth.Text = batchResult.count;
            }
            else
            {
                debugApproved.Text = "Batch Failed";
                debugMessage.Text = batchResult.result;
                debugTransaction.Text = "";
                debugAuth.Text = "";
            }

            batchWindow.Show();
            batchWindow.debugOutput.Text = batchResult.debug;

            
        }