Пример #1
0
        public ReceiptModel BasicPurchase(RequestModel model)
        {
            OrderInfo oinfo = new OrderInfo();

            string host = AuthInfo.Host;
            string store_id = AuthInfo.StoreID;
            string api_token = AuthInfo.APIToken;
            string order_id = oinfo.GenerateOrderID();// "Test_P_0333";
            string amount = model.Amount.Value.ToString();
            string pan = model.PAN;// "4242424242424242";
            string expdate = model.ExpDate.ToString();//"0812";
            string crypt = model.Crypt;// "7";
            //string status = "true";

            /* Status Check Example */
            //  HttpsPostRequest mpgReq =
            //    new HttpsPostRequest(host, store_id, api_token, status,
            //               new Purchase(order_id, amount, pan, expdate, crypt));

            Purchase purchase = new Purchase(order_id, amount, pan, expdate, crypt);

            //purchase.SetDynamicDescriptor("2134565");

            HttpsPostRequest mpgReq =
                  new HttpsPostRequest(host, store_id, api_token, purchase);
            ReceiptModel rcptModel = new ReceiptModel();
            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                rcptModel.CardType = receipt.GetCardType();
                rcptModel.TransAmount =receipt.GetTransAmount();
                rcptModel.TxnNumber = receipt.GetTxnNumber();
                rcptModel.ReceiptId = receipt.GetReceiptId();
                rcptModel.TransType = receipt.GetTransType();
                rcptModel.ReferenceNum = receipt.GetReferenceNum();
                rcptModel.ResponseCode = receipt.GetResponseCode();
                rcptModel.ISO = receipt.GetISO();
                rcptModel.BankTotals = receipt.GetBankTotals();
                rcptModel.Message = receipt.GetMessage();
                rcptModel.AuthCode = receipt.GetAuthCode();
                rcptModel.Complete = receipt.GetComplete();
                rcptModel.TransDate = receipt.GetTransDate();
                rcptModel.TransTime = receipt.GetTransTime();
                rcptModel.Ticket = receipt.GetTicket();
                rcptModel.TimedOut = receipt.GetTimedOut();
                rcptModel.IsVisaDebit = receipt.GetIsVisaDebit();
                //Console.WriteLine("StatusCode = " + receipt.GetStatusCode());
                //Console.WriteLine("StatusMessage = " + receipt.GetStatusMessage());
                return rcptModel;

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                return null;
            }
        }
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";
            string order_id = "Test_P_033333";
            string pan = "4242424242424242";
            string expdate = "0812";
            string crypt = "7";

            /*************** Address Verification Service **********************/

            AvsInfo avsCheck = new AvsInfo();

            avsCheck.SetAvsStreetNumber("212");
            avsCheck.SetAvsStreetName("Payton Street");
            avsCheck.SetAvsZipCode("M1M1M1");

            CardVerification cardverify = new CardVerification(order_id, pan, expdate, crypt);
            cardverify.SetAvsInfo(avsCheck);

            /****************** Card Validation Digits *************************/

            CvdInfo cvdCheck = new CvdInfo();
            cvdCheck.SetCvdIndicator("1");
            cvdCheck.SetCvdValue("099");

            cardverify.SetCvdInfo(cvdCheck);
            HttpsPostRequest mpgReq =
                  new HttpsPostRequest(host, store_id, api_token, cardverify);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            string order_id = "usrecur_test001";
            //string cust_id = "bob";
            //string recur_amount = "45.00";
            string pan         = "5454545454545454";
            string expiry_date = "1111";
            //string p_account_number = "123123123";
            //string presentation_type = "X";
            //string add_num = "";
            //string total_num = "";
            //string hold = "";
            string terminate = "false";

            USRecurUpdate recurUpdate = new USRecurUpdate(order_id);

            //recurUpdate.setCustId(cust_id);
            //recurUpdate.setRecurAmount(recur_amount);
            recurUpdate.setPan(pan);
            recurUpdate.setExpiryDate(expiry_date);
            //recurUpdate.setPAccountNumber(p_account_number);
            //recurUpdate.setPresentationType(presentation_type);
            //recurUpdate.setAddNumRecurs(add_num);
            //recurUpdate.setTotalNumRecurs(total_num);
            //recurUpdate.setHold(hold);
            recurUpdate.setTerminate(terminate);

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, recurUpdate);


            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("RecurUpdateSuccess = " + receipt.GetRecurUpdateSuccess());
                Console.WriteLine("NextRecurDate = " + receipt.GetNextRecurDate());
                Console.WriteLine("RecurEndDate = " + receipt.GetRecurEndDate());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            /******************* REQUEST VARIABLES*******************************/

            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            /****************** TRANSACTION VARIABLES *****************************/

            string order_id;                            //will prompt user for input
            string amount              = "5.00";
            string card                = "4242424242424242";
            string exp                 = "1212";
            string crypt               = "7";
            string commcard_invoice    = "INVC090";
            string commcard_tax_amount = "1.00";

            Console.Write("Please enter an order ID: ");
            order_id = Console.ReadLine();

            USPurchase p = new USPurchase(order_id, amount, card, exp, crypt, commcard_invoice, commcard_tax_amount);

            p.SetQuasiCash("Y");

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, p);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("CardLevelResult = " + receipt.GetCardLevelResult());
                //Console.WriteLine("StatusCode = " + receipt.GetStatusCode());
                //Console.WriteLine("StatusMessage = " + receipt.GetStatusMessage());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            /******************* REQUEST VARIABLES*******************************/

            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            /****************** TRANSACTION VARIABLES *****************************/

            string order_id;                            //will prompt user for input
            string txn_number;
            string crypt = "7";
            string dynamic_descriptor = "123456";

            Console.Write("Please enter an order ID: ");
            order_id = Console.ReadLine();

            Console.Write("Please enter a txn number: ");
            txn_number = Console.ReadLine();

            USL23PurchaseCorrection pc = new USL23PurchaseCorrection(order_id, txn_number, crypt);

            pc.SetDynamicDescriptor(dynamic_descriptor);

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, pc);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("Corporate Card = " + receipt.GetIsCorporateCard());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        private void ProcessPayment()
        {
            bool result=true;
            string host = "esqa.moneris.com";
            string store_id = "store3";
            string api_token = "yesguy";
            string order_id = "Test_P_01";
            string amount = "5.00";
            string card = "4242424242424242";
            string exp = "0812";
            string crypt = "7";

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token,
                           new Purchase(order_id, amount, card, exp, crypt), true);

            try
            {
                //TODO: Create booking

                //Send payment request
                Receipt receipt = mpgReq.GetReceipt();

                //Console.WriteLine("CardType = " + receipt.GetCardType());
                //Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                //Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                //Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                //Console.WriteLine("TransType = " + receipt.GetTransType());
                //Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                //Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                //Console.WriteLine("ISO = " + receipt.GetISO());
                //Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                //Console.WriteLine("Message = " + receipt.GetMessage());
                //Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                //Console.WriteLine("Complete = " + receipt.GetComplete());
                //Console.WriteLine("TransDate = " + receipt.GetTransDate());
                //Console.WriteLine("TransTime = " + receipt.GetTransTime());
                //Console.WriteLine("Ticket = " + receipt.GetTicket());
                //Console.WriteLine("TimedOut = " + receipt.GetTimedOut());

                result = true;

            }
            catch (Exception ex)
            {
                result = false;
                //Console.WriteLine(ex);
            }

            if (result)
                Response.Redirect("PaymentFailed.aspx");
            else
                Response.Redirect("PaymentSucceed.aspx");
        }
Пример #7
0
        public static string WebTest()
        {
            string       store_id   = "store5";
            string       api_token  = "yesguy";
            string       order_id   = "Test20150625014816";
            string       amount     = "5.00";
            string       txn_number = "113524-0_10";
            string       processing_country_code = "CA";
            bool         status_check            = false;
            IDebitRefund refund = new IDebitRefund();

            refund.SetOrderId(order_id);
            refund.SetAmount(amount);
            refund.SetTxnNumber(txn_number);
            HttpsPostRequest mpgReq = new HttpsPostRequest();

            mpgReq.SetProcCountryCode(processing_country_code);
            mpgReq.SetTestMode(true); //false or comment out this line for production transactions
            mpgReq.SetStoreId(store_id);
            mpgReq.SetApiToken(api_token);
            mpgReq.SetTransaction(refund);
            mpgReq.SetStatusCheck(status_check);
            mpgReq.Send();

            StringBuilder stringBuilder = new StringBuilder();

            try
            {
                Receipt receipt = mpgReq.GetReceipt();
                stringBuilder.AppendLine("CardType = " + receipt.GetCardType() + "<br/>");
                stringBuilder.AppendLine("TransAmount = " + receipt.GetTransAmount() + "<br/>");
                stringBuilder.AppendLine("TxnNumber = " + receipt.GetTxnNumber() + "<br/>");
                stringBuilder.AppendLine("ReceiptId = " + receipt.GetReceiptId() + "<br/>");
                stringBuilder.AppendLine("TransType = " + receipt.GetTransType() + "<br/>");
                stringBuilder.AppendLine("ReferenceNum = " + receipt.GetReferenceNum() + "<br/>");
                stringBuilder.AppendLine("ResponseCode = " + receipt.GetResponseCode() + "<br/>");
                stringBuilder.AppendLine("ISO = " + receipt.GetISO() + "<br/>");
                stringBuilder.AppendLine("BankTotals = " + receipt.GetBankTotals() + "<br/>");
                stringBuilder.AppendLine("Message = " + receipt.GetMessage() + "<br/>");
                stringBuilder.AppendLine("AuthCode = " + receipt.GetAuthCode() + "<br/>");
                stringBuilder.AppendLine("Complete = " + receipt.GetComplete() + "<br/>");
                stringBuilder.AppendLine("TransDate = " + receipt.GetTransDate() + "<br/>");
                stringBuilder.AppendLine("TransTime = " + receipt.GetTransTime() + "<br/>");
                stringBuilder.AppendLine("Ticket = " + receipt.GetTicket() + "<br/>");
                stringBuilder.AppendLine("TimedOut = " + receipt.GetTimedOut() + "<br/>");
            }
            catch (Exception e)
            {
                stringBuilder.AppendLine(e.Message);
                stringBuilder.AppendLine(e.StackTrace);
            }

            return(stringBuilder.ToString());
        }
        public static void Main(string[] args)
        {
            //Request Variables
            string host      = "esqa.moneris.com";
            string store_id  = "store2";
            string api_token = "yesguy";

            //Transaction Variables
            string order_id;
            string amount = "10.00";
            string track1;
            string track2;
            string pan         = null;
            string expiry_date = null;
            string auth_code   = "AU4R6";
            string pos_code    = "00";

            Console.Write("Please enter an order ID: ");
            order_id = Console.ReadLine();

            Console.Write("Please swipe card\n");
            track1 = Console.ReadLine();
            track2 = Console.ReadLine();

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token,
                                     new Track2ForcePost(order_id, amount, track2, pan, expiry_date, auth_code, pos_code));

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #9
0
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";
            string order_id = "Test_P_0333";
            string amount = "5.00";
            string pan = "4242424242424242";
            string expdate = "0812";
            string crypt = "7";
            //string status = "true";

            /* Status Check Example */
            //  HttpsPostRequest mpgReq =
            //    new HttpsPostRequest(host, store_id, api_token, status,
            //               new Purchase(order_id, amount, pan, expdate, crypt));

            Purchase purchase = new Purchase(order_id, amount, pan, expdate, crypt);

            //purchase.SetDynamicDescriptor("2134565");

            HttpsPostRequest mpgReq =
                  new HttpsPostRequest(host, store_id, api_token, purchase);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());
                //Console.WriteLine("StatusCode = " + receipt.GetStatusCode());
                //Console.WriteLine("StatusMessage = " + receipt.GetStatusMessage());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            /******************* REQUEST VARIABLES*******************************/

            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            /****************** TRANSACTION VARIABLES *****************************/

            string order_id;                            //will prompt user for input
            string cust_id = "Ced_Benson32";
            string amount  = "5.00";
            string card    = "4242424242424242";
            string exp     = "1212";
            string crypt   = "7";

            Console.Write("Please enter an order ID: ");
            order_id = Console.ReadLine();

            USIndependentRefund r = new USIndependentRefund(order_id, cust_id, amount, card, exp, crypt);

            r.SetQuasiCash("Y");

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, r);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("CardLevelResult = " + receipt.GetCardLevelResult());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #11
0
        public static void Main(string[] args)
        {
            string host      = "esqa.moneris.com";
            string store_id  = "moneris";
            string api_token = "hurgle";
            string order_id;
            string cust_id = "Cedric_Benson_32";
            string amount  = "5.00";
            string track1;
            string track2;
            string pan         = null;
            string expiry_date = null;
            string pos_code    = "27";

            Console.Write("Please enter an order ID: ");
            order_id = Console.ReadLine();

            //	Console.Write ("Please swipe card");
            //track1 = Console.ReadLine();
            track2 = ";4242424242424242=09121218184697111130?";

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token,
                                     new Track2Purchase(order_id, amount, track2, pan, expiry_date, pos_code));



            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #12
0
        public static void Main(string[] args)
        {
            /******************* REQUEST VARIABLES*******************************/

            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            /****************** TRANSACTION VARIABLES *****************************/

            string order_id    = "testenctrack2";
            string cust_id     = "Ced_Benson32";
            string amount      = "5.00";
            string enc_track2  = "";
            string pos_code    = "00";
            string device_type = "idtech";
            string auth_code   = "";

            USEncTrack2Forcepost F = new USEncTrack2Forcepost(order_id, cust_id, amount, enc_track2, pos_code, device_type, auth_code);

            //F.SetDynamicDescriptor("FromQA");

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, F);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("MaskedPan = " + receipt.GetMaskedPan());
                Console.WriteLine("CardLevelResult = " + receipt.GetCardLevelResult());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            string order_id;
            string cust_id     = "customer1";
            string amount      = "10.00";
            string pan         = "4242424242424242";
            string expiry_date = "1212";
            string auth_code   = "AU4R6";
            string crypt_type  = "1";

            Console.Write("Please enter an order ID: ");
            order_id = Console.ReadLine();

            USForcePost fp = new USForcePost(order_id, cust_id, amount, pan, expiry_date, auth_code, crypt_type);

            fp.SetQuasiCash("Y");

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, fp);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("CardLevelResult = " + receipt.GetCardLevelResult());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            /******************* REQUEST VARIABLES*******************************/

            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            /****************** TRANSACTION VARIABLES *****************************/

            string order_id   = "pinlessdotnettest2";
            string amount     = "1.00";
            string txn_number = "3009-0_6";

            //Console.Write ("Please enter an order ID: ");
            //order_id = Console.ReadLine();

            //Console.Write ("Please enter a txn number: ");
            //txn_number= Console.ReadLine();


            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token,
                                                           new USPinlessDebitRefund(order_id, amount, txn_number));


            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            USResGetExpiring usResGetExpiring = new USResGetExpiring();

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, usResGetExpiring);

            /**********************   REQUEST  ************************/

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("DataKey = " + receipt.GetDataKey());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("ResSuccess = " + receipt.GetResSuccess());
                Console.WriteLine("PaymentType = " + receipt.GetPaymentType());

                //ResolveData
                foreach (string dataKey in receipt.GetDataKeys())
                {
                    Console.WriteLine("\nDataKey = " + dataKey);
                    Console.WriteLine("Payment Type = " + receipt.GetExpPaymentType(dataKey));
                    Console.WriteLine("Cust ID = " + receipt.GetExpCustId(dataKey));
                    Console.WriteLine("Phone = " + receipt.GetExpPhone(dataKey));
                    Console.WriteLine("Email = " + receipt.GetExpEmail(dataKey));
                    Console.WriteLine("Note = " + receipt.GetExpNote(dataKey));
                    Console.WriteLine("Masked Pan = " + receipt.GetExpMaskedPan(dataKey));
                    Console.WriteLine("Exp Date = " + receipt.GetExpExpdate(dataKey));
                    Console.WriteLine("Crypt Type = " + receipt.GetExpCryptType(dataKey));
                    Console.WriteLine("Avs Street Number = " + receipt.GetExpAvsStreetNumber(dataKey));
                    Console.WriteLine("Avs Street Name = " + receipt.GetExpAvsStreetName(dataKey));
                    Console.WriteLine("Avs Zipcode = " + receipt.GetExpAvsZipCode(dataKey));
                    Console.WriteLine("Presentation Type = " + receipt.GetExpPresentationType(dataKey));
                    Console.WriteLine("P Account Number = " + receipt.GetExpPAccountNumber(dataKey));
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #16
0
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";
            string order_id = "VM-10006";
            string cust_id = "antonio";
            string recur_amount = "1.50";
            string pan = "4242424242424242";
            string expiry_date = "1111";
            //string add_num = "";
            //string total_num = "";
            //string hold = "";
            //string terminate = "";

            RecurUpdate recurUpdate = new RecurUpdate(order_id);

            recurUpdate.setCustId(cust_id);
            recurUpdate.setRecurAmount(recur_amount);
            recurUpdate.setPan(pan);
            recurUpdate.setExpiryDate(expiry_date);
            //recurUpdate.setAddNumRecurs(add_num);
            //recurUpdate.setTotalNumRecurs(total_num);
            //recurUpdate.setHold(hold);
            //recurUpdate.setTerminate(terminate);

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, recurUpdate);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("RecurUpdateSuccess = " + receipt.GetRecurUpdateSuccess());
                Console.WriteLine("NextRecurDate = " + receipt.GetNextRecurDate());
                Console.WriteLine("RecurEndDate = " + receipt.GetRecurEndDate());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #17
0
        public static void Main(string[] args)
        {
            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            string order_id;                            //will prompt for user input
            string amount   = "9.00";
            string card     = "4242424242424242";
            string exp_date = "1212";
            string crypt    = "7";

            Console.Write("Please enter an order ID: ");
            order_id = Console.ReadLine();

            USPreAuth p = new USPreAuth(order_id, amount, card, exp_date, crypt);

            p.SetQuasiCash("Y");

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, p);

            /**********************	 REQUEST	************************/

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("CardLevelResult = " + receipt.GetCardLevelResult());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            //Request Variables
            string host      = "esqa.moneris.com";
            string store_id  = "store2";
            string api_token = "yesguy";

            //Transaction Variables
            string order_id;
            string txn_number;
            string amount = "5.00";

            Console.Write("Please input the order ID: ");
            order_id = Console.ReadLine();

            Console.Write("Please input the txn number: ");
            txn_number = Console.ReadLine();

            //Request Object
            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token,
                                     new Track2Refund(order_id, amount, txn_number));

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            /******************* REQUEST VARIABLES*******************************/

            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            /****************** TRANSACTION VARIABLES *****************************/

            string order_id          = "pinlessdotnettest2";
            string amount            = "1.00";
            string card              = "4496270000164824";
            string exp               = "0411";
            string presentation_type = "X";
            string intended_use      = "0";
            string p_account_number  = "123";

            //Console.Write ("Please enter an order ID: ");
            //order_id = Console.ReadLine();

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token,
                                                           new USPinlessDebitPurchase(order_id, amount, card, exp, presentation_type, intended_use, p_account_number));

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #20
0
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
            string order_id = "Need_Unique_Order_ID_12345";
            string store_id = "store5";
            string api_token = "yesguy";
            string amount = "304.00";
            string pan = "5454545454545454";
            string expdate = "0812";
            string crypt = "7";

            PreAuth preauth = new PreAuth(order_id, amount, pan, expdate, crypt);

            //preauth.SetDynamicDescriptor("123456");

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, preauth);

            /**********************   REQUEST  ************************/

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            string orig_order_id      = "reauthtest1";
            string order_id           = "orasdfsadfaadfa";
            string txn_number         = "558151-0_10";
            string amount             = "1.00";
            string crypt              = "7";
            string dynamic_descriptor = "123456";

            USReAuth ra = new USReAuth(order_id, orig_order_id, txn_number, amount, crypt);

            ra.SetDynamicDescriptor(dynamic_descriptor);

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, ra);

            /**********************   REQUEST  ************************/

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";
            string order_id = "Need_Unique_Order_ID";
            string cust_id = "Cedric_Benson_32";
            string amount = "20.00";
            string pan = "4242424242424242";
            string expdate = "0812";
            string crypt = "7";

            IndependentRefund indrefund = new IndependentRefund(order_id, cust_id, amount, pan, expdate, crypt);

            //indrefund.SetDynamicDescriptor("123456");

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, indrefund);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #23
0
        public static void Main(string[] args)
        {
            /******************* REQUEST VARIABLES*******************************/

            string host      = "esplusqa.moneris.com";
            string store_id  = "monus00001";
            string api_token = "montoken";

            /****************** TRANSACTION VARIABLES *****************************/

            string pan         = "5454545442424242";
            string expiry_date = "1212";

            USL23IsCorporateCard corpCard =
                new USL23IsCorporateCard(pan, expiry_date);


            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, corpCard);


            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("Corporate Card = " + receipt.GetIsCorporateCard());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #24
0
        public static void Main(string[] args)
        {
            /******************* REQUEST VARIABLES*******************************/

            string host      = "esqa.moneris.com";
            string store_id  = "moneris";
            string api_token = "hurgle";

            /****************** TRANSACTION VARIABLES *****************************/

            string orig_order_id;                       //will prompt user for input
            string assert_activities_desc = "charge_back";
            string assert_impact_desc     = "medium";
            string assert_confidence_desc = "suspicious";

            Console.Write("Please enter an order ID: ");
            orig_order_id = Console.ReadLine();

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token,
                                     new Assert(orig_order_id, assert_activities_desc, assert_impact_desc, assert_confidence_desc));

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Hashtable results = new Hashtable();

                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());

                results = receipt.GetResult();

                //Iterate through the response
                IDictionaryEnumerator r = results.GetEnumerator();
                while (r.MoveNext())
                {
                    Console.WriteLine(r.Key.ToString() + " = " + r.Value.ToString());
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #25
0
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";
            string order_id = "Test_eFraudkdsskdkdk";
            string amount = "5.00";
            string txn_number = "153150-4-0";
            string crypt = "7";
            string dynamic_descriptor = "123456";

            Refund r = new Refund(order_id, amount, txn_number, crypt);

            r.SetDynamicDescriptor(dynamic_descriptor);

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, r);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #26
0
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";
            string order_id = "Need_Unique_Order_ID_7cccxxc7_isssssos";
            string amount = "1.00";
            string txn_number = "12429-222-0";
            string crypt = "7";

            Completion completion = new Completion(order_id, amount, txn_number, crypt);

            //completion.SetDynamicDescriptor("123456");

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, completion);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
            string store_id = "store5";
                string api_token = "yesguy";
                string order_id = "Swipe_001";
                string txn_number = "226-35-0";
                string crypt = "7";
                string dynamic_descriptor = "123456";

            PurchaseCorrection pc = new PurchaseCorrection (order_id, txn_number, crypt);

            pc.SetDynamicDescriptor(dynamic_descriptor);

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, pc);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
    public static void Main(string[] args)
    {
        string store_id  = "moneris";
        string api_token = "hurgle";
        string order_id  = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss");
        string pan       = "4740611374762707";

        string processing_country_code = "CA";

        MpiCardLookup mpiCardLookup = new MpiCardLookup();

        mpiCardLookup.SetOrderId(order_id);
        mpiCardLookup.SetPan(pan);
        //mpiCardLookup.SetDataKey("8OOXGiwxgvfbZngigVFeld9d2"); //Optional - For Moneris Vault and Hosted Tokenization tokens in place of SetPan
        mpiCardLookup.SetNotificationUrl("https://yournotificationurl.com");         //(Website URL that will receive 3DS Method Completion response from ACS)

        HttpsPostRequest mpgReq = new HttpsPostRequest();

        mpgReq.SetProcCountryCode(processing_country_code);
        mpgReq.SetTestMode(true);         //false or comment out this line for production transactions
        mpgReq.SetStoreId(store_id);
        mpgReq.SetApiToken(api_token);
        mpgReq.SetTransaction(mpiCardLookup);
        mpgReq.Send();

        try
        {
            Receipt receipt = mpgReq.GetReceipt();

            Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
            Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
            Console.WriteLine("Message = " + receipt.GetMessage());
            Console.WriteLine("Messagetype = " + receipt.GetMpiMessageType());
            Console.WriteLine("ThreeDSMethodURL = " + receipt.GetMpiThreeDSMethodURL());
            Console.WriteLine("ThreeDSMethodData = " + receipt.GetMpiThreeDSMethodData());
            Console.WriteLine("ThreeDSServerTransId = " + receipt.GetMpiThreeDSServerTransId());
        }
        catch (Exception e)
        {
            Console.WriteLine(e);
        }
    }
Пример #29
0
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "spedguy";
            string order_id = "999i9i9";
            string amount = "9.00";
              	string txn_number = "267-17-0";

               	/************************** Request *************************/

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token,
                        new IDebitRefund (order_id, amount, txn_number));

            try
            {
               	Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            string host       = "esqa.moneris.com";
            string store_id   = "spedguy";
            string api_token  = "intuit_sped";
            string order_id   = "qqwwee";
            string txn_number = "1085-0_0";
            string crypt      = "7";

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token,
                                     new Track2PurchaseCorrection(order_id, txn_number));



            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
    public static void Main(string[] args)
    {
        string store_id  = "moneris";
        string api_token = "hurgle";
        string processing_country_code = "CA";

        //BASE64 Encoded CRes value returned from response at completion of challenge flow.
        string cres = "eyJhY3NUcmFuc0lEIjoiNzQ0ZDI2NjUtNjU2Yy00ZGNiLTg3MWUtYTBkYmMwODA0OTYzIiwibWVzc2FnZVR5cGUiOiJDUmVzIiwiY2hhbGxlbmdlQ29tcGxldGlvbkluZCI6IlkiLCJtZXNzYWdlVmVyc2lvbiI6IjIuMS4wIiwidHJhbnNTdGF0dXMiOiJZIiwidGhyZWVEU1NlcnZlclRyYW5zSUQiOiJlMTFkNDk4NS04ZDI1LTQwZWQtOTlkNi1jMzgwM2ZlNWU2OGYifQ==";

        MpiCavvLookup mpiCavvLookup = new MpiCavvLookup();

        mpiCavvLookup.SetCRes(cres);

        HttpsPostRequest mpgReq = new HttpsPostRequest();

        mpgReq.SetProcCountryCode(processing_country_code);
        mpgReq.SetTestMode(true);         //false or comment out this line for production transactions
        mpgReq.SetStoreId(store_id);
        mpgReq.SetApiToken(api_token);
        mpgReq.SetTransaction(mpiCavvLookup);
        mpgReq.Send();

        try
        {
            Receipt receipt = mpgReq.GetReceipt();

            Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
            Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
            Console.WriteLine("Message = " + receipt.GetMessage());

            Console.WriteLine("ThreeDSServerTransId = " + receipt.GetMpiThreeDSServerTransId());
            Console.WriteLine("TransStatus = " + receipt.GetMpiTransStatus());
            Console.WriteLine("ChallengeCompletionIndicator = " + receipt.GetMpiChallengeCompletionIndicator());
            Console.WriteLine("Cavv = " + receipt.GetMpiCavv());
            Console.WriteLine("ECI = " + receipt.GetMpiEci());
        }
        catch (Exception e)
        {
            Console.WriteLine(e);
        }
    }
Пример #32
0
        public static void Main(string[] args)
        {
            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            string pan        = "5454545454545454";
            string expdate    = "0909";
            string crypt_type = "7";
            string duration   = "900";

            USResTempAdd usResTempAdd = new USResTempAdd(pan, expdate, duration, crypt_type);

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, usResTempAdd);

            /**********************   REQUEST  ************************/

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("DataKey = " + receipt.GetDataKey());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("ResSuccess = " + receipt.GetResSuccess());
                Console.WriteLine("PaymentType = " + receipt.GetPaymentType());

                //ResolveData
                Console.WriteLine("MaskedPan = " + receipt.GetResDataMaskedPan());
                Console.WriteLine("Exp Date = " + receipt.GetResDataExpdate());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #33
0
        public static void Main(string[] args)
        {
            /********************* Post Request Variables ********************************/

            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";

            /********************* Transactional Variables *******************************/

            string order_id = "Need_Unique_Order_ID";
            string amount = "10.00";
            string pan = "4242424242424242";
            string expiry_date = "0812";
            string crypt = "7";

            /************************* Recur Variables **********************************/

            string recur_unit = "month"; //eom = end of month
            string start_now = "true";
            string start_date = "2006/07/28";
            string num_recurs = "12";
            string period = "1";
            string recur_amount = "30.00";

            /************************* Recur Object Option1 ******************************/

            Recur recurring_cycle = new Recur (recur_unit, start_now, start_date,
                               num_recurs, period, recur_amount);

            /************************* Recur Object Option2 ******************************/

            Hashtable recur_hash = new Hashtable();

            recur_hash.Add ("recur_unit", recur_unit);
            recur_hash.Add ("start_now", start_now);
            recur_hash.Add ("start_date", start_date);
            recur_hash.Add ("num_recurs", num_recurs);
            recur_hash.Add ("period", period);
            recur_hash.Add ("recur_amount", recur_amount);

            Recur recurring_cycle2 = new Recur (recur_hash);

            /************************ Transactional Object *******************************/

            Purchase purchase = new Purchase (order_id, amount, pan, expiry_date, crypt);

            /******************************* Set Recur ***********************************/

            purchase.SetRecur (recurring_cycle);

            /**************************** Https Post Request ***************************/

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, purchase);

            /******************************* Receipt ***********************************/

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

             	Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("Recur Success = " + receipt.GetRecurSuccess());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            string data_key         = "1X07zf118J5g7QESF421G27";
            string order_id         = "res_purchase_pinless_4";
            string amount           = "1.00";
            string cust_id          = "customer1"; //if sent will be submitted, otherwise cust_id from profile will be used
            string intended_use     = "1";
            string p_account_number = "23456789";

            USResPurchasePinless usResPurchasePinless = new USResPurchasePinless(data_key, order_id, cust_id, amount,
                                                                                 intended_use);

            usResPurchasePinless.SetPAccountNumber(p_account_number);

            /************************* Recur Variables **********************************/

            string recur_unit   = "month";
            string start_now    = "true";
            string start_date   = "2008/12/01";
            string num_recurs   = "12";
            string period       = "1";
            string recur_amount = "30.00";

            /************************* Recur Object Option1 ******************************/

            Recur recurring_cycle = new Recur(recur_unit, start_now, start_date,
                                              num_recurs, period, recur_amount);

            usResPurchasePinless.SetRecur(recurring_cycle);

            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, usResPurchasePinless);

            /**********************   REQUEST  ************************/

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("DataKey = " + receipt.GetDataKey());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("RecurSuccess = " + receipt.GetRecurSuccess());
                Console.WriteLine("ResSuccess = " + receipt.GetResSuccess());
                Console.WriteLine("PaymentType = " + receipt.GetPaymentType());

                //ResolveData
                Console.WriteLine("\nCust ID = " + receipt.GetResDataCustId());
                Console.WriteLine("Phone = " + receipt.GetResDataPhone());
                Console.WriteLine("Email = " + receipt.GetResDataEmail());
                Console.WriteLine("Note = " + receipt.GetResDataNote());
                Console.WriteLine("Masked Pan = " + receipt.GetResDataMaskedPan());
                Console.WriteLine("Exp Date = " + receipt.GetResDataExpdate());
                Console.WriteLine("Presentation Type = " + receipt.GetResDataPresentationType());
                Console.WriteLine("P Account Number = " + receipt.GetResDataPAccountNumber());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #35
0
        public static void Main(string[] args)
        {
            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            string ecr_no = "64000001";//ecr within store  "64000001"



            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, new USBatchClose(ecr_no));

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                if ((receipt.GetReceiptId()).Equals("Global Error Receipt"))
                {
                    Console.WriteLine("CardType = " + receipt.GetCardType());
                    Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                    Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                    Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                    Console.WriteLine("TransType = " + receipt.GetTransType());
                    Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                    Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                    Console.WriteLine("ISO = " + receipt.GetISO());
                    Console.WriteLine("BankTotals = null");
                    Console.WriteLine("Message = " + receipt.GetMessage());
                    Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                    Console.WriteLine("Complete = " + receipt.GetComplete());
                    Console.WriteLine("TransDate = " + receipt.GetTransDate());
                    Console.WriteLine("TransTime = " + receipt.GetTransTime());
                    Console.WriteLine("Ticket = " + receipt.GetTicket());
                    Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                }
                else
                {
                    foreach (string ecr in receipt.GetTerminalIDs())
                    {
                        Console.WriteLine("ECR: " + ecr);
                        foreach (string cardType in receipt.GetCreditCards(ecr))
                        {
                            Console.WriteLine("\tCard Type: " + cardType);

                            Console.WriteLine("\t\tPurchase: Count = "
                                              + receipt.GetPurchaseCount(ecr, cardType)
                                              + " Amount = "
                                              + receipt.GetPurchaseAmount(ecr,
                                                                          cardType));

                            Console.WriteLine("\t\tRefund: Count = "
                                              + receipt.GetRefundCount(ecr, cardType)
                                              + " Amount = "
                                              + receipt.GetRefundAmount(ecr, cardType));

                            Console.WriteLine("\t\tCorrection: Count = "
                                              + receipt.GetCorrectionCount(ecr, cardType)
                                              + " Amount = "
                                              + receipt.GetCorrectionAmount(ecr,
                                                                            cardType));
                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #36
0
        public static void Test(string StoreName, string Api_Token, string CreditCardNumber)
        {
            string order_id = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss");
            //string store_id = "store5";
            string store_id = StoreName;
            //string api_token = "yesguy";
            string api_token = Api_Token;
            string amount    = "5.00";
            string pan       = "4242424242424242";
            string expdate   = "1901"; //YYMM format
            string crypt     = "7";
            string processing_country_code = "CA";
            bool   status_check            = false;

            CofInfo cof = new CofInfo();

            cof.SetPaymentIndicator("U");
            cof.SetPaymentInformation("2");
            cof.SetIssuerId("168451306048014");

            Purchase purchase = new Purchase();

            purchase.SetOrderId(order_id);
            purchase.SetAmount(amount);
            ///Credit card number
            purchase.SetPan(pan);
            purchase.SetExpDate("2011");
            purchase.SetCryptType(crypt);
            purchase.SetDynamicDescriptor("2134565");
            //purchase.SetWalletIndicator(""); //Refer to documentation for details
            //purchase.SetCofInfo(cof);

            //Optional - Set for Multi-Currency only
            //setAmount must be 0.00 when using multi-currency
            //purchase.SetMCPAmount("500"); //penny value amount 1.25 = 125
            //purchase.SetMCPCurrencyCode("840"); //ISO-4217 country currency number
            //purchase.SetCmId("8nAK8712sGaAkls56"); //set only for usage with Offlinx - Unique max 50 alphanumeric characters transaction id generated by merchant



            HttpsPostRequest mpgReq = new HttpsPostRequest();

            var sp = ServicePointManager.SecurityProtocol;

            ServicePointManager.SecurityProtocol = SecurityProtocolType.Tls12;

            mpgReq.SetProcCountryCode(processing_country_code);
            mpgReq.SetTestMode(true); //false or comment out this line for production transactions
            mpgReq.SetStoreId(store_id);
            mpgReq.SetApiToken(api_token);
            mpgReq.SetTransaction(purchase);
            mpgReq.SetStatusCheck(status_check);
            mpgReq.Send();

            try
            {
                Receipt receipt = mpgReq.GetReceipt();
                ServicePointManager.SecurityProtocol = sp;

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());
                Console.WriteLine("HostId = " + receipt.GetHostId());
                Console.WriteLine("MCPAmount = " + receipt.GetMCPAmount());
                Console.WriteLine("MCPCurrencyCode = " + receipt.GetMCPCurrencyCode());
                Console.WriteLine("IssuerId = " + receipt.GetIssuerId());
                Console.ReadLine();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #37
0
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";
            string order_id = "Need_Unique_Order_ID_Cust_Info_005";
            string cust_id = "Lance_Briggs_55";
            string amount = "5.00";
            string track2 = "5268051119993326=0609AAAAAAAAAAAAA000";

              /********************* Billing/Shipping Variables ****************************/

              string first_name = "Bob";
              string last_name = "Smith";
              string company_name = "ProLine Inc.";
              string address = "623 Bears Ave";
              string city = "Chicago";
              string province = "Illinois";
              string postal_code = "M1M2M1";
              string country = "Canada";
              string phone = "777-999-7777";
              string fax = "777-999-7778";
              string tax1 = "10.00";
              string tax2 = "5.78";
              string tax3 = "4.56";
              string shipping_cost = "10.00";

              /********************* Order Line Item Variables *****************************/

              string[] item_description = new string[]{"Chicago Bears Helmet", "Soldier Field Poster"};
              string[] item_quantity = new string[]{"1", "1"};
              string[] item_product_code = new string[]{"CB3450", "SF998S"};
              string[] item_extended_amount = new string[]{"150.00", "19.79"};

              /********************** Customer Information Object **************************/

              CustInfo customer = new CustInfo();

              /********************** Set Customer Billing Information **********************/

              customer.SetBilling (first_name, last_name, company_name, address, city,
                               province, postal_code, country, phone, fax, tax1, tax2,
                               tax3, shipping_cost);

              /******************** Set Customer Shipping Information ***********************/

              customer.SetShipping (first_name, last_name, company_name, address, city,
                                province, postal_code, country, phone, fax, tax1, tax2,
                                tax3, shipping_cost);

              /***************************** Order Line Items  ******************************/

              customer.SetItem (item_description[0], item_quantity[0],
                            item_product_code[0], item_extended_amount[0]);

              customer.SetItem (item_description[1], item_quantity[1],
                            item_product_code[1], item_extended_amount[1]);

               	/************************** Request *************************/

            IDebitPurchase IOP_Txn = new IDebitPurchase (order_id, cust_id, amount, track2);

            IOP_Txn.SetCustInfo (customer);

            //IOP_Txn.SetDynamicDescriptor("dynamicdescriptor1");

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, IOP_Txn);

            try
            {
               	Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            /************************* Post Request Variables *****************************/

            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            /************************* Transactional Variables ***************************/

            string order_id    = "Need_Unique_Order_IDcc";
            string amount      = "150.00";
            string enc_track2  = "";
            string device_type = "idtech";
            string crypt       = "7";

            /********************* Billing/Shipping Variables ****************************/

            string first_name    = "Bob";
            string last_name     = "Smith";
            string company_name  = "ProLine Inc.";
            string address       = "623 Bears Ave";
            string city          = "Chicago";
            string province      = "Illinois";
            string postal_code   = "M1M2M1";
            string country       = "Canada";
            string phone         = "777-999-7777";
            string fax           = "777-999-7778";
            string tax1          = "10.00";
            string tax2          = "5.78";
            string tax3          = "4.56";
            string shipping_cost = "10.00";

            /********************* Order Line Item Variables *****************************/

            string[] item_description     = new string[] { "Chicago Bears Helmet", "Soldier Field Poster" };
            string[] item_quantity        = new string[] { "1", "1" };
            string[] item_product_code    = new string[] { "CB3450", "SF998S" };
            string[] item_extended_amount = new string[] { "150.00", "19.79" };



            /*****************************************************************************/
            /*								             */
            /*			Customer Information Option 1			     */
            /*									     */
            /*****************************************************************************/

            /********************** Customer Information Object **************************/

            CustInfo customer = new CustInfo();

            /********************** Set Customer Billing Information **********************/

            customer.SetBilling(first_name, last_name, company_name, address, city,
                                province, postal_code, country, phone, fax, tax1, tax2,
                                tax3, shipping_cost);

            /******************** Set Customer Shipping Information ***********************/

            customer.SetShipping(first_name, last_name, company_name, address, city,
                                 province, postal_code, country, phone, fax, tax1, tax2,
                                 tax3, shipping_cost);

            /***************************** Order Line Items  ******************************/

            customer.SetItem(item_description[0], item_quantity[0],
                             item_product_code[0], item_extended_amount[0]);

            customer.SetItem(item_description[1], item_quantity[1],
                             item_product_code[1], item_extended_amount[1]);



            /*****************************************************************************/
            /*								             */
            /*			Customer Information Option 2			     */
            /*									     */
            /*****************************************************************************/



            /********************** Customer Information Object **************************/

            CustInfo customer2 = new CustInfo();

            /******************************* Billing Hashtable ***************************/


            Hashtable b = new Hashtable();      //billing hashtable

            b.Add("first_name", first_name);
            b.Add("last_name", last_name);
            b.Add("company_name", company_name);
            b.Add("address", address);
            b.Add("city", city);
            b.Add("province", province);
            b.Add("postal_code", postal_code);
            b.Add("country", country);
            b.Add("phone", phone);
            b.Add("fax", fax);
            b.Add("tax1", tax1);                   //federal tax
            b.Add("tax2", tax2);                   //prov tax
            b.Add("tax3", tax3);                   //luxury tax
            b.Add("shipping_cost", shipping_cost); //shipping cost

            customer2.SetBilling(b);

            /****************************** Shipping Hashtable ***************************/

            Hashtable s = new Hashtable();      //shipping hashtable

            s.Add("first_name", first_name);
            s.Add("last_name", last_name);
            s.Add("company_name", company_name);
            s.Add("address", address);
            s.Add("city", city);
            s.Add("province", province);
            s.Add("postal_code", postal_code);
            s.Add("country", country);
            s.Add("phone", phone);
            s.Add("fax", fax);
            s.Add("tax1", tax1);                   //federal tax
            s.Add("tax2", tax2);                   //prov tax
            s.Add("tax3", tax3);                   //luxury tax
            s.Add("shipping_cost", shipping_cost); //shipping cost

            customer2.SetShipping(s);

            /************************* Order Line Item1 Hashtable ************************/

            Hashtable i1 = new Hashtable();             //item hashtable #1

            i1.Add("name", item_description[0]);
            i1.Add("quantity", item_quantity[0]);
            i1.Add("product_code", item_product_code[0]);
            i1.Add("extended_amount", item_extended_amount[0]);

            customer2.SetItem(i1);

            /************************* Order Line Item2 Hashtable **************************/

            Hashtable i2 = new Hashtable();             //item hashtable #2

            i2.Add("name", "item2's name");
            i2.Add("quantity", "7");
            i2.Add("product_code", "item2's product code");
            i2.Add("extended_amount", "5.01");

            customer2.SetItem(i2);



            /*************** Miscellaneous Customer Information Methods *******************/

            customer.SetEmail("*****@*****.**");
            customer.SetInstructions("Make it fast!");



            /********************** Transactional Request Object **************************/

            USEncPreauth preauth = new USEncPreauth(order_id, amount, enc_track2, device_type, crypt);

            /************************ Set Customer Information ***************************/

            preauth.SetCustInfo(customer);

            /**************************** Https Post Request ***************************/

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, preauth);

            /******************************* Receipt ***********************************/

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("CardLevelResult = " + receipt.GetCardLevelResult());
                Console.WriteLine("MaskedPan = " + receipt.GetMaskedPan());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            /********************* Post Request Variables ********************************/

            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";

            /********************* Transactional Variables *******************************/

            string order_id = "Need_Unique_Order_ID";
            string amount = "10.00";
            string pan = "4242424242424242";
            string expdate = "0812";
            string crypt = "7";

            /********************* Billing/Shipping Variables ****************************/

            string first_name = "Bob";
            string last_name = "Smith";
            string company_name = "ProLine Inc.";
            string address = "623 Bears Ave";
            string city = "Chicago";
            string province = "Illinois";
            string postal_code = "M1M2M1";
            string country = "Canada";
            string phone = "777-999-7777";
            string fax = "777-999-7778";
            string tax1 = "10.00";
            string tax2 = "5.78";
            string tax3 = "4.56";
            string shipping_cost = "10.00";

            /********************* Order Line Item Variables *****************************/

            string[] item_description = new string[]{"Chicago Bears Helmet", "Soldier Field Poster"};
            string[] item_quantity = new string[]{"1", "1"};
            string[] item_product_code = new string[]{"CB3450", "SF998S"};
            string[] item_extended_amount = new string[]{"150.00", "19.79"};

               	/*****************************************************************************/
               	/*								             */
               	/*			Customer Information Option 1			     */
               	/*									     */
               	/*****************************************************************************/

            /********************** Customer Information Object **************************/

            CustInfo customer = new CustInfo();

            /********************** Set Customer Billing Information **********************/

            customer.SetBilling (first_name, last_name, company_name, address, city,
                         province, postal_code, country, phone, fax, tax1, tax2,
                         tax3, shipping_cost);

            /******************** Set Customer Shipping Information ***********************/

            customer.SetShipping (first_name, last_name, company_name, address, city,
                         province, postal_code, country, phone, fax, tax1, tax2,
                         tax3, shipping_cost);

            /***************************** Order Line Items  ******************************/

            customer.SetItem (item_description[0], item_quantity[0],
                      item_product_code[0], item_extended_amount[0]);

            customer.SetItem (item_description[1], item_quantity[1],
                      item_product_code[1], item_extended_amount[1]);

               	/*****************************************************************************/
               	/*								             */
               	/*			Customer Information Option 2			     */
               	/*									     */
               	/*****************************************************************************/

               	/********************** Customer Information Object **************************/

            CustInfo customer2 = new CustInfo();

                /******************************* Billing Hashtable ***************************/

                Hashtable b = new Hashtable();	//billing hashtable

                b.Add("first_name",first_name);
                b.Add("last_name", last_name);
                b.Add("company_name",company_name);
                b.Add("address", address);
                b.Add("city", city);
                b.Add("province", province);
                b.Add("postal_code", postal_code);
                b.Add("country", country);
                b.Add("phone", phone);
                b.Add("fax", fax);
                b.Add("tax1",tax1);       //federal tax
                b.Add("tax2",tax2);        //prov tax
                b.Add("tax3",tax3);        //luxury tax
                b.Add("shipping_cost", shipping_cost);   //shipping cost

                customer2.SetBilling(b);

                /****************************** Shipping Hashtable ***************************/

                Hashtable s = new Hashtable();	//shipping hashtable

                s.Add("first_name",first_name);
                s.Add("last_name", last_name);
                s.Add("company_name", company_name);
                s.Add("address", address);
                s.Add("city", city);
                s.Add("province", province);
                s.Add("postal_code",postal_code);
                s.Add("country", country);
                s.Add("phone", phone);
                s.Add("fax", fax);
                s.Add("tax1", tax1);       //federal tax
                s.Add("tax2", tax2);        //prov tax
                s.Add("tax3", tax3);        //luxury tax
                s.Add("shipping_cost", shipping_cost);   //shipping cost

                customer2.SetShipping(s);

                /************************* Order Line Item1 Hashtable ************************/

                Hashtable i1 = new Hashtable();		//item hashtable #1

                i1.Add("name", item_description[0]);
                i1.Add("quantity", item_quantity[0]);
                i1.Add("product_code", item_product_code[0]);
                i1.Add("extended_amount", item_extended_amount[0]);

                customer2.SetItem(i1);

            /************************* Order Line Item2 Hashtable **************************/

                Hashtable i2 = new Hashtable();		//item hashtable #2

                i2.Add("name","item2's name");
                i2.Add("quantity","7");
                i2.Add("product_code","item2's product code");
                i2.Add("extended_amount","5.01");

                customer2.SetItem(i2);

                /*************** Miscellaneous Customer Information Methods *******************/

                customer.SetEmail("*****@*****.**");
                customer.SetInstructions("Make it fast!");

            /********************** Transactional Request Object **************************/

                Purchase purchase = new Purchase(order_id, amount, pan, expdate, crypt);

                /************************ Set Customer Information ***************************/

                purchase.SetCustInfo (customer);

            /**************************** Https Post Request ***************************/

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, purchase);

            /******************************* Receipt ***********************************/

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

             	Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #40
0
        public static void Main(string[] args)
        {
            /********************** Post Request Variables *************************/

            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";

            /********************** Transactional Variables **********************/

            string order_id = "Test_eFraud_dotNET_1234";
            string amount = "10.02";
            string pan = "4242424242424242";
            string expiry_date = "1111";
            string crypt = "7";

            /*************** Address Verification Service **********************/

               	AvsInfo avsCheck = new AvsInfo();

               	avsCheck.SetAvsStreetNumber ("212");
               	avsCheck.SetAvsStreetName ("Payton Street");
               	avsCheck.SetAvsZipCode ("M1M1M1");
            avsCheck.SetAvsEmail("*****@*****.**");
            avsCheck.SetAvsHostname("hostname");
            avsCheck.SetAvsBrowser("Mozilla");
            avsCheck.SetAvsShipToCountry("CAN");
            avsCheck.SetAvsShipMethod("G");
            avsCheck.SetAvsMerchProdSku("123456");
            avsCheck.SetAvsCustIp("192.168.0.1");
            avsCheck.SetAvsCustPhone("5556667777");

               	Purchase purchaseTxn = new Purchase(order_id, amount, pan, expiry_date, crypt);
               	purchaseTxn.SetAvsInfo (avsCheck);

               	/****************** Card Validation Digits *************************/

               	CvdInfo cvdCheck = new CvdInfo();
               	cvdCheck.SetCvdIndicator ("1");
               	cvdCheck.SetCvdValue ("099");

               	purchaseTxn.SetCvdInfo (cvdCheck);

               	/************************** Request *************************/

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token,purchaseTxn);

            /************************** Receipt *************************/

            try
            {
               	Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut ());
                Console.WriteLine("Avs Response = " + receipt.GetAvsResultCode());
                Console.WriteLine("Cvd Response = " + receipt.GetCvdResultCode());
                Console.WriteLine("ITD Response = " + receipt.GetITDResponse());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #41
0
    public static void Main(string[] args)
    {
        string order_id   = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss");
        string store_id   = "store5";
        string api_token  = "yesguy";
        string data_key   = "71Sc8RZFWDW7NvxSXCLC9unF4";
        string amount     = "1.00";
        string cust_id    = "customer1";
        string crypt_type = "1";
        string processing_country_code = "CA";
        bool   status_check            = false;

        ResOCTPaymentCC resOCTPaymentCC = new ResOCTPaymentCC();

        resOCTPaymentCC.SetOrderId(order_id);
        resOCTPaymentCC.SetCustId(cust_id);
        resOCTPaymentCC.SetAmount(amount);
        resOCTPaymentCC.SetCryptType(crypt_type);
        resOCTPaymentCC.SetDataKey(data_key);

        HttpsPostRequest mpgReq = new HttpsPostRequest();

        mpgReq.SetProcCountryCode(processing_country_code);
        mpgReq.SetTestMode(true);         //false or comment out this line for production transactions
        mpgReq.SetStoreId(store_id);
        mpgReq.SetApiToken(api_token);
        mpgReq.SetTransaction(resOCTPaymentCC);
        mpgReq.SetStatusCheck(status_check);
        mpgReq.Send();

        try
        {
            Receipt receipt = mpgReq.GetReceipt();

            Console.WriteLine("DataKey = " + receipt.GetDataKey());
            Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
            Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
            Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
            Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
            Console.WriteLine("Message = " + receipt.GetMessage());
            Console.WriteLine("TransDate = " + receipt.GetTransDate());
            Console.WriteLine("TransTime = " + receipt.GetTransTime());
            Console.WriteLine("TransType = " + receipt.GetTransType());
            Console.WriteLine("Complete = " + receipt.GetComplete());
            Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
            Console.WriteLine("CardType = " + receipt.GetCardType());
            Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
            Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
            Console.WriteLine("ResSuccess = " + receipt.GetResSuccess());
            Console.WriteLine("PaymentType = " + receipt.GetPaymentType());
            Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());
            Console.WriteLine("FastFundsIndicator = " + receipt.GetFastFundsIndicator());

            Console.WriteLine("Cust ID = " + receipt.GetResDataCustId());
            Console.WriteLine("Phone = " + receipt.GetResDataPhone());
            Console.WriteLine("Email = " + receipt.GetResDataEmail());
            Console.WriteLine("Note = " + receipt.GetResDataNote());
            Console.WriteLine("Masked Pan = " + receipt.GetResDataMaskedPan());
            Console.WriteLine("Exp Date = " + receipt.GetResDataExpdate());
            Console.WriteLine("Crypt Type = " + receipt.GetResDataCryptType());
            Console.ReadLine();
        }
        catch (Exception e)
        {
            Console.WriteLine(e);
        }
    }
        public static void Main(string[] args)
        {
            /******************* REQUEST VARIABLES*******************************/

            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            /****************** TRANSACTION VARIABLES *****************************/

            string order_id;                    //will prompt user for input
            string cust_id = "B_Urlac_54";
            string amount  = "10.42";
            string pan     = "4242424242424242";
            string exp     = "1212";
            string cavv    = "AAABBJg0VhI0VniQEjRWAAAAAAA";

            Console.Write("Please enter an order ID: ");
            order_id = Console.ReadLine();

            /************************ Transaction Object Option1 *************************/

            USCavvPreAuth cavvPreAuth
                = new USCavvPreAuth(order_id,
                                    cust_id,
                                    amount,
                                    pan,
                                    exp,
                                    cavv);


            /************************ Transaction Object Option2 *************************/

            Hashtable cavvParams = new Hashtable();     //transaction hashtable option

            cavvParams.Add("order_id", order_id);
            cavvParams.Add("cust_id", cust_id);
            cavvParams.Add("amount", amount);
            cavvParams.Add("pan", pan);
            cavvParams.Add("expdate", exp);
            cavvParams.Add("cavv", cavv);

            USCavvPreAuth cavvPreAuth2
                = new USCavvPreAuth(cavvParams);                 //single paramater hashtable construtor

            /*************** Address Verification Service **********************/

            AvsInfo avsCheck = new AvsInfo();

            avsCheck.SetAvsStreetNumber("212");
            avsCheck.SetAvsStreetName("Payton Street");
            avsCheck.SetAvsZipCode("M1M1M1");

            cavvPreAuth.SetAvsInfo(avsCheck);

            /****************** Card Validation Digits *************************/

            CvdInfo cvdCheck = new CvdInfo();

            cvdCheck.SetCvdIndicator("1");
            cvdCheck.SetCvdValue("099");

            cavvPreAuth.SetCvdInfo(cvdCheck);

            /*************************** Https Post Request *****************************/

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, cavvPreAuth);

            /****************************** Receipt *************************************/

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("Avs Response = " + receipt.GetAvsResultCode());
                Console.WriteLine("Cvd Response = " + receipt.GetCvdResultCode());
                Console.WriteLine("CardLevelResult = " + receipt.GetCardLevelResult());
                Console.WriteLine("CavvResultCode = " + receipt.GetCavvResultCode());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #43
0
        public static void Main(string[] args)
        {
            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            string phone   = "0000000000";
            string email   = "*****@*****.**";
            string note    = "my note";
            string cust_id = "customer1";

            //ACHInfo Variables
            string sec             = "ppd";
            string cust_first_name = "Christian";
            string cust_last_name  = "M";
            string cust_address1   = "3300 Bloor St W";
            string cust_address2   = "4th floor west tower";
            string cust_city       = "Toronto";
            string cust_state      = "ON";
            string cust_zip        = "M1M1M1";
            string routing_num     = "490000018";
            string account_num     = "222222";
            string check_num       = "11";
            string account_type    = "checking";


            ACHInfo achinfo = new ACHInfo(sec, cust_first_name, cust_last_name,
                                          cust_address1, cust_address2, cust_city, cust_state, cust_zip,
                                          routing_num, account_num, check_num, account_type);


            //alternatively, each field of ACHInfo can be set individually

            /*ACHInfo achinfo = new ACHInfo();
             *
             * //************************MANDATORY ACH VARIABLES***************************
             * achinfo.SetSec(sec);
             * achinfo.SetRoutingNum(routing_num);
             * achinfo.SetAccountNum(account_num);
             * achinfo.SetAccountType(account_type);
             *
             * //************************OPTIONAL ACH VARIABLES***************************
             * achinfo.SetCustFirstName(cust_first_name);
             * achinfo.SetCustLastName(cust_last_name);
             * achinfo.SetCustAddress1(cust_address1);
             * achinfo.SetCustAddress2(cust_address2);
             * achinfo.SetCustCity(cust_city);
             * achinfo.SetCustState(cust_state);
             * achinfo.SetCustZip(cust_zip);
             * achinfo.SetCheckNum(check_num);
             */
            USResAddAch usResAddAch = new USResAddAch(cust_id); //cust_id should always be passed into constructor, even if blank

            usResAddAch.SetAchInfo(achinfo);

            //************************OPTIONAL VARIABLES***************************

            usResAddAch.SetCustId(cust_id);
            usResAddAch.SetPhone(phone);
            usResAddAch.SetEmail(email);
            usResAddAch.SetNote(note);

            /**********************   REQUEST  ************************/
            HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, usResAddAch);

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("DataKey = " + receipt.GetDataKey());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("ResSuccess = " + receipt.GetResSuccess());
                Console.WriteLine("PaymentType = " + receipt.GetPaymentType());

                //ResolveData
                Console.WriteLine("\nCust ID = " + receipt.GetResDataCustId());
                Console.WriteLine("Phone = " + receipt.GetResDataPhone());
                Console.WriteLine("Email = " + receipt.GetResDataEmail());
                Console.WriteLine("Note = " + receipt.GetResDataNote());
                Console.WriteLine("Sec = " + receipt.GetResDataSec());
                Console.WriteLine("Cust First Name = " + receipt.GetResDataCustFirstName());
                Console.WriteLine("Cust Last Name = " + receipt.GetResDataCustLastName());
                Console.WriteLine("Cust Address 1 = " + receipt.GetResDataCustAddress1());
                Console.WriteLine("Cust Address 2 = " + receipt.GetResDataCustAddress2());
                Console.WriteLine("Cust City = " + receipt.GetResDataCustCity());
                Console.WriteLine("Cust State = " + receipt.GetResDataCustState());
                Console.WriteLine("Cust Zip = " + receipt.GetResDataCustZip());
                Console.WriteLine("Routing Num = " + receipt.GetResDataRoutingNum());
                Console.WriteLine("Masked Account Num = " + receipt.GetResDataMaskedAccountNum());
                Console.WriteLine("Check Num = " + receipt.GetResDataCheckNum());
                Console.WriteLine("Account Type = " + receipt.GetResDataAccountType());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #44
0
        public static void Main(string[] args)
        {
            /******************** Post Request Variables ********************************/

            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";

            /******************** Transactional Variables ******************************/

            string order_id = "Need_Unique_Order_ID_12345";
            string cust_id = "CUS887H67";
            string amount = "1.00";
            string pan = "4242424242424242";
            string expiry_date = "1111";
            string cavv = "AAABBJg0VhI0VniQEjRWAAAAAAA=";
            string dynamic_descriptor = "123456";

            /************************ Transaction Object Option1 *************************/

               	CavvPreAuth cavvPreauth
                = new CavvPreAuth (order_id, cust_id, amount, pan, expiry_date, cavv);

            cavvPreauth.SetDynamicDescriptor(dynamic_descriptor);

            /************************ Transaction Object Option2 *************************/

            Hashtable cavvParams = new Hashtable();	//transaction hashtable option
            cavvParams.Add("order_id",order_id);
            cavvParams.Add("cust_id",cust_id);
            cavvParams.Add("amount",amount);
            cavvParams.Add("pan",pan);
            cavvParams.Add("expdate",expiry_date);
            cavvParams.Add("cavv",cavv);

            CavvPreAuth cavvPreauth2
                    = new CavvPreAuth(cavvParams); //single paramater hashtable construtor

            /*************************** Https Post Request *****************************/

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, cavvPreauth2);

            /****************************** Receipt *************************************/

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("CavvResultCode = " + receipt.GetCavvResultCode());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #45
0
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
            string store_id = "store5";
            string api_token = "yesguy";
            string ecr_no = args[3];	//ecr within store

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host,store_id, api_token, new BatchClose (ecr_no));

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                if ( (receipt.GetReceiptId()).Equals("Global Error Receipt") )
                {

                    Console.WriteLine("CardType = " + receipt.GetCardType());
                    Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                    Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                    Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                    Console.WriteLine("TransType = " + receipt.GetTransType());
                    Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                    Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                    Console.WriteLine("ISO = " + receipt.GetISO());
                    Console.WriteLine("BankTotals = null");
                    Console.WriteLine("Message = " + receipt.GetMessage());
                    Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                    Console.WriteLine("Complete = " + receipt.GetComplete());
                    Console.WriteLine("TransDate = " + receipt.GetTransDate());
                    Console.WriteLine("TransTime = " + receipt.GetTransTime());
                    Console.WriteLine("Ticket = " + receipt.GetTicket());
                    Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                }
                else
                {
                    foreach ( string ecr in receipt.GetTerminalIDs() )
                    {
                        Console.WriteLine("ECR: " + ecr);
                        foreach ( string cardType in receipt.GetCreditCards(ecr) )
                        {
                            Console.WriteLine("\tCard Type: " + cardType);

                            Console.WriteLine("\t\tPurchase: Count = "
                                                + receipt.GetPurchaseCount(ecr,cardType)
                                                + " Amount = "
                                                + receipt.GetPurchaseAmount(ecr,
                                                                              cardType));

                            Console.WriteLine("\t\tRefund: Count = "
                                                + receipt.GetRefundCount(ecr,cardType)
                                                + " Amount = "
                                                + receipt.GetRefundAmount(ecr,cardType));

                            Console.WriteLine("\t\tCorrection: Count = "
                                                + receipt.GetCorrectionCount(ecr,cardType)
                                                + " Amount = "
                                                + receipt.GetCorrectionAmount(ecr,
                                                                               cardType));

                        }
                    }
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            string store_id  = "store5";
            string api_token = "yesguy";
            string order_id  = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss");
            string amount    = "5.00";
            string pan       = "4242424242424242";
            string expdate   = "0412";
            string crypt     = "7";
            string processing_country_code = "CA";
            bool   status_check            = false;

            CofInfo cof = new CofInfo();

            cof.SetPaymentIndicator("U");
            cof.SetPaymentInformation("2");
            cof.SetIssuerId("168451306048014");

            PreAuth preauth = new PreAuth();

            preauth.SetOrderId(order_id);
            preauth.SetAmount(amount);
            preauth.SetPan(pan);
            preauth.SetExpDate(expdate);
            preauth.SetCryptType(crypt);
            //preauth.SetWalletIndicator(""); //Refer to documentation for details
            preauth.SetCofInfo(cof);

            //preauth.SetCmId("8nAK8712sGaAkls56"); //set only for usage with Offlinx - Unique max 50 alphanumeric characters transaction id generated by merchant

            HttpsPostRequest mpgReq = new HttpsPostRequest();

            mpgReq.SetProcCountryCode(processing_country_code);
            mpgReq.SetTestMode(true); //false or comment out this line for production transactions
            mpgReq.SetStoreId(store_id);
            mpgReq.SetApiToken(api_token);
            mpgReq.SetTransaction(preauth);
            mpgReq.SetStatusCheck(status_check);
            mpgReq.Send();

            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());
                //Console.WriteLine("StatusCode = " + receipt.GetStatusCode());
                //Console.WriteLine("StatusMessage = " + receipt.GetStatusMessage());
                Console.WriteLine("IssuerId = " + receipt.GetIssuerId());
                Console.ReadLine();
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
        public static void Main(string[] args)
        {
            /******************* REQUEST VARIABLES*******************************/

            string host      = "esplusqa.moneris.com";
            string store_id  = "monusqa002";
            string api_token = "qatoken";

            /****************** TRANSACTION VARIABLES *****************************/

            string order_id;                    //will prompt user for input
            string cust_id = "LBriggs";
            string amount  = "1.00";
            string track1;                              //not required for transaction
            string track2;
            string pan                 = null;
            string exp                 = null;  //must send '0000' if swiped
            string pos_code            = "00";
            string commcard_invoice    = "INV98798";
            string commcard_tax_amount = "1.00";

            Console.Write("Please enter an order ID: ");
            order_id = Console.ReadLine();

            Console.WriteLine("Please swipe card");
            track1 = Console.ReadLine();
            track2 = Console.ReadLine();

            Console.WriteLine("\nThe track1 is " + track1);
            Console.WriteLine("\nThe track2 is " + track2);

            /*************** Address Verification Service **********************/
            AvsInfo avsCheck = new AvsInfo();

            avsCheck.SetAvsStreetNumber("212");
            avsCheck.SetAvsStreetName("Payton Street");
            avsCheck.SetAvsZipCode("M1M1M1");

            /****************** Card Validation Digits *************************/
            CvdInfo cvdCheck = new CvdInfo();

            cvdCheck.SetCvdIndicator("1");
            cvdCheck.SetCvdValue("099");

            USTrack2Purchase P = new USTrack2Purchase(order_id,
                                                      cust_id,
                                                      amount,
                                                      track2,
                                                      pan,
                                                      exp,
                                                      pos_code,
                                                      commcard_invoice,
                                                      commcard_tax_amount
                                                      );

            P.SetAvsInfo(avsCheck);
            P.SetCvdInfo(cvdCheck);
            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token, P);



            try
            {
                Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut());
                Console.WriteLine("Avs Response = " + receipt.GetAvsResultCode());
                Console.WriteLine("Cvd Response = " + receipt.GetCvdResultCode());
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }
Пример #48
0
        public static void Main(string[] args)
        {
            string host = "esqa.moneris.com";
              string store_id = "store5";
              string api_token = "yesguy";

              string order_id = "Need_Unique_Order_ID_123456";
              string orig_order_id = "Need_Unique_Order_ID_12345";
              string amount = "304.00";
              string txn_number = "174885-0_7";
              string crypt = "7";

            /*************** Address Verification Service **********************/

               	AvsInfo avsCheck = new AvsInfo();

               	avsCheck.SetAvsStreetNumber ("212");
               	avsCheck.SetAvsStreetName ("Payton Street");
               	avsCheck.SetAvsZipCode ("M1M1M1");
            avsCheck.SetAvsEmail ("*****@*****.**");
            avsCheck.SetAvsHostname ("hostname");
            avsCheck.SetAvsBrowser ("Mozilla");
            avsCheck.SetAvsShipToCountry ("Canada");
            avsCheck.SetAvsShipMethod ("Ground");
            avsCheck.SetAvsMerchProdSku ("123456");
            avsCheck.SetAvsCustIp ("192.168.0.1");
            avsCheck.SetAvsCustPhone ("5556667777");

            ReAuth reauthTxn = new ReAuth(order_id, orig_order_id, txn_number, amount, crypt);
               	reauthTxn.SetAvsInfo (avsCheck);

               	/****************** Card Validation Digits *************************/

               	CvdInfo cvdCheck = new CvdInfo();
               	cvdCheck.SetCvdIndicator ("1");
               	cvdCheck.SetCvdValue ("099");

               	reauthTxn.SetCvdInfo (cvdCheck);

               	/************************** Request *************************/

            HttpsPostRequest mpgReq =
                new HttpsPostRequest(host, store_id, api_token,reauthTxn);

            /************************** Receipt *************************/

            try
            {
               	Receipt receipt = mpgReq.GetReceipt();

                Console.WriteLine("CardType = " + receipt.GetCardType());
                Console.WriteLine("TransAmount = " + receipt.GetTransAmount());
                Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber());
                Console.WriteLine("ReceiptId = " + receipt.GetReceiptId());
                Console.WriteLine("TransType = " + receipt.GetTransType());
                Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum());
                Console.WriteLine("ResponseCode = " + receipt.GetResponseCode());
                Console.WriteLine("ISO = " + receipt.GetISO());
                Console.WriteLine("BankTotals = " + receipt.GetBankTotals());
                Console.WriteLine("Message = " + receipt.GetMessage());
                Console.WriteLine("AuthCode = " + receipt.GetAuthCode());
                Console.WriteLine("Complete = " + receipt.GetComplete());
                Console.WriteLine("TransDate = " + receipt.GetTransDate());
                Console.WriteLine("TransTime = " + receipt.GetTransTime());
                Console.WriteLine("Ticket = " + receipt.GetTicket());
                Console.WriteLine("TimedOut = " + receipt.GetTimedOut ());
                Console.WriteLine("Avs Response = " + receipt.GetAvsResultCode());
                Console.WriteLine("Cvd Response = " + receipt.GetCvdResultCode());
                Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit());

            }
            catch (Exception e)
            {
                Console.WriteLine(e);
            }
        }