用asp.net C#贝宝沙箱一体化 [英] Paypal sandbox integration with asp.net c#
问题描述
我使用贝宝沙箱solution.I发送该请求波纹管方式:
I am using PayPal sandbox solution.I sent this request bellow way:
string redirecturl = "";
redirecturl += "https://www.sandbox.paypal.com/cgi-bin/webscr?cmd=_xclick&business=" + ConfigurationManager.AppSettings["paypalemail"].ToString();
redirecturl += "&first_name=Liton";
redirecturl += "&city=Dhaka";
redirecturl += "&state=Baridhara";
redirecturl += "&item_name=Recharge";
redirecturl += "&amount=" + money;
redirecturl += "&shipping=0";
redirecturl += "&handling=0";
redirecturl += "&tax=0";
redirecturl += "&quantity=1";
redirecturl += "¤cy=USD";
redirecturl += "&return=" + ConfigurationManager.AppSettings["SuccessURL"].ToString();
redirecturl += "&cancel_return=" + ConfigurationManager.AppSettings["FailedURL"].ToString();
Response.Redirect(redirecturl);
成功付款后我不能让贝宝返回值。我怎样才能返回值,如果成功还是失败?
After successfully payment i cannot get Paypal return value. How can i get return value if success or fail?
tranref = Request.QueryString["tx"].ToString();
transtat = Request.QueryString["st"].ToString();
tranamt = Request.QueryString["amt"].ToString();
trancur = Request.QueryString["cc"].ToString();
我想在成功页面这种方式来获得价值,但所有的价值null.Please帮我搭上返回值。
I am trying to get value in Success page this way but all value are null.Please help me to catch return value.
推荐答案
您需要使用付款数据传输(PDT)抓住并确认了付款标准交易的返回信息。有一些样品在这里: https://github.com/paypal/pdt-$c $ C-样品
You would need to use Payment Data Transfer (PDT) to grab and verify the return information for a Payments Standard transaction. There are some samples here: https://github.com/paypal/pdt-code-samples
您可能要设置的 RM
变量, 1
的值,如果你是GET细节或之后 2
如果你想POST信息。使用PDT返回的方法将永远是一个GET。
You may want to set the rm
variable with a value of 1
if you're after GET details or 2
if you want POST information. Using PDT the return method will always be a GET.
这篇关于用asp.net C#贝宝沙箱一体化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!