如何在付款方完成交易后自动重定向页面.. [英] How can I Redirect a page automatically after completing transaction in pay pal..

查看:91
本文介绍了如何在付款方完成交易后自动重定向页面..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在paypal完成交易后自动重定向页面。



i在c#中有以下代码

  //  如果已成功执行transactioin,则重定向SuccessURL页面 - 此页面将由开发人员设计 
redirectUrl + = & return = + ConfigurationManager.AppSettings [ SuccessURL]。ToString();

// 如果transactioin失败,重定向FailedURL页面 - 此页面将由开发人员
redirectUrl + = & cancel_return = + ConfigurationManager.AppSettings [ FailedURL]。ToString();

Response.Redirect(redirectUrl);





< pre lang = C#> 
< appSettings>
< add key =FailedURLvalue =http:// localhost:5519 / paypalSetting.aspx/>
< add key =SuccessURLvalue =http:// localhost:5519 / paypalSetting.aspx/>
< / appSettings>

解决方案

OP写道:

当用户点击捐赠按钮时,可以将页面连接到paypal网站,当用户完成交易时,我想将它返回到我的网站?





您应该在重定向页面中包含返回页面。



在重定向到支付网关之前,一些必填字段从网站传递到付款包含返回页面的网关。交易后,网关系统将自动调用返回页面。



更好地联系支付网关服务提供商。在这种情况下,他们比我们知道更多



你必须采取格里夫的回答 [ ^ ]认真。



请参考此处以获取一个主意:

PayPal for C#简介 - ASP.NET开发人员 [< a href =http://www.codeproject.com/Articles/42894/Introduction-to-PayPal-for-C-ASP-NET-developerstarget =_ blanktitle =New Window> ^ ]

ASP.NET中的PayPal网关集成 [ ^ ]

使用ASP.NET中的PayPal支付系统 [ ^ ]



并看到这个o:

MVC .net中的支付网关项目 [ ^ ]


How can I Redirect a page Automaticaly after completing transaction in paypal.

i have following code in c#

//If transactioin has been successfully performed, redirect SuccessURL page- this page will be designed by developer
redirectUrl += "&return=" + ConfigurationManager.AppSettings["SuccessURL"].ToString();

//If transactioin has been failed, redirect FailedURL page- this page will be designed by developer
redirectUrl += "&cancel_return=" + ConfigurationManager.AppSettings["FailedURL"].ToString();

Response.Redirect(redirectUrl);



<pre lang="c#">
 <appSettings>  
    <add key="FailedURL" value="http://localhost:5519/paypalSetting.aspx"/> 
    <add key="SuccessURL" value="http://localhost:5519/paypalSetting.aspx"/>
  </appSettings>

解决方案

OP Wrote:

when user click donate button in may page it connects to the paypal website and when the user complete the transaction i want it back to my website?



You should include the return page in the redirection page itself.

Before redirecting to payment gateway,some mandatory fields are passed from the website to the payment gateway which includes return page.After transaction ,the return page will be called automatically by the gateway system.

Better contact a Payment gateway service provider.In this case, they know more than us

You have to take Griff's answer[^] seriously .

Refer here to get an idea:
Introduction to PayPal for C# - ASP.NET developers[^]
PayPal Gateway Integration in ASP.NET[^]
Use of the PayPal payment system in ASP.NET[^]

and see this too:
payment gateway in MVC .net project[^]


这篇关于如何在付款方完成交易后自动重定向页面..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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