private CvdInfo CreateCvdInfo(string cvd) { CvdInfo cvdCheck = new CvdInfo(); cvdCheck.SetCvdIndicator("1"); cvdCheck.SetCvdValue(cvd); return(cvdCheck); }
public static void Main(string[] args) { string host = "esqa.moneris.com"; string store_id = "store5"; string api_token = "yesguy"; string order_id = "Test_P_033333"; string pan = "4242424242424242"; string expdate = "0812"; string crypt = "7"; /*************** Address Verification Service **********************/ AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); CardVerification cardverify = new CardVerification(order_id, pan, expdate, crypt); cardverify.SetAvsInfo(avsCheck); /****************** Card Validation Digits *************************/ CvdInfo cvdCheck = new CvdInfo(); cvdCheck.SetCvdIndicator("1"); cvdCheck.SetCvdValue("099"); cardverify.SetCvdInfo(cvdCheck); HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, cardverify); try { Receipt receipt = mpgReq.GetReceipt(); Console.WriteLine("CardType = " + receipt.GetCardType()); Console.WriteLine("TransAmount = " + receipt.GetTransAmount()); Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber()); Console.WriteLine("ReceiptId = " + receipt.GetReceiptId()); Console.WriteLine("TransType = " + receipt.GetTransType()); Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum()); Console.WriteLine("ResponseCode = " + receipt.GetResponseCode()); Console.WriteLine("ISO = " + receipt.GetISO()); Console.WriteLine("BankTotals = " + receipt.GetBankTotals()); Console.WriteLine("Message = " + receipt.GetMessage()); Console.WriteLine("AuthCode = " + receipt.GetAuthCode()); Console.WriteLine("Complete = " + receipt.GetComplete()); Console.WriteLine("TransDate = " + receipt.GetTransDate()); Console.WriteLine("TransTime = " + receipt.GetTransTime()); Console.WriteLine("Ticket = " + receipt.GetTicket()); Console.WriteLine("TimedOut = " + receipt.GetTimedOut()); Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit()); } catch (Exception e) { Console.WriteLine(e); } }
private void AddCvvInfo(ResPreauthCC preAuthorizeCommand, string cvv) { if (_serverSettings.GetPaymentSettings().AskForCVVAtBooking) { if (!cvv.HasValue()) { _logger.LogMessage("AskForCVVAtBooking setting is enabled but no cvv found for this order, could be from a reauth"); } else { // Only supported for Visa/MasterCard/Amex var cvdCheck = new CvdInfo(); cvdCheck.SetCvdIndicator("1"); cvdCheck.SetCvdValue(cvv); preAuthorizeCommand.SetCvdInfo(cvdCheck); } } }
public static void Main(string[] args) { /******************* REQUEST VARIABLES*******************************/ string host = "esplusqa.moneris.com"; string store_id = "monusqa002"; string api_token = "qatoken"; /****************** TRANSACTION VARIABLES *****************************/ string order_id; //will prompt user for input string cust_id = "LBriggs"; string amount = "1.00"; string track1; //not required for transaction string track2; string pan = null; string exp = null; //must send '0000' if swiped string pos_code = "00"; string commcard_invoice = "INV98798"; string commcard_tax_amount = "1.00"; Console.Write("Please enter an order ID: "); order_id = Console.ReadLine(); Console.WriteLine("Please swipe card"); track1 = Console.ReadLine(); track2 = Console.ReadLine(); Console.WriteLine("\nThe track1 is " + track1); Console.WriteLine("\nThe track2 is " + track2); /*************** Address Verification Service **********************/ AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); /****************** Card Validation Digits *************************/ CvdInfo cvdCheck = new CvdInfo(); cvdCheck.SetCvdIndicator("1"); cvdCheck.SetCvdValue("099"); USTrack2Purchase P = new USTrack2Purchase(order_id, cust_id, amount, track2, pan, exp, pos_code, commcard_invoice, commcard_tax_amount ); P.SetAvsInfo(avsCheck); P.SetCvdInfo(cvdCheck); HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, P); try { Receipt receipt = mpgReq.GetReceipt(); Console.WriteLine("CardType = " + receipt.GetCardType()); Console.WriteLine("TransAmount = " + receipt.GetTransAmount()); Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber()); Console.WriteLine("ReceiptId = " + receipt.GetReceiptId()); Console.WriteLine("TransType = " + receipt.GetTransType()); Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum()); Console.WriteLine("ResponseCode = " + receipt.GetResponseCode()); Console.WriteLine("BankTotals = " + receipt.GetBankTotals()); Console.WriteLine("Message = " + receipt.GetMessage()); Console.WriteLine("AuthCode = " + receipt.GetAuthCode()); Console.WriteLine("Complete = " + receipt.GetComplete()); Console.WriteLine("TransDate = " + receipt.GetTransDate()); Console.WriteLine("TransTime = " + receipt.GetTransTime()); Console.WriteLine("Ticket = " + receipt.GetTicket()); Console.WriteLine("TimedOut = " + receipt.GetTimedOut()); Console.WriteLine("Avs Response = " + receipt.GetAvsResultCode()); Console.WriteLine("Cvd Response = " + receipt.GetCvdResultCode()); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { /******************* REQUEST VARIABLES*******************************/ string host = "esplusqa.moneris.com"; string store_id = "monusqa002"; string api_token = "qatoken"; /****************** TRANSACTION VARIABLES *****************************/ string order_id; //will prompt user for input string cust_id = "B_Urlac_54"; string amount = "10.42"; string pan = "4242424242424242"; string exp = "1212"; string cavv = "AAABBJg0VhI0VniQEjRWAAAAAAA"; Console.Write("Please enter an order ID: "); order_id = Console.ReadLine(); /************************ Transaction Object Option1 *************************/ USCavvPreAuth cavvPreAuth = new USCavvPreAuth(order_id, cust_id, amount, pan, exp, cavv); /************************ Transaction Object Option2 *************************/ Hashtable cavvParams = new Hashtable(); //transaction hashtable option cavvParams.Add("order_id", order_id); cavvParams.Add("cust_id", cust_id); cavvParams.Add("amount", amount); cavvParams.Add("pan", pan); cavvParams.Add("expdate", exp); cavvParams.Add("cavv", cavv); USCavvPreAuth cavvPreAuth2 = new USCavvPreAuth(cavvParams); //single paramater hashtable construtor /*************** Address Verification Service **********************/ AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); cavvPreAuth.SetAvsInfo(avsCheck); /****************** Card Validation Digits *************************/ CvdInfo cvdCheck = new CvdInfo(); cvdCheck.SetCvdIndicator("1"); cvdCheck.SetCvdValue("099"); cavvPreAuth.SetCvdInfo(cvdCheck); /*************************** Https Post Request *****************************/ HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, cavvPreAuth); /****************************** Receipt *************************************/ try { Receipt receipt = mpgReq.GetReceipt(); Console.WriteLine("CardType = " + receipt.GetCardType()); Console.WriteLine("TransAmount = " + receipt.GetTransAmount()); Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber()); Console.WriteLine("ReceiptId = " + receipt.GetReceiptId()); Console.WriteLine("TransType = " + receipt.GetTransType()); Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum()); Console.WriteLine("ResponseCode = " + receipt.GetResponseCode()); Console.WriteLine("ISO = " + receipt.GetISO()); Console.WriteLine("BankTotals = " + receipt.GetBankTotals()); Console.WriteLine("Message = " + receipt.GetMessage()); Console.WriteLine("AuthCode = " + receipt.GetAuthCode()); Console.WriteLine("Complete = " + receipt.GetComplete()); Console.WriteLine("TransDate = " + receipt.GetTransDate()); Console.WriteLine("TransTime = " + receipt.GetTransTime()); Console.WriteLine("Ticket = " + receipt.GetTicket()); Console.WriteLine("TimedOut = " + receipt.GetTimedOut()); Console.WriteLine("Avs Response = " + receipt.GetAvsResultCode()); Console.WriteLine("Cvd Response = " + receipt.GetCvdResultCode()); Console.WriteLine("CardLevelResult = " + receipt.GetCardLevelResult()); Console.WriteLine("CavvResultCode = " + receipt.GetCavvResultCode()); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { /******************* REQUEST VARIABLES*******************************/ string host = "esplusqa.moneris.com"; string store_id = "monusqa002"; string api_token = "qatoken"; /****************** TRANSACTION VARIABLES *****************************/ string order_id; //will prompt user for input string cust_id = "customer1"; string pan = "4242424242424242"; string expiry_date = "1212"; Console.Write("Please enter an order ID: "); order_id = Console.ReadLine(); /*************** Address Verification Service **********************/ AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); USCardVerification cardVerification = new USCardVerification(order_id, cust_id, pan, expiry_date); cardVerification.SetAvsInfo(avsCheck); /****************** Card Validation Digits *************************/ CvdInfo cvdCheck = new CvdInfo(); cvdCheck.SetCvdIndicator("1"); cvdCheck.SetCvdValue("099"); cardVerification.SetCvdInfo(cvdCheck); HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, cardVerification); 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()); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { string host = "esplusqa.moneris.com"; string store_id = "monusqa002"; string api_token = "qatoken"; string data_key = "X4oSM1d86871eEF20D856u2"; string order_id = "nov7test1"; 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 commcard_invoice = "invoice"; string commcard_tax_amount = "1.00"; USResPurchaseCC usResPurchaseCC = new USResPurchaseCC(data_key, order_id, cust_id, amount, crypt_type); /********************** OPTIONAL VARIABLES ************************/ usResPurchaseCC.SetCommcardInvoice(commcard_invoice); usResPurchaseCC.SetCommcardTaxAmount(commcard_tax_amount); //usResPurchaseCC.SetExpdate("1601"); //must be YYMM format /*************** Address Verification Service **********************/ AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); usResPurchaseCC.SetAvsInfo(avsCheck); /****************** Card Validation Digits *************************/ CvdInfo cvdCheck = new CvdInfo(); cvdCheck.SetCvdIndicator("1"); cvdCheck.SetCvdValue("099"); usResPurchaseCC.SetCvdInfo(cvdCheck); HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, usResPurchaseCC); /********************** 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("AVSResponse = " + receipt.GetAvsResultCode()); Console.WriteLine("CVDResponse = " + receipt.GetCvdResultCode()); 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 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 host = "esplusqa.moneris.com"; string store_id = "monusqa002"; string api_token = "qatoken"; string order_id = "reauth_3"; string orig_order_id = "order_988525431"; string txn_number = "178255-0_7"; string amount = "304.00"; string crypt = "7"; /*************** Address Verification Service **********************/ AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); USReAuth reauthTxn = new USReAuth(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()); } catch (Exception e) { Console.WriteLine(e); } }
public static void Main(string[] args) { /********************** Post Request Variables *************************/ string host = "esplusqa.moneris.com"; string store_id = "monusqa002"; string api_token = "qatoken"; //string status = "true"; /********************** Transactional Variables **********************/ string order_id; //will prompt for user input string amount = "5.00"; string pan = "4242424242424242"; string expiry_date = "0812"; string crypt = "7"; string commcard_invoice = "INV98798"; string commcard_tax_amount = "1.00"; Console.Write("Please enter an order ID: "); order_id = Console.ReadLine(); /*************** Address Verification Service **********************/ AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber("212"); avsCheck.SetAvsStreetName("Payton Street"); avsCheck.SetAvsZipCode("M1M1M1"); USPurchase purchaseTxn = new USPurchase(order_id, amount, pan, expiry_date, crypt, commcard_invoice, commcard_tax_amount); purchaseTxn.SetAvsInfo(avsCheck); /****************** Card Validation Digits *************************/ CvdInfo cvdCheck = new CvdInfo(); cvdCheck.SetCvdIndicator("1"); cvdCheck.SetCvdValue("099"); purchaseTxn.SetCvdInfo(cvdCheck); /************************** Request *************************/ HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token, purchaseTxn); /*Status Check Example * HttpsPostRequest mpgReq = * new HttpsPostRequest(host, store_id, api_token, status, purchaseTxn); */ /************************** Receipt *************************/ try { Receipt receipt = mpgReq.GetReceipt(); Console.WriteLine("CardType = " + receipt.GetCardType()); Console.WriteLine("TransAmount = " + receipt.GetTransAmount()); Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber()); Console.WriteLine("ReceiptId = " + receipt.GetReceiptId()); Console.WriteLine("TransType = " + receipt.GetTransType()); Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum()); Console.WriteLine("ResponseCode = " + receipt.GetResponseCode()); Console.WriteLine("ISO = " + receipt.GetISO()); Console.WriteLine("BankTotals = " + receipt.GetBankTotals()); Console.WriteLine("Message = " + receipt.GetMessage()); Console.WriteLine("AuthCode = " + receipt.GetAuthCode()); Console.WriteLine("Complete = " + receipt.GetComplete()); Console.WriteLine("TransDate = " + receipt.GetTransDate()); Console.WriteLine("TransTime = " + receipt.GetTransTime()); Console.WriteLine("Ticket = " + receipt.GetTicket()); Console.WriteLine("TimedOut = " + receipt.GetTimedOut()); Console.WriteLine("Avs Response = " + receipt.GetAvsResultCode()); Console.WriteLine("Cvd Response = " + receipt.GetCvdResultCode()); Console.WriteLine("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) { /********************** Post Request Variables *************************/ string host = "esqa.moneris.com"; string store_id = "store5"; string api_token = "yesguy"; /********************** Transactional Variables **********************/ string order_id = "Test_eFraud_dotNET_1234"; string amount = "10.02"; string pan = "4242424242424242"; string expiry_date = "1111"; string crypt = "7"; /*************** Address Verification Service **********************/ AvsInfo avsCheck = new AvsInfo(); avsCheck.SetAvsStreetNumber ("212"); avsCheck.SetAvsStreetName ("Payton Street"); avsCheck.SetAvsZipCode ("M1M1M1"); avsCheck.SetAvsEmail("*****@*****.**"); avsCheck.SetAvsHostname("hostname"); avsCheck.SetAvsBrowser("Mozilla"); avsCheck.SetAvsShipToCountry("CAN"); avsCheck.SetAvsShipMethod("G"); avsCheck.SetAvsMerchProdSku("123456"); avsCheck.SetAvsCustIp("192.168.0.1"); avsCheck.SetAvsCustPhone("5556667777"); Purchase purchaseTxn = new Purchase(order_id, amount, pan, expiry_date, crypt); purchaseTxn.SetAvsInfo (avsCheck); /****************** Card Validation Digits *************************/ CvdInfo cvdCheck = new CvdInfo(); cvdCheck.SetCvdIndicator ("1"); cvdCheck.SetCvdValue ("099"); purchaseTxn.SetCvdInfo (cvdCheck); /************************** Request *************************/ HttpsPostRequest mpgReq = new HttpsPostRequest(host, store_id, api_token,purchaseTxn); /************************** Receipt *************************/ try { Receipt receipt = mpgReq.GetReceipt(); Console.WriteLine("CardType = " + receipt.GetCardType()); Console.WriteLine("TransAmount = " + receipt.GetTransAmount()); Console.WriteLine("TxnNumber = " + receipt.GetTxnNumber()); Console.WriteLine("ReceiptId = " + receipt.GetReceiptId()); Console.WriteLine("TransType = " + receipt.GetTransType()); Console.WriteLine("ReferenceNum = " + receipt.GetReferenceNum()); Console.WriteLine("ResponseCode = " + receipt.GetResponseCode()); Console.WriteLine("ISO = " + receipt.GetISO()); Console.WriteLine("BankTotals = " + receipt.GetBankTotals()); Console.WriteLine("Message = " + receipt.GetMessage()); Console.WriteLine("AuthCode = " + receipt.GetAuthCode()); Console.WriteLine("Complete = " + receipt.GetComplete()); Console.WriteLine("TransDate = " + receipt.GetTransDate()); Console.WriteLine("TransTime = " + receipt.GetTransTime()); Console.WriteLine("Ticket = " + receipt.GetTicket()); Console.WriteLine("TimedOut = " + receipt.GetTimedOut ()); Console.WriteLine("Avs Response = " + receipt.GetAvsResultCode()); Console.WriteLine("Cvd Response = " + receipt.GetCvdResultCode()); Console.WriteLine("ITD Response = " + receipt.GetITDResponse()); Console.WriteLine("IsVisaDebit = " + receipt.GetIsVisaDebit()); } catch (Exception e) { Console.WriteLine(e); } }