繁体   English   中英

Paypal沙箱与asp.net集成c#

[英]Paypal sandbox integration with asp.net c#

我正在使用PayPal沙箱解决方案。我发送此请求的方式如下:

   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 += "&currency=USD";
                redirecturl += "&return=" + ConfigurationManager.AppSettings["SuccessURL"].ToString();
                redirecturl += "&cancel_return=" + ConfigurationManager.AppSettings["FailedURL"].ToString();    
                Response.Redirect(redirecturl);

成功付款后,我无法获得Paypal返回值。 如果成功或失败,我如何获得回报价值?

        tranref = Request.QueryString["tx"].ToString();
        transtat = Request.QueryString["st"].ToString();
        tranamt = Request.QueryString["amt"].ToString();
        trancur = Request.QueryString["cc"].ToString();

我试图以这种方式在Success页面中获取值,但所有值都为null。请帮助我捕获返回值。

您需要使用付款数据传输(PDT)来获取并验证付款标准交易的退货信息。 这里有一些示例: https//github.com/paypal/pdt-code-samples

您可能需要设置rm与价值变量1 ,如果你是GET细节或之后2 ,如果你想发布信息。 使用PDT,返回方法将始终是GET。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM