如何在asp.net mvc中的payumoney中发布货币代码

时间:2017-11-07 10:11:38

标签: c# asp.net-mvc payumoney

如何将货币代码作为美元和印度发布。默认情况下,它使用IND。

[HttpPost]
public void Plans(UserRegistreModel model)
{
    string firstName = model.FirstName;
    string middleName = model.MiddleName;
    string lastName = model.LastName;
    string amount = Convert.ToString(model.Amount);
    string Noofemp = model.NoOfEmployees;
    string productInfo = "HRMS";
    string email = model.Email;
    string phone = model.Contact;
    string FirmName = model.FirmName;
    //string surl = form["txtsurl"].ToString();
    //string furl = form["txtfurl"].ToString();

    RemotePost myremotepost = new RemotePost();
    string key = "";
    string salt = "";

    //posting all the parameters required for integration.

    myremotepost.Url = "https://secure.payu.in/_payment";
    myremotepost.Add("key", "");
    string txnid = Generatetxnid();
    myremotepost.Add("txnid", txnid);
    myremotepost.Add("amount", amount);
    myremotepost.Add("productinfo", productInfo);
    myremotepost.Add("firstname", firstName);
    myremotepost.Add("phone", phone);
    myremotepost.Add("email", email);
    //UserRegistreModel register = new UserRegistreModel();
    TempData["model"] = model;
    myremotepost.Add("surl", "");
    myremotepost.Add("furl", "");
    string hashString = key + "|" + txnid + "|" + amount + "|" +           productInfo + "|" + firstName + "|" + email + "|||||||||||" + salt;
    string hash = Generatehash512(hashString);
    myremotepost.Add("hash", hash);
    myremotepost.Post();
}

1 个答案:

答案 0 :(得分:0)

你可以做这样的事情

myremotepost.Add("currency", "INR");

它将为当前请求设置货币INR。