public static RequerimientoStruct_SimpleQueryTx GetRequestSimpleQueryTx(NpsModel model) { RequerimientoStruct_SimpleQueryTx req = new RequerimientoStruct_SimpleQueryTx(); req.psp_Version = "2.2"; req.psp_MerchantId = "arsa_smartcar"; req.psp_QueryCriteria = model.psp_QueryCriteria; req.psp_QueryCriteriaId = model.psp_QueryCriteriaId; req.psp_PosDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); NpsEncryptFields operations = new NpsEncryptFields(); req.psp_SecureHash = operations.EncriptarCampos(GetCatParamsSimpleQueryTx(req)); return(req); }
public static RequerimientoStruct_PayOnLine_3p GetRequestPayOnline3p(NpsModel model) { RequerimientoStruct_PayOnLine_3p req = new RequerimientoStruct_PayOnLine_3p(); req.psp_Version = "2.2"; req.psp_MerchantId = "arsa_smartcar"; //<-- this will be parametrisable req.psp_TxSource = "WEB"; req.psp_MerchTxRef = model.psp_MerchTxRef; //This will be guide numer req.psp_MerchOrderId = "003"; req.psp_ReturnURL = ConfigurationManager.AppSettings["ServerName"] + "/api/ServicePaymentFormListener"; req.psp_FrmLanguage = "es_AR"; //<-- this will be parameter (ex. cookies) //req.psp_FrmBackButtonURL = "https://returnurl/back.html"; req.psp_Amount = model.psp_Amount; req.psp_NumPayments = model.psp_NumPayments; req.psp_Currency = "032"; //<-- this will be parametrisable req.psp_Country = "ARG"; //<-- this will be parametrisable req.psp_Product = model.psp_Product; //14 is Visa, see nps documentation. req.psp_CustomerMail = "*****@*****.**"; req.psp_MerchantMail = "*****@*****.**"; req.psp_PurchaseDescription = "ENVIO DE CARTA"; req.psp_PosDateTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"); // "2016-06-26 15:00:00"; if (!string.IsNullOrEmpty(model.psp_CustomerId)) { req.psp_VaultReference = new VaultReference3pStruct() { CustomerId = model.psp_CustomerId } } ; NpsEncryptFields operations = new NpsEncryptFields(); req.psp_SecureHash = operations.EncriptarCampos(GetCatParamsPayOnline3p(req)); return(req); }