会话值未传递 [英] Session value is not passing

查看:56
本文介绍了会话值未传递的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我正在创建在线旅游门户网站。我在付款成功页面后获取会话变量时遇到错误。它在本地服务器上工作正常,但在线工作不正常。 Paypal和 CCAvenue 支付网关在我的网站上使用。



示例: -



在我的页面中加载获取一些请求查询字符串值并将其分配给这样的会话

Hi,

I am creating online travel portal website. I am having the error in getting session variable after the payment successpage. It is working fine in local server but online not working properly. Paypal and CCAvenue payment gateway are use in my website.

Example here :-

In my page load am getting some request query string value and assigned that to session like this

Session["fname"] = Request.Querystring["name"];

Session["lname"] = Request.Querystring["age"];

Session["email"] = Request.Querystring["email"];





PayPal 付款代码是



and PayPal payment code is

string redirecturl = "";
string amount = Session["dollarrate"].ToString();
// Mention URL to redirect content to paypal site
redirecturl += "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + ConfigurationManager.AppSettings["paypalemail"].ToString();

// First name i assign static based on login details assign this value
redirecturl += "&first_name=name";

// City i assign static based on login user detail you change this value
redirecturl += "&city=city";

// State i assign static based on login user detail you change this value
redirecturl += "&state=city";

// Product Name
redirecturl += "&item_name=Property Verification Charge";

// Product Amount
redirecturl += "&amount=" + amount;

// Business contact id
redirecturl += "&business=email";

//Shipping charges if any
redirecturl += "&shipping=5";

// Handling charges if any
redirecturl += "&handling=5";

// Tax amount if any
redirecturl += "&tax=5";

// Add quatity i added one only statically
redirecturl += "&quantity=1";

//Currency code
redirecturl += "¤cy=USD";

//Success return page url
redirecturl += "&return=ConfigurationManager.AppSettings["SuccessURL"].ToString();

// Failed return page url
redirecturl += "&cancel_return=" + ConfigurationManager.AppSettings["FailedURL"].ToString();
Response.Redirect(redirecturl);



点击付款后已正确完成,但paypal页面被重定向成功页面没有得到会话值。这一切都将为null。但此代码在本地服务器中正常工作但在在线服务器中没有...


after click and payment is properly finished but the paypal page is redirected success page am not get the session value. it all is going to null. but this code is working properly in local server but not in online server...

推荐答案

访问如何:在ASP.NET网页之间传递值 [ ^ ]。


这篇关于会话值未传递的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆