public static void Main(string[] args) { string store_id = "store5"; string api_token = "yesguy"; string pan = "4242424242424242"; string expdate = "1912"; string phone = "0000000000"; string email = "*****@*****.**"; string note = "my note"; string cust_id = "customer1"; string crypt_type = "7"; string data_key_format = "0"; string processing_country_code = "CA"; bool status_check = false; AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); CofInfo cof = new CofInfo(); cof.SetIssuerId("168451306048014"); ResAddCC resaddcc = new ResAddCC(); resaddcc.SetPan(pan); resaddcc.SetExpDate(expdate); resaddcc.SetCryptType(crypt_type); resaddcc.SetCustId(cust_id); resaddcc.SetPhone(phone); resaddcc.SetEmail(email); resaddcc.SetNote(note); resaddcc.SetAvsInfo(avsCheck); resaddcc.SetGetCardType("true"); //resaddcc.SetDataKeyFormat(data_key_format); //optional resaddcc.SetCofInfo(cof); 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(resaddcc); mpgReq.SetStatusCheck(status_check); mpgReq.Send(); 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()); Console.WriteLine("Cust ID = " + receipt.GetResDataCustId()); Console.WriteLine("Phone = " + receipt.GetResDataPhone()); Console.WriteLine("Email = " + receipt.GetResDataEmail()); Console.WriteLine("Note = " + receipt.GetResDataNote()); Console.WriteLine("MaskedPan = " + receipt.GetResDataMaskedPan()); Console.WriteLine("Exp Date = " + receipt.GetResDataExpdate()); Console.WriteLine("Crypt Type = " + receipt.GetResDataCryptType()); Console.WriteLine("Avs Street Number = " + receipt.GetResDataAvsStreetNumber()); Console.WriteLine("Avs Street Name = " + receipt.GetResDataAvsStreetName()); Console.WriteLine("Avs Zipcode = " + receipt.GetResDataAvsZipcode()); Console.WriteLine("IssuerId = " + receipt.GetIssuerId()); Console.ReadLine(); } 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 = "10.00"; string pan = "4242424242424242"; string expdate = "1901"; //YYMM format string crypt = "7"; string processing_country_code = "CA"; bool status_check = false; /********************* 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(); purchase.SetOrderId(order_id); purchase.SetAmount(amount); purchase.SetPan(pan); purchase.SetExpDate(expdate); purchase.SetCryptType(crypt); purchase.SetCustInfo(customer); 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(purchase); 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.ReadLine(); } 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 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 store_id = "monusqa002"; string api_token = "qatoken"; string data_key = "AhcyWhamRPNnhyU8RYPxM3saK"; string processing_country_code = "US"; ResLookupMasked resLookupMasked = new ResLookupMasked(); resLookupMasked.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(resLookupMasked); mpgReq.Send(); 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()); Console.WriteLine("Cust ID = " + receipt.GetResDataCustId()); Console.WriteLine("Phone = " + receipt.GetResDataPhone()); Console.WriteLine("Email = " + receipt.GetResDataEmail()); Console.WriteLine("Note = " + receipt.GetResDataNote()); Console.WriteLine("MaskedPan = " + receipt.GetResDataMaskedPan()); Console.WriteLine("Exp Date = " + receipt.GetResDataExpdate()); Console.WriteLine("Crypt Type = " + receipt.GetResDataCryptType()); Console.WriteLine("Avs Street Number = " + receipt.GetResDataAvsStreetNumber()); Console.WriteLine("Avs Street Name = " + receipt.GetResDataAvsStreetName()); Console.WriteLine("Avs Zipcode = " + receipt.GetResDataAvsZipcode()); Console.WriteLine("Presentation Type = " + receipt.GetResDataPresentationType()); Console.WriteLine("P Account Number = " + receipt.GetResDataPAccountNumber()); 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()); Console.ReadLine(); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { string order_id = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss"); string store_id = "store5"; string api_token = "yesguy"; string cust_id = "my customer id"; string amount = "20.00"; string pan = "4242424242424242"; string expdate = "1901"; //YYMM string crypt = "7"; string processing_country_code = "CA"; bool status_check = false; IndependentRefund indrefund = new IndependentRefund(); indrefund.SetOrderId(order_id); indrefund.SetCustId(cust_id); indrefund.SetAmount(amount); indrefund.SetPan(pan); indrefund.SetExpDate(expdate); indrefund.SetCryptType(crypt); indrefund.SetDynamicDescriptor("123456"); 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(indrefund); 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.ReadLine(); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { string order_id = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss"); string store_id = "monusqa002"; string api_token = "qatoken"; string data_key = "5rnXvoHdrJPJ6DwZlSqKH3pFo"; string amount = "1.00"; string cust_id = "customer1"; //if sent will be submitted, otherwise cust_id from profile will be used string crypt_type = "1"; string descriptor = "my descriptor"; string processing_country_code = "US"; bool status_check = false; ResPreauthCC resPreauthCC = new ResPreauthCC(); resPreauthCC.SetDataKey(data_key); resPreauthCC.SetOrderId(order_id); resPreauthCC.SetCustId(cust_id); resPreauthCC.SetAmount(amount); resPreauthCC.SetCryptType(crypt_type); resPreauthCC.SetDynamicDescriptor(descriptor); 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(resPreauthCC); 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("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.WriteLine("Avs Street Number = " + receipt.GetResDataAvsStreetNumber()); Console.WriteLine("Avs Street Name = " + receipt.GetResDataAvsStreetName()); Console.WriteLine("Avs Zipcode = " + receipt.GetResDataAvsZipcode()); Console.ReadLine(); } 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 = "original_order_id"; string txn_number = "original_txn_number"; string phone = "0000000000"; string email = "*****@*****.**"; string note = "my note"; string cust_id = "customer1"; AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); ResTokenizeCC resTokenizeCC = new ResTokenizeCC(order_id, txn_number); //************************OPTIONAL VARIABLES*************************** resTokenizeCC.SetCustId(cust_id); resTokenizeCC.SetPhone(phone); resTokenizeCC.SetEmail(email); resTokenizeCC.SetNote(note); resTokenizeCC.SetAvsInfo(avsCheck); //resTokenizeCC.SetDataKeyFormat("1"); //1=F6L4 w/ Length preserve, 2=F6L4 w/o Length preserve HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, resTokenizeCC); /********************** 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("\nCust ID = " + receipt.GetResDataCustId()); Console.WriteLine("Phone = " + receipt.GetResDataPhone()); Console.WriteLine("Email = " + receipt.GetResDataEmail()); Console.WriteLine("Note = " + receipt.GetResDataNote()); Console.WriteLine("MaskedPan = " + receipt.GetResDataMaskedPan()); Console.WriteLine("Exp Date = " + receipt.GetResDataExpdate()); Console.WriteLine("Crypt Type = " + receipt.GetResDataCryptType()); Console.WriteLine("Avs Street Number = " + receipt.GetResDataAvsStreetNumber()); Console.WriteLine("Avs Street Name = " + receipt.GetResDataAvsStreetName()); Console.WriteLine("Avs Zipcode = " + receipt.GetResDataAvsZipcode()); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { string store_id = "store5"; string api_token = "yesguy"; string order_id = "Test20150625013553"; string cust_id = "antonio"; string recur_amount = "1.50"; string pan = "4242424242424242"; string expiry_date = "1901"; //string add_num = ""; //string total_num = ""; //string hold = ""; //string terminate = ""; string processing_country_code = "CA"; bool status_check = false; CofInfo cof = new CofInfo(); cof.SetIssuerId("139X3130ASCXAS9"); RecurUpdate recurUpdate = new RecurUpdate(); recurUpdate.SetOrderId(order_id); recurUpdate.SetCustId(cust_id); recurUpdate.SetRecurAmount(recur_amount); recurUpdate.SetPan(pan); recurUpdate.SetExpDate(expiry_date); //recurUpdate.SetAddNumRecurs(add_num); //recurUpdate.SetTotalNumRecurs(total_num); //recurUpdate.SetHold(hold); //recurUpdate.SetTerminate(terminate); recurUpdate.SetCofInfo(cof); 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(recurUpdate); mpgReq.SetStatusCheck(status_check); mpgReq.Send(); 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()); Console.ReadLine(); } 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 data_key = "g90io5hS63qXu10Pu51512M8G"; string order_id = "res_purchase_7"; string amount = "1.00"; string cust_id = "customer1"; //if sent will be submitted, otherwise cust_id from profile will be used string crypt_type = "2"; ResPurchaseCC resPurchaseCC = new ResPurchaseCC(data_key, order_id, cust_id, amount, crypt_type); /************************* Recur Variables **********************************/ string recur_unit = "month"; string start_now = "true"; string start_date = "2009/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); resPurchaseCC.SetRecur(recurring_cycle); /********************** REQUEST ************************/ HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, resPurchaseCC); 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("AVSResponse = " + receipt.GetAvsResultCode()); Console.WriteLine("CVDResponse = " + receipt.GetCvdResultCode()); 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("Crypt Type = " + receipt.GetResDataCryptType()); Console.WriteLine("Avs Street Number = " + receipt.GetResDataAvsStreetNumber()); Console.WriteLine("Avs Street Name = " + receipt.GetResDataAvsStreetName()); Console.WriteLine("Avs Zipcode = " + receipt.GetResDataAvsZipcode()); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { string store_id = "monusqa138"; string api_token = "qatoken"; string order_id = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss"); string amount = "5.00"; string pan = "4005554444444403"; string expdate = "1602"; //YYMM format string crypt = "7"; string commcard_invoice = "INVC090"; string commcard_tax_amount = "1.00"; string cust_id = "my customer id"; string convenience_fee = "1.00"; string processing_country_code = "US"; bool status_check = false; ConvFeeInfo convFeeInfo = new ConvFeeInfo(); convFeeInfo.SetConvenienceFee(convenience_fee); Purchase purchase = new Purchase(); purchase.SetOrderId(order_id); purchase.SetCustId(cust_id); purchase.SetAmount(amount); purchase.SetPan(pan); purchase.SetExpDate(expdate); purchase.SetCryptType(crypt); purchase.SetCommcardInvoice(commcard_invoice); purchase.SetCommcardTaxAmount(commcard_tax_amount); purchase.SetConvFeeInfo(convFeeInfo); /********************* 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]); purchase.SetCustInfo(customer); 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(purchase); 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("CfSuccess = " + receipt.GetCfSuccess()); Console.WriteLine("CfStatus = " + receipt.GetCfStatus()); Console.WriteLine("FeeAmount = " + receipt.GetFeeAmount()); Console.WriteLine("FeeRate = " + receipt.GetFeeRate()); Console.WriteLine("FeeType = " + receipt.GetFeeType()); //Console.WriteLine("CardLevelResult = " + receipt.GetCardLevelResult()); //Console.WriteLine("StatusCode = " + receipt.GetStatusCode()); //Console.WriteLine("StatusMessage = " + receipt.GetStatusMessage()); Console.ReadLine(); } 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_1234567"; string orig_order_id = "Need_Unique_Order_ID_12345"; string amount = "304.00"; string txn_number = "174885-0_7"; 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 **************************/ ReAuth reauth = new ReAuth(order_id, orig_order_id, txn_number, amount, crypt); /************************ Set Customer Information ***************************/ reauth.SetCustInfo(customer); /**************************** Https Post Request ***************************/ HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, reauth); /******************************* 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); } }
public static void Main(string[] args) { string store_id = "monusqa002"; string api_token = "qatoken"; string data_key = "yd7qyMBTS1uU4BsLQvPAEeddY"; string pan = "4242424242424242"; string expdate = "1901"; //YYMM format string phone = "0000000000"; string email = "*****@*****.**"; string note = "my note"; string cust_id = "customer1"; string crypt_type = "7"; string processing_country_code = "US"; bool status_check = false; AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); ResUpdateCC usResUpdateCC = new ResUpdateCC(); usResUpdateCC.SetAvsInfo(avsCheck); usResUpdateCC.SetCustId(cust_id); usResUpdateCC.SetPan(pan); usResUpdateCC.SetExpDate(expdate); usResUpdateCC.SetPhone(phone); usResUpdateCC.SetEmail(email); usResUpdateCC.SetNote(note); usResUpdateCC.SetCryptType(crypt_type); usResUpdateCC.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(usResUpdateCC); mpgReq.SetStatusCheck(status_check); mpgReq.Send(); 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()); Console.WriteLine("Cust ID = " + receipt.GetResDataCustId()); Console.WriteLine("Phone = " + receipt.GetResDataPhone()); Console.WriteLine("Email = " + receipt.GetResDataEmail()); Console.WriteLine("Note = " + receipt.GetResDataNote()); Console.WriteLine("MaskedPan = " + receipt.GetResDataMaskedPan()); Console.WriteLine("Exp Date = " + receipt.GetResDataExpdate()); Console.WriteLine("Crypt Type = " + receipt.GetResDataCryptType()); Console.WriteLine("Avs Street Number = " + receipt.GetResDataAvsStreetNumber()); Console.WriteLine("Avs Street Name = " + receipt.GetResDataAvsStreetName()); Console.WriteLine("Avs Zipcode = " + receipt.GetResDataAvsZipcode()); Console.ReadLine(); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { string store_id = "monusqa002"; string api_token = "qatoken"; string order_id = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss"); string amount = "5.00"; string pan = "4242424242424242"; string expdate = "1901"; //YYMM format string crypt = "7"; string commcard_invoice = "INVC090"; string commcard_tax_amount = "1.00"; string processing_country_code = "US"; bool status_check = false; Purchase purchase = new Purchase(); purchase.SetOrderId(order_id); purchase.SetAmount(amount); purchase.SetPan(pan); purchase.SetExpDate(expdate); purchase.SetCryptType(crypt); purchase.SetCommcardInvoice(commcard_invoice); purchase.SetCommcardTaxAmount(commcard_tax_amount); purchase.SetQuasiCash("Y"); 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(purchase); 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("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()); Console.ReadLine(); } 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 cust_id = "Lance_Briggs_55"; string amount = "5.00"; string track2 = "5268051119993326=0609AAAAAAAAAAAAA000"; string processing_country_code = "CA"; bool status_check = false; /********************* 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(); IOP_Txn.SetOrderId(order_id); IOP_Txn.SetCustId(cust_id); IOP_Txn.SetAmount(amount); IOP_Txn.SetIdebitTrack2(track2); IOP_Txn.SetCustInfo(customer); //IOP_Txn.SetDynamicDescriptor("dynamicdescriptor1"); 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(IOP_Txn); 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.ReadLine(); } 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"; bool status_check = false; string order_id = "ord-160916-15:31:39"; string txn_number = "18306-0_11"; string buyer_name = "Buyer Manager"; string local_tax_rate = "13.00"; string duty_amount = "0.00"; string discount_treatment = "0"; string discount_amt = "0.00"; string freight_amount = "0.20"; string ship_to_pos_code = "M8X 2W8"; string ship_from_pos_code = "M1K 2Y7"; string des_cou_code = "CAN"; string vat_ref_num = "VAT12345"; string tax_treatment = "3"; //3 = Gross prices given with tax information provided at invoice level string gst_hst_freight_amount = "0.00"; string gst_hst_freight_rate = "13.00"; string[] item_com_code = { "X3101", "X84802" }; string[] product_code = { "CHR123", "DDSK200" }; string[] item_description = { "Office Chair", "Disk Drive" }; string[] item_quantity = { "3", "1" }; string[] item_uom = { "EA", "EA" }; string[] unit_cost = { "0.20", "0.40" }; string[] vat_tax_amt = { "0.00", "0.00" }; string[] vat_tax_rate = { "13.00", "13.00" }; string[] discount_treatmentL = { "0", "0" }; string[] discount_amtL = { "0.00", "0.00" }; //Create and set VsPurcha VsPurcha vsPurcha = new VsPurcha(); vsPurcha.SetBuyerName(buyer_name); vsPurcha.SetLocalTaxRate(local_tax_rate); vsPurcha.SetDutyAmount(duty_amount); vsPurcha.SetDiscountTreatment(discount_treatment); vsPurcha.SetDiscountAmt(discount_amt); vsPurcha.SetFreightAmount(freight_amount); vsPurcha.SetShipToPostalCode(ship_to_pos_code); vsPurcha.SetShipFromPostalCode(ship_from_pos_code); vsPurcha.SetDesCouCode(des_cou_code); vsPurcha.SetVatRefNum(vat_ref_num); vsPurcha.SetTaxTreatment(tax_treatment); vsPurcha.SetGstHstFreightAmount(gst_hst_freight_amount); vsPurcha.SetGstHstFreightRate(gst_hst_freight_rate); //Create and set VsPurchl VsPurchl vsPurchl = new VsPurchl(); vsPurchl.SetVsPurchl(item_com_code[0], product_code[0], item_description[0], item_quantity[0], item_uom[0], unit_cost[0], vat_tax_amt[0], vat_tax_rate[0], discount_treatmentL[0], discount_amtL[0]); vsPurchl.SetVsPurchl(item_com_code[1], product_code[1], item_description[1], item_quantity[1], item_uom[1], unit_cost[1], vat_tax_amt[1], vat_tax_rate[1], discount_treatmentL[1], discount_amtL[1]); VsCorpais vsCorpais = new VsCorpais(); vsCorpais.SetOrderId(order_id); vsCorpais.SetTxnNumber(txn_number); vsCorpais.SetVsPurch(vsPurcha, vsPurchl); 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(vsCorpais); 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("CavvResultCode = " + receipt.GetCavvResultCode()); Console.ReadLine(); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { string store_id = "monusqa002"; string api_token = "qatoken"; string order_id = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss"); string cust_id = "LBriggs"; string amount = "5.00"; string track2 = ";5258968987035454=06061015454001060101?"; string pan = null; string exp = "0000"; //must send '0000' if swiped string pos_code = "00"; string commcard_invoice = "INV98798"; string commcard_tax_amount = "1.00"; string descriptor = "my descriptor"; string processing_country_code = "US"; bool status_check = false; Track2PreAuth track2preauth = new Track2PreAuth(); track2preauth.SetOrderId(order_id); track2preauth.SetCustId(cust_id); track2preauth.SetAmount(amount); track2preauth.SetTrack2(track2); track2preauth.SetPan(pan); track2preauth.SetExpDate(exp); track2preauth.SetPosCode(pos_code); track2preauth.SetDynamicDescriptor(descriptor); track2preauth.SetCommcardInvoice(commcard_invoice); track2preauth.SetCommcardTaxAmount(commcard_tax_amount); 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(track2preauth); 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("StatusCode = " + receipt.GetStatusCode()); //Console.WriteLine("StatusMessage = " + receipt.GetStatusMessage()); Console.ReadLine(); } 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 cust_id = "my customer id"; string amount = "9.00"; string enc_track2 = "02D901801F4F2800039B%*4924********3428^TESTCARD/MONERIS^*****************************************?*;4924********3428=********************?*F74686E9C85DF05DD8886EE84E5AC0E416FBCBDC12F7516869E4FB88153EF0AEF91A03C45A7BB2917A6B007F50FCB169BE18C6BA1C9EDE0FD3A2408DAFC7B6D2104DE936B693C23F3433A13D06A57DEA237F7A268E8A86F13D5FD1A6443B34DFECE10FCB89D061C9CDB1CE9330F787B59788B2414D73CBC33CD06F7A188D84EA0260832F743E485C0D369929D4840FFAFA12BC3938C4A4DE4FA3FA837D1C2190FFFF3141594047A0008E488C03"; string pos_code = "00"; string device_type = "idtech_bdk"; string dynamic_descriptor = "my descriptor"; string token = ""; string processing_country_code = "CA"; bool status_check = false; EncContactlessPreauth preauth = new EncContactlessPreauth(); preauth.SetOrderId(order_id); preauth.SetCustId(cust_id); preauth.SetAmount(amount); preauth.SetEncTrack2(enc_track2); preauth.SetPosCode(pos_code); preauth.SetDeviceType(device_type); preauth.SetDynamicDescriptor(dynamic_descriptor); preauth.SetToken(token); 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("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("StatusCode = " + receipt.GetStatusCode()); //Console.WriteLine("StatusMessage = " + receipt.GetStatusMessage()); } 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 cust_id = "LBriggs"; string amount = "1.00"; string pos_code = "00"; string device_type = "idtech_bdk"; string processing_country_code = "CA"; bool status_check = false; string dynamic_descriptor = "my descriptor"; string enc_track2 = "02D901801F4F2800039B%*4924********4030^TESTCARD/MONERIS^***************************************" + "**?*;4924********4030=********************?*A7150C78335A5024949516FDA9A68A91C4FBAB1279DD1DE2283D" + "BEBB2C6B3FDEACF7B5B314219D76C00890F347A9640EFE90023E31622F5FD95C14C0362DD2EAB28ADEB46B8B577DA1A1" + "8B707BCC7E48068EFF1882CFB4B369BDC4BB646C870D6083239860B23837EA91DB3F1D8AD066DAAACE2B2DA18D563E4F" + "1EF997696337B8999E9C707DEC4CB0410B887291CAF2EE449573D01613484B80760742A3506C31415939320000A00028" + "3C5E03"; EncTrack2Purchase encpurchase = new EncTrack2Purchase(); encpurchase.SetOrderId(order_id); encpurchase.SetCustId(cust_id); encpurchase.SetAmount(amount); encpurchase.SetEncTrack2(enc_track2); encpurchase.SetPosCode(pos_code); encpurchase.SetDeviceType(device_type); encpurchase.SetDynamicDescriptor(dynamic_descriptor); AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); encpurchase.SetAvsInfo(avsCheck); 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(encpurchase); 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("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()); Console.WriteLine("AVS Response = " + receipt.GetAvsResultCode()); } 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 data_key = "g90io5hS63qXu10Pu51512M8G"; string order_id = "res_preauth_21"; string amount = "1.00"; string cust_id = "customer1"; //if sent will be submitted, otherwise cust_id from profile will be used string crypt_type = "1"; ResPreauthCC resPreauthCC = new ResPreauthCC(data_key, order_id, cust_id, amount, crypt_type); //CustInfo Variables CustInfo custInfo = new CustInfo(); custInfo.SetEmail("*****@*****.**"); custInfo.SetInstructions("Make it fast!"); Hashtable b = new Hashtable(); b.Add("first_name", "Bob"); b.Add("last_name", "Smith"); b.Add("company_name", "Widget Company Inc."); b.Add("address", "111 Bolts Ave."); b.Add("city", "Toronto"); b.Add("province", "Ontario"); b.Add("postal_code", "M8T 1T8"); b.Add("country", "Canada"); b.Add("phone", "416-555-5555"); b.Add("fax", "416-555-5555"); b.Add("tax1", "123.45"); //federal tax b.Add("tax2", "12.34"); //prov tax b.Add("tax3", "15.45"); //luxury tax b.Add("shipping_cost", "456.23"); //shipping cost custInfo.SetBilling(b); /* OR you can pass the individual args. * custInfo.SetBilling( * "Bob", //first name * "Smith", //last name * "Widget Company Inc.", //company name * "111 Bolts Ave.", //address * "Toronto", //city * "Ontario", //province * "M8T 1T8", //postal code * "Canada", //country * "416-555-5555", //phone * "416-555-5555", //fax * "123.45", //federal tax * "12.34", //prov tax * "15.45", //luxury tax * "456.23" //shipping cost * ); */ Hashtable s = new Hashtable(); s.Add("first_name", "Bob"); s.Add("last_name", "Smith"); s.Add("company_name", "Widget Company Inc."); s.Add("address", "111 Bolts Ave."); s.Add("city", "Toronto"); s.Add("province", "Ontario"); s.Add("postal_code", "M8T 1T8"); s.Add("country", "Canada"); s.Add("phone", "416-555-5555"); s.Add("fax", "416-555-5555"); s.Add("tax1", "123.45"); //federal tax s.Add("tax2", "12.34"); //prov tax s.Add("tax3", "15.45"); //luxury tax s.Add("shipping_cost", "456.23"); //shipping cost custInfo.SetShipping(s); /* OR you can pass the individual args. * custInfo.SetShipping( * "Bob", //first name * "Smith", //last name * "Widget Company Inc.", //company name * "111 Bolts Ave.", //address * "Toronto", //city * "Ontario", //province * "M8T 1T8", //postal code * "Canada", //country * "416-555-5555", //phone * "416-555-5555", //fax * "123.45", //federal tax * "12.34", //prov tax * "15.45", //luxury tax * "456.23" //shipping cost * ); */ Hashtable i1 = new Hashtable(); i1.Add("name", "item1's name"); i1.Add("quantity", "5"); i1.Add("product_code", "item1's product code"); i1.Add("extended_amount", "1.01"); custInfo.SetItem(i1); /* OR you can pass the individual args. * custInfo.SetItem( * "item1's name", //name * "5", //quantity * "item1's product code", //product code * "1.01" //extended amount * ); */ Hashtable i2 = new Hashtable(); i2.Add("name", "item2's name"); i2.Add("quantity", "7"); i2.Add("product_code", "item2's product code"); i2.Add("extended_amount", "5.01"); custInfo.SetItem(i2); resPreauthCC.SetCustInfo(custInfo); HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, resPreauthCC); /********************** 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("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("Crypt Type = " + receipt.GetResDataCryptType()); Console.WriteLine("Avs Street Number = " + receipt.GetResDataAvsStreetNumber()); Console.WriteLine("Avs Street Name = " + receipt.GetResDataAvsStreetName()); Console.WriteLine("Avs Zipcode = " + receipt.GetResDataAvsZipcode()); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { string store_id = "monusqa002"; string api_token = "qatoken"; string order_id = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss"); string cust_id = "my customer id"; string amount = "1.00"; string track2 = ";4924190000004030=09121214797536211133?"; string commcard_invoice = "INVC090"; string commcard_tax_amount = "1.00"; string dynamic_descriptor = "my descriptor"; string processing_country_code = "US"; string pos_code = "00"; bool status_check = false; ContactlessPurchase purchase = new ContactlessPurchase(); purchase.SetOrderId(order_id); purchase.SetAmount(amount); purchase.SetTrack2(track2); purchase.SetPosCode(pos_code); purchase.SetCustId(cust_id); purchase.SetCommcardInvoice(commcard_invoice); purchase.SetCommcardTaxAmount(commcard_tax_amount); purchase.SetDynamicDescriptor(dynamic_descriptor); 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(purchase); 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("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) { string store_id = "moneris"; string api_token = "hurgle"; string processing_country_code = "CA"; bool status_check = false; string order_id = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss"); string cust_id = "CUST13343"; string amount = "62.37"; string pan = "373269005095005"; string expiry_date = "2012"; //YYMM string auth_code = "123456"; string crypt = "7"; string airline_process_id = "000"; //Airline three-digit IATA code, Mandatory, Alphanumberic/3 string invoice_batch = "580"; //Three-digit code that specifies processing options, Mandatory, Numeric/3 string establishment_name = "TestEstablishment"; //Name of the ticket issuer, Mandatory, Alphanumberic/21 string carrier_name = "M AIR"; //Name of the ticketing airline, Mandatory, Alphanumberic/8 string ticket_id = "83060915430001"; //Ticket or document number, Mandatory, Numeric/14 string issue_city = "Toronto"; //Name of the city, Mandatory, Alphanumberic/13 string establishment_state = "ON"; //State or province code, Mandatory, Alphanumberic/2 string number_in_party = "2"; //Number of the people, Optional, Numeric/3 string passenger_name = "TestPassenger"; //Passenger name, Mandatory, Alphanumberic/20 string taa_routing = "YYZ"; //Flight stopover and city/airport codes, Mandatory, Alphanumberic/20 string carrier_code = "ClassA"; //Carrier designator codes, Mandatory, Alphanumberic/8 string fare_basis = "Regular"; //Primary and secondary discount codes, Mandatory, Alphanumberic/24 string document_type = "00"; //Airline document type code, Mandatory, Numeric/2 string doc_number = "5908"; //Number assigned to the airline document, Mandatory, Numeric/4 string departure_date = "0916"; //Departure date, Mandatory, Numeric/4 (MMDD) AxRaLevel23 raLevel23 = new AxRaLevel23(); raLevel23.SetAirlineProcessId(airline_process_id); raLevel23.SetInvoiceBatch(invoice_batch); raLevel23.SetEstablishmentName(establishment_name); raLevel23.SetCarrierName(carrier_name); raLevel23.SetTicketId(ticket_id); raLevel23.SetIssueCity(issue_city); raLevel23.SetEstablishmentState(establishment_state); raLevel23.SetNumberInParty(number_in_party); raLevel23.SetPassengerName(passenger_name); raLevel23.SetTaaRouting(taa_routing); raLevel23.SetCarrierCode(carrier_code); raLevel23.SetFareBasis(fare_basis); raLevel23.SetDocumentType(document_type); raLevel23.SetDocNumber(doc_number); raLevel23.SetDepartureDate(departure_date); AxRaForcePost axRaForcePost = new AxRaForcePost(); axRaForcePost.SetOrderId(order_id); axRaForcePost.SetCustId(cust_id); axRaForcePost.SetAmount(amount); axRaForcePost.SetPan(pan); axRaForcePost.SetExpDate(expiry_date); axRaForcePost.SetAuthCode(auth_code); axRaForcePost.SetCryptType(crypt); axRaForcePost.SetAxRaLevel23(raLevel23); 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(axRaForcePost); 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("CavvResultCode = " + receipt.GetCavvResultCode()); Console.ReadLine(); } 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"; bool status_check = false; string order_id = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss"); string cust_id = "CUST13343"; string amount = "5.00"; string pan = "4242424254545454"; string expiry_date = "2012"; //YYMM string auth_code = "123456"; string crypt = "7"; string national_tax = "1.23"; string merchant_vat_no = "gstno111"; string local_tax = "2.34"; string customer_vat_no = "gstno999"; string cri = "CUST-REF-002"; string customer_code = "ccvsfp"; string invoice_number = "invsfp"; string local_tax_no = "ltaxno"; VsForcePost vsForcePost = new VsForcePost(); vsForcePost.SetOrderId(order_id); vsForcePost.SetCustId(cust_id); vsForcePost.SetAmount(amount); vsForcePost.SetPan(pan); vsForcePost.SetExpDate(expiry_date); vsForcePost.SetAuthCode(auth_code); vsForcePost.SetCryptType(crypt); vsForcePost.SetNationalTax(national_tax); vsForcePost.SetMerchantVatNo(merchant_vat_no); vsForcePost.SetLocalTax(local_tax); vsForcePost.SetCustomerVatNo(customer_vat_no); vsForcePost.SetCri(cri); vsForcePost.SetCustomerCode(customer_code); vsForcePost.SetInvoiceNumber(invoice_number); vsForcePost.SetLocalTaxNo(local_tax_no); 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(vsForcePost); 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("CavvResultCode = " + receipt.GetCavvResultCode()); Console.ReadLine(); } 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 cust_id = "customer1"; string amount = "1.00"; string mp_request_token = "47edbc7b56cac2b7ed27ab4d62214407"; string crypt_type = "7"; string dynamic_descriptor = "paypass1"; string processing_country_code = "CA"; PaypassPurchase paypassPurchase = new PaypassPurchase(); paypassPurchase.SetOrderId(order_id); paypassPurchase.SetCustId(cust_id); paypassPurchase.SetAmount(amount); paypassPurchase.SetMpRequestToken(mp_request_token); paypassPurchase.SetCryptType(crypt_type); paypassPurchase.SetDynamicDescriptor(dynamic_descriptor); 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(paypassPurchase); mpgReq.Send(); try { Receipt receipt = mpgReq.GetReceipt(); Console.WriteLine("ReceiptId = " + receipt.GetReceiptId()); Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum()); Console.WriteLine("ResponseCode = " + receipt.GetResponseCode()); Console.WriteLine("ISO = " + receipt.GetISO()); Console.WriteLine("AuthCode = " + receipt.GetAuthCode()); Console.WriteLine("TransDate = " + receipt.GetTransDate()); Console.WriteLine("TransTime = " + receipt.GetTransTime()); Console.WriteLine("TransType = " + receipt.GetTransType()); Console.WriteLine("Complete = " + receipt.GetComplete()); Console.WriteLine("Message = " + receipt.GetMessage()); Console.WriteLine("TransAmount = " + receipt.GetTransAmount()); Console.WriteLine("CardType = " + receipt.GetCardType()); Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber()); Console.WriteLine("TimedOut = " + receipt.GetTimedOut()); Console.WriteLine("Ticket = " + receipt.GetTicket()); Console.WriteLine("MPRequestToken = " + receipt.GetMPRequestToken()); Console.WriteLine("MPRedirectUrl = " + receipt.GetMPRedirectUrl()); //PayPassInfo Console.WriteLine("\nCardBrandId = " + receipt.GetCardBrandId()); Console.WriteLine("CardBrandName = " + receipt.GetCardBrandName()); Console.WriteLine("CardBillingAddressCity = " + receipt.GetCardBillingAddressCity()); Console.WriteLine("CardBillingAddressCountry = " + receipt.GetCardBillingAddressCountry()); Console.WriteLine("CardBillingAddressCountrySubdivision = " + receipt.GetCardBillingAddressCountrySubdivision()); Console.WriteLine("CardBillingAddressLine1 = " + receipt.GetCardBillingAddressLine1()); Console.WriteLine("CardBillingAddressLine2 = " + receipt.GetCardBillingAddressLine2()); Console.WriteLine("CardBillingAddressPostalCode = " + receipt.GetCardBillingAddressPostalCode()); Console.WriteLine("CardCardHolderName = " + receipt.GetCardCardHolderName()); Console.WriteLine("CardExpiryMonth = " + receipt.GetCardExpiryMonth()); Console.WriteLine("CardExpiryYear = " + receipt.GetCardExpiryYear()); Console.WriteLine("TransactionId = " + receipt.GetTransactionId()); Console.WriteLine("ContactEmailAddress = " + receipt.GetContactEmailAddress()); Console.WriteLine("ContactFirstName = " + receipt.GetContactFirstName()); Console.WriteLine("ContactLastName = " + receipt.GetContactLastName()); Console.WriteLine("ContactPhoneNumber = " + receipt.GetContactPhoneNumber()); Console.WriteLine("ShippingAddressCity = " + receipt.GetShippingAddressCity()); Console.WriteLine("ShippingAddressCountry = " + receipt.GetShippingAddressCountry()); Console.WriteLine("ShippingAddressCountrySubdivision = " + receipt.GetShippingAddressCountrySubdivision()); Console.WriteLine("ShippingAddressLine1 = " + receipt.GetShippingAddressLine1()); Console.WriteLine("ShippingAddressLine2 = " + receipt.GetShippingAddressLine2()); Console.WriteLine("ShippingAddressPostalCode = " + receipt.GetShippingAddressPostalCode()); Console.WriteLine("ShippingAddressRecipientName = " + receipt.GetShippingAddressRecipientName()); Console.WriteLine("ShippingAddressRecipientPhoneNumber = " + receipt.GetShippingAddressRecipientPhoneNumber()); Console.WriteLine("PayPassWalletIndicator = " + receipt.GetPayPassWalletIndicator()); Console.WriteLine("AuthenticationOptionsAuthenticateMethod = " + receipt.GetAuthenticationOptionsAuthenticateMethod()); Console.WriteLine("AuthenticationOptionsCardEnrollmentMethod = " + receipt.GetAuthenticationOptionsCardEnrollmentMethod()); Console.WriteLine("CardAccountNumber = " + receipt.GetCardAccountNumber()); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { string store_id = "store2"; string api_token = "yesguy"; string call_id = "5840726785406561048"; string processing_country_code = "CA"; bool status_check = false; VdotMeInfo vmeinfo = new VdotMeInfo(); vmeinfo.SetCallId(call_id); 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(vmeinfo); mpgReq.SetStatusCheck(status_check); mpgReq.Send(); try { Receipt receipt = mpgReq.GetReceipt(); Console.WriteLine("Response Code: " + receipt.GetResponseCode()); Console.WriteLine("Response Message: " + receipt.GetMessage()); Console.WriteLine("Currency Code: " + receipt.GetCurrencyCode()); Console.WriteLine("Payment Totals: " + receipt.GetPaymentTotal()); Console.WriteLine("User First Name: " + receipt.GetUserFirstName()); Console.WriteLine("User Last Name: " + receipt.GetUserLastName()); Console.WriteLine("Username: "******"User Email: " + receipt.GetUserEmail()); Console.WriteLine("Encrypted User ID: " + receipt.GetEncUserId()); Console.WriteLine("Creation Time Stamp: " + receipt.GetCreationTimeStamp()); Console.WriteLine("Name on Card: " + receipt.GetNameOnCard()); Console.WriteLine("Expiration Month: " + receipt.GetExpirationDateMonth()); Console.WriteLine("Expiration Year: " + receipt.GetExpirationDateYear()); Console.WriteLine("Last 4 Digits: " + receipt.GetLastFourDigits()); Console.WriteLine("Bin Number (6 Digits): " + receipt.GetBinSixDigits()); Console.WriteLine("Card Brand: " + receipt.GetCardBrand()); Console.WriteLine("Card Type: " + receipt.GetVdotMeCardType()); Console.WriteLine("Billing Person Name: " + receipt.GetPersonName()); Console.WriteLine("Billing Address Line 1: " + receipt.GetBillingAddressLine1()); Console.WriteLine("Billing City: " + receipt.GetBillingCity()); Console.WriteLine("Billing State/Province Code: " + receipt.GetBillingStateProvinceCode()); Console.WriteLine("Billing Postal Code: " + receipt.GetBillingPostalCode()); Console.WriteLine("Billing Country Code: " + receipt.GetBillingCountryCode()); Console.WriteLine("Billing Phone: " + receipt.GetBillingPhone()); Console.WriteLine("Billing ID: " + receipt.GetBillingId()); Console.WriteLine("Billing Verification Status: " + receipt.GetBillingVerificationStatus()); Console.WriteLine("Partial Shipping Country Code: " + receipt.GetPartialShippingCountryCode()); Console.WriteLine("Partial Shipping Postal Code: " + receipt.GetPartialShippingPostalCode()); Console.WriteLine("Shipping Person Name: " + receipt.GetShippingPersonName()); Console.WriteLine("Shipping Address Line 1: " + receipt.GetShipAddressLine1()); Console.WriteLine("Shipping City: " + receipt.GetShippingCity()); Console.WriteLine("Shipping State/Province Code: " + receipt.GetShippingStateProvinceCode()); Console.WriteLine("Shipping Postal Code: " + receipt.GetShippingPostalCode()); Console.WriteLine("Shipping Country Code: " + receipt.GetShippingCountryCode()); Console.WriteLine("Shipping Phone: " + receipt.GetShippingPhone()); Console.WriteLine("Shipping Default: " + receipt.GetShippingDefault()); Console.WriteLine("Shipping ID: " + receipt.GetShippingId()); Console.WriteLine("Shipping Verification Status: " + receipt.GetShippingVerificationStatus()); Console.WriteLine("isExpired: " + receipt.GetIsExpired()); Console.WriteLine("Base Image File Name: " + receipt.GetBaseImageFileName()); Console.WriteLine("Height: " + receipt.GetHeight()); Console.WriteLine("Width: " + receipt.GetWidth()); Console.WriteLine("Issuer Bid: " + receipt.GetIssuerBid()); Console.WriteLine("Risk Advice: " + receipt.GetRiskAdvice()); Console.WriteLine("Risk Score: " + receipt.GetRiskScore()); Console.WriteLine("AVS Response Code: " + receipt.GetAvsResponseCode()); Console.WriteLine("CVV Response Code: " + receipt.GetCvvResponseCode()); Console.WriteLine("\r\nPress the enter key to exit"); Console.ReadLine(); } 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"; bool status_check = false; string order_id = "ord-041016-17:35:35"; string txn_number = "66011731772016278173536680-0_11"; //Common Data string customer_code1_c = "CustomerCode123"; string additional_card_acceptor_data_c = "acad1"; string austin_tetra_number_c = "atn1"; string naics_code_c = "nc1"; string card_acceptor_type_c = "0000nnnn"; string card_acceptor_tax_id_c = "Moneristaxid1"; string corporation_vat_number_c = "cvn123"; string card_acceptor_reference_number_c = "carn1"; string freight_amount1_c = "1.23"; string duty_amount1_c = "2.34"; string destination_province_code_c = "ONT"; string destination_country_code_c = "CAN"; string ship_from_pos_code_c = "M8X 2X2"; string ship_to_pos_code_c = "_M1R 1R5"; string order_date_c = "141211"; string card_acceptor_vat_number_c = "cavn1"; string customer_vat_number_c = "customervn231"; string unique_invoice_number_c = "uin567"; string commodity_code_c = "paCCC1"; string authorized_contact_name_c = "John Walker"; string authorized_contact_phone_c = "416-734-1000"; //Common Tax Details string[] tax_amount_c = { "1.19", "1.29" }; string[] tax_rate_c = { "6.0", "7.0" }; string[] tax_type_c = { "GST", "PST" }; string[] tax_id_c = { "gst1298", "pst1298" }; string[] tax_included_in_sales_c = { "Y", "N" }; //General Passenger Ticket Information string passenger_name1_i = "MCC Tester"; string ticket_number1_i = "1234567890001"; string travel_agency_name_i = "Moneris Travel"; string travel_agency_code_i = "MC322"; string issuing_carrier_i = "2R"; string customer_code1_i = "passengerabc"; string issue_date_i = "141210"; string total_fare_i = "129.45"; string travel_authorization_code_i = "sde-erdsz-452112"; string total_fee_i = "10.34"; string total_taxes_i = "11.56"; string restricted_ticket_indicator_i = "1"; string exchange_ticket_amount_i = "13.98"; string exchange_fee_amount_i = "1.78"; string iata_client_code_i = "icc2"; //Tax Details for passenger string[] tax_amount_i = { "3.28" }; string[] tax_rate_i = { "13.00" }; string[] tax_type_i = { "HST" }; string[] tax_id_i = { "hst1298" }; string[] tax_included_in_sales_i = { "Y" }; //Passenger Air Travel Details string[] travel_date_s = { "150101", "150102" }; string[] carrier_code1_s = { "3R", "4R" }; string[] service_class_s = { "E", "B" }; string[] orig_city_airport_code_s = { "Toron", "Montr" }; string[] dest_city_airport_code_s = { "Montr", "Halif" }; string[] stop_over_code_s = { "", "X" }; string[] coupon_number1_s = { "1", "2" }; string[] fare_basis_code1_s = { "FClass", "SClass" }; string[] flight_number_s = { "56786", "54386" }; string[] departure_time_s = { "1920", "1120" }; string[] arrival_time_s = { "0620", "1620" }; string[] conjunction_ticket_number1_s = { "123456789054367", null }; string[] exchange_ticket_number1_s = { "123456789067892", null }; string[] fare_s = { "1.69", null }; string[] fee_s = { "1.48", null }; string[] taxes_s = { "3.91", null }; string[] endorsement_restrictions_s = { "er6", null }; //Tax Details for Air Travel string[] tax_amount_s = { "4.67", "7.43" }; string[] tax_rate_s = { "5.0", "9.975" }; string[] tax_type_s = { "GST", "QST" }; string[] tax_id_s = { "gst1298", "qst1298" }; string[] tax_included_in_sales_s = { "Y", "Y" }; //Create and set Tax for McCorpac McTax mcTax_c = new McTax(); mcTax_c.SetTax(tax_amount_c[0], tax_rate_c[0], tax_type_c[0], tax_id_c[0], tax_included_in_sales_c[0]); mcTax_c.SetTax(tax_amount_c[1], tax_rate_c[1], tax_type_c[1], tax_id_c[1], tax_included_in_sales_c[1]); //Create and set McCorpac for common data - only set values that you know McCorpac mcCorpac = new McCorpac(); mcCorpac.SetCustomerCode1(customer_code1_c); mcCorpac.SetAdditionalCardAcceptorData(additional_card_acceptor_data_c); mcCorpac.SetAustinTetraNumber(austin_tetra_number_c); mcCorpac.SetNaicsCode(naics_code_c); mcCorpac.SetCardAcceptorType(card_acceptor_type_c); mcCorpac.SetCardAcceptorTaxTd(card_acceptor_tax_id_c); mcCorpac.SetCorporationVatNumber(corporation_vat_number_c); mcCorpac.SetCardAcceptorReferenceNumber(card_acceptor_reference_number_c); mcCorpac.SetFreightAmount1(freight_amount1_c); mcCorpac.SetDutyAmount1(duty_amount1_c); mcCorpac.SetDestinationProvinceCode(destination_province_code_c); mcCorpac.SetDestinationCountryCode(destination_country_code_c); mcCorpac.SetShipFromPosCode(ship_from_pos_code_c); mcCorpac.SetShipToPosCode(ship_to_pos_code_c); mcCorpac.SetOrderDate(order_date_c); mcCorpac.SetCardAcceptorVatNumber(card_acceptor_vat_number_c); mcCorpac.SetCustomerVatNumber(customer_vat_number_c); mcCorpac.SetUniqueInvoiceNumber(unique_invoice_number_c); mcCorpac.SetCommodityCode(commodity_code_c); mcCorpac.SetAuthorizedContactName(authorized_contact_name_c); mcCorpac.SetAuthorizedContactPhone(authorized_contact_phone_c); mcCorpac.SetTax(mcTax_c); //Create and set Tax for McCorpai McTax mcTax_i = new McTax(); mcTax_i.SetTax(tax_amount_i[0], tax_rate_i[0], tax_type_i[0], tax_id_i[0], tax_included_in_sales_i[0]); //Create and set McCorpai McCorpai mcCorpai = new McCorpai(); mcCorpai.SetPassengerName1(passenger_name1_i); mcCorpai.SetTicketNumber1(ticket_number1_i); mcCorpai.SetTravelAgencyName(travel_agency_name_i); mcCorpai.SetTravelAgencyCode(travel_agency_code_i); mcCorpai.SetIssuingCarrier(issuing_carrier_i); mcCorpai.SetCustomerCode1(customer_code1_i); mcCorpai.SetIssueDate(issue_date_i); mcCorpai.SetTotalFare(total_fare_i); mcCorpai.SetTravelAuthorizationCode(travel_authorization_code_i); mcCorpai.SetTotalFee(total_fee_i); mcCorpai.SetTotalTaxes(total_taxes_i); mcCorpai.SetRestrictedTicketIndicator(restricted_ticket_indicator_i); mcCorpai.SetExchangeTicketAmount(exchange_ticket_amount_i); mcCorpai.SetExchangeFeeAmount(exchange_fee_amount_i); mcCorpai.SetIataClientCode(iata_client_code_i); mcCorpai.SetTax(mcTax_i); //Create and set Tax for McCorpas McTax[] mcTax_s = new McTax[2]; mcTax_s[0] = new McTax(); mcTax_s[0].SetTax(tax_amount_s[0], tax_rate_s[0], tax_type_s[0], tax_id_s[0], tax_included_in_sales_s[0]); mcTax_s[1] = new McTax(); mcTax_s[1].SetTax(tax_amount_s[1], tax_rate_s[1], tax_type_s[1], tax_id_s[1], tax_included_in_sales_s[1]); //Create and set McCorpas for Air Travel Details only McCorpas mcCorpas = new McCorpas(); mcCorpas.SetMcCorpas(travel_date_s[0], carrier_code1_s[0], service_class_s[0], orig_city_airport_code_s[0], dest_city_airport_code_s[0], stop_over_code_s[0], conjunction_ticket_number1_s[0], exchange_ticket_number1_s[0], coupon_number1_s[0], fare_basis_code1_s[0], flight_number_s[0], departure_time_s[0], arrival_time_s[0], fare_s[0], fee_s[0], taxes_s[0], endorsement_restrictions_s[0], mcTax_s[0]); mcCorpas.SetMcCorpas(travel_date_s[1], carrier_code1_s[1], service_class_s[1], orig_city_airport_code_s[1], dest_city_airport_code_s[1], stop_over_code_s[1], conjunction_ticket_number1_s[1], exchange_ticket_number1_s[1], coupon_number1_s[1], fare_basis_code1_s[1], flight_number_s[1], departure_time_s[1], arrival_time_s[1], fare_s[1], fee_s[1], taxes_s[1], endorsement_restrictions_s[1], mcTax_s[1]); McCorpais mcCorpais = new McCorpais(); mcCorpais.SetOrderId(order_id); mcCorpais.SetTxnNumber(txn_number); mcCorpais.SetMcCorpac(mcCorpac); mcCorpais.SetMcCorpai(mcCorpai); mcCorpais.SetMcCorpas(mcCorpas); 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(mcCorpais); 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("CavvResultCode = " + receipt.GetCavvResultCode()); Console.ReadLine(); } 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_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); } }
public static void Main(string[] args) { string store_id = "store5"; string api_token = "yesguy"; string order_id = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss"); string cust_id = "customer1"; string device_type = "idtech_bdk"; string crypt_type = "7"; string processing_country_code = "CA"; bool status_check = false; string enc_track2 = "02840085000000000416570F44857F2F7867342C66F7CDB57128A48F6E8DD8AD30AC1A6C727B5C400DC3AC8169BF2398B6C664FD3BE40431383131FFFF3141594047A00093031D03"; AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); CvdInfo cvdCheck = new CvdInfo(); cvdCheck.SetCvdIndicator("1"); cvdCheck.SetCvdValue("099"); EncCardVerification encCardVerification = new EncCardVerification(); encCardVerification.SetOrderId(order_id); encCardVerification.SetCustId(cust_id); encCardVerification.SetEncTrack2(enc_track2); encCardVerification.SetDeviceType(device_type); encCardVerification.SetCryptType(crypt_type); encCardVerification.SetAvsInfo(avsCheck); encCardVerification.SetCvdInfo(cvdCheck); 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(encCardVerification); 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("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.ReadLine(); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { string store_id = "moneris"; string api_token = "hurgle"; string subtotal = "1.00"; string suppress_shipping_address = "true"; string processing_country_code = "CA"; PaypassSendShoppingCart paypassSendShoppingCart = new PaypassSendShoppingCart(); paypassSendShoppingCart.SetSubtotal(subtotal); paypassSendShoppingCart.SetSuppressShippingAddress(suppress_shipping_address); /*Optional*/ paypassSendShoppingCart.SetMerchantCallbackUrl(""); paypassSendShoppingCart.SetMerchantCardList(""); 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(paypassSendShoppingCart); mpgReq.Send(); try { Receipt receipt = mpgReq.GetReceipt(); Console.WriteLine("ReceiptId = " + receipt.GetReceiptId()); Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum()); Console.WriteLine("ResponseCode = " + receipt.GetResponseCode()); Console.WriteLine("ISO = " + receipt.GetISO()); Console.WriteLine("AuthCode = " + receipt.GetAuthCode()); Console.WriteLine("TransDate = " + receipt.GetTransDate()); Console.WriteLine("TransTime = " + receipt.GetTransTime()); Console.WriteLine("TransType = " + receipt.GetTransType()); Console.WriteLine("Complete = " + receipt.GetComplete()); Console.WriteLine("Message = " + receipt.GetMessage()); Console.WriteLine("TransAmount = " + receipt.GetTransAmount()); Console.WriteLine("CardType = " + receipt.GetCardType()); Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber()); Console.WriteLine("TimedOut = " + receipt.GetTimedOut()); Console.WriteLine("Ticket = " + receipt.GetTicket()); Console.WriteLine("MPRequestToken = " + receipt.GetMPRequestToken()); Console.WriteLine("MPRedirectUrl = " + receipt.GetMPRedirectUrl()); //PayPassInfo Console.WriteLine("\nCardBrandId = " + receipt.GetCardBrandId()); Console.WriteLine("CardBrandName = " + receipt.GetCardBrandName()); Console.WriteLine("CardBillingAddressCity = " + receipt.GetCardBillingAddressCity()); Console.WriteLine("CardBillingAddressCountry = " + receipt.GetCardBillingAddressCountry()); Console.WriteLine("CardBillingAddressCountrySubdivision = " + receipt.GetCardBillingAddressCountrySubdivision()); Console.WriteLine("CardBillingAddressLine1 = " + receipt.GetCardBillingAddressLine1()); Console.WriteLine("CardBillingAddressLine2 = " + receipt.GetCardBillingAddressLine2()); Console.WriteLine("CardBillingAddressPostalCode = " + receipt.GetCardBillingAddressPostalCode()); Console.WriteLine("CardCardHolderName = " + receipt.GetCardCardHolderName()); Console.WriteLine("CardExpiryMonth = " + receipt.GetCardExpiryMonth()); Console.WriteLine("CardExpiryYear = " + receipt.GetCardExpiryYear()); Console.WriteLine("TransactionId = " + receipt.GetTransactionId()); Console.WriteLine("ContactEmailAddress = " + receipt.GetContactEmailAddress()); Console.WriteLine("ContactFirstName = " + receipt.GetContactFirstName()); Console.WriteLine("ContactLastName = " + receipt.GetContactLastName()); Console.WriteLine("ContactPhoneNumber = " + receipt.GetContactPhoneNumber()); Console.WriteLine("ShippingAddressCity = " + receipt.GetShippingAddressCity()); Console.WriteLine("ShippingAddressCountry = " + receipt.GetShippingAddressCountry()); Console.WriteLine("ShippingAddressCountrySubdivision = " + receipt.GetShippingAddressCountrySubdivision()); Console.WriteLine("ShippingAddressLine1 = " + receipt.GetShippingAddressLine1()); Console.WriteLine("ShippingAddressLine2 = " + receipt.GetShippingAddressLine2()); Console.WriteLine("ShippingAddressPostalCode = " + receipt.GetShippingAddressPostalCode()); Console.WriteLine("ShippingAddressRecipientName = " + receipt.GetShippingAddressRecipientName()); Console.WriteLine("ShippingAddressRecipientPhoneNumber = " + receipt.GetShippingAddressRecipientPhoneNumber()); Console.WriteLine("PayPassWalletIndicator = " + receipt.GetPayPassWalletIndicator()); Console.WriteLine("AuthenticationOptionsAuthenticateMethod = " + receipt.GetAuthenticationOptionsAuthenticateMethod()); Console.WriteLine("AuthenticationOptionsCardEnrollmentMethod = " + receipt.GetAuthenticationOptionsCardEnrollmentMethod()); Console.WriteLine("CardAccountNumber = " + receipt.GetCardAccountNumber()); Console.ReadLine(); } 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"; bool status_check = false; string order_id = "ord-210916-15:14:46"; string comp_amount = "5.00"; string txn_number = "19002-0_11"; string crypt = "7"; string national_tax = "1.23"; string merchant_vat_no = "gstno111"; string local_tax = "2.34"; string customer_vat_no = "gstno999"; string cri = "CUST-REF-002"; string customer_code = "ccvsfp"; string invoice_number = "invsfp"; string local_tax_no = "ltaxno"; VsCompletion vsCompletion = new VsCompletion(); vsCompletion.SetOrderId(order_id); vsCompletion.SetCompAmount(comp_amount); vsCompletion.SetTxnNumber(txn_number); vsCompletion.SetCryptType(crypt); vsCompletion.SetNationalTax(national_tax); vsCompletion.SetMerchantVatNo(merchant_vat_no); vsCompletion.SetLocalTax(local_tax); vsCompletion.SetCustomerVatNo(customer_vat_no); vsCompletion.SetCri(cri); vsCompletion.SetCustomerCode(customer_code); vsCompletion.SetInvoiceNumber(invoice_number); vsCompletion.SetLocalTaxNo(local_tax_no); 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(vsCompletion); 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("CavvResultCode = " + receipt.GetCavvResultCode()); Console.ReadLine(); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { string store_id = "monusqa002"; string api_token = "qatoken"; string order_id = "Test" + DateTime.Now.ToString("yyyyMMddhhmmss"); string cust_id = "customer1"; string pan = "4242424242424242"; string expiry_date = "1901"; //YYMM format string processing_country_code = "US"; bool status_check = false; AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); CvdInfo cvdCheck = new CvdInfo(); cvdCheck.SetCvdIndicator("1"); cvdCheck.SetCvdValue("099"); CardVerification cardVerification = new CardVerification(); cardVerification.SetOrderId(order_id); cardVerification.SetCustId(cust_id); cardVerification.SetPan(pan); cardVerification.SetExpDate(expiry_date); cardVerification.SetAvsInfo(avsCheck); cardVerification.SetCvdInfo(cvdCheck); 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(cardVerification); 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("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.ReadLine(); } catch (Exception e) { Console.WriteLine(e); } }