关于kentico网站应用程序开发
本文关键字:应用程序开发 网站 kentico 关于 | 更新日期: 2023-09-27 17:50:04
我对kentico的应用程序开发有一个疑问。在肯提科的回应。重定向不起作用。代码不是错误但它没有重定向到kentico
中发布的url我写的代码如下:这段代码在。net应用程序的。cs页面
protected void btnPay_AsPerYourChoice(object sender, EventArgs e)
{
string name = "", city = "", itemname = "", amount = "", phone = "", iteminformation = "",currency="";
iteminformation = txtPurpose.Text;
name = txtName.Text;
city = "Hyderabad";
itemname = "Dresses";
amount = txtAmount.Text;
phone = "7207727159";
currency = ddlCurrency.SelectedValue.ToString();
string redirecturl = "";
redirecturl += "https://www.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + ConfigurationManager.AppSettings["paypalemail"].ToString();
redirecturl += "&first_name=" + name;
redirecturl += "&city=" + city;
redirecturl += "&state=Odisha";
redirecturl += "&item_name=" + itemname;
redirecturl += "&amount=" + amount;
redirecturl += "&night_phone_a=" + phone;
redirecturl += "&item_name=" + "iteminformation";
redirecturl += "&address1=" + "padma85.it@gmail.com";
redirecturl += "&shipping=0";
redirecturl += "&handling=0";
redirecturl += "&tax=0";
redirecturl += "&quantity=1";
redirecturl += "¤cy=" + "Rs";
redirecturl += "&return=" +
ConfigurationManager.AppSettings["SuccessURL"].ToString();
redirecturl += "&cancel_return=" +
ConfigurationManager.AppSettings["FailedURL"].ToString();
Response.Redirect(redirecturl);
}
下面的代码在web中。配置文件:
<add key="token" value="PW1BDVNqVPVanwduF_Tb2Ey91aT1Uhx1kL7HPc-7e8S-6AnUwSSHyasolSe"/>
<add key="paypalemail" value="k.tapankumar@gmail.com"/>
<add key="PayPalSubmitUrl" value="https://www.paypal.com/cgi-bin/webscr"/>
<add key="FailedURL" value="http://www.mrsoft.co.in/ProceedToPayment.aspx"/>
<add key="SuccessURL" value="http://www.mrsoft.co.in/ProceedToPayment.aspx"/>
尝试使用Kentico的API代码来执行重定向:
URLHelper.Redirect()