public static void Main(string[] args) { string store_id = "monusqa002"; string api_token = "qatoken"; string order_id = "201534123732"; string txn_number = "141-0_25"; string phone = "0000000000"; string email = "*****@*****.**"; string note = "my note"; string cust_id = "customer1"; string processing_country_code = "US"; bool status_check = false; AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); ResTokenizeCC restokenizecc = new ResTokenizeCC(); restokenizecc.SetOrderId(order_id); restokenizecc.SetTxnNumber(txn_number); restokenizecc.SetCustId(cust_id); restokenizecc.SetPhone(phone); restokenizecc.SetEmail(email); restokenizecc.SetNote(note); restokenizecc.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(restokenizecc); 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 = "store1"; string api_token = "yesguy"; string order_id = "1000189096"; string txn_number = "880416-0_10"; string phone = "0000000000"; string email = "*****@*****.**"; string note = "my note"; string cust_id = "customer1"; 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"); ResTokenizeCC resTokenizeCC = new ResTokenizeCC(); resTokenizeCC.SetOrderId(order_id); resTokenizeCC.SetTxnNumber(txn_number); resTokenizeCC.SetCustId(cust_id); resTokenizeCC.SetPhone(phone); resTokenizeCC.SetEmail(email); resTokenizeCC.SetNote(note); resTokenizeCC.SetAvsInfo(avsCheck); resTokenizeCC.SetCofInfo(cof); //resTokenizeCC.SetDataKeyFormat(data_key_format); //optional 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(resTokenizeCC); 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()); //ResolveData 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 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); } }