我想将 PayPal 集成到我的应用程序中。 看了很多文章,包括官方文档。 IE。 http://www.codeproject.com/Articles/870870/Using-Paypal-Rest-API-with-ASP-NET-MVC https://github.com/paypal/PayPal-NET-SDK 并一步步做。没有结果:(
首先,我从 Nuget 安装了 PayPal 包:
Install-Package Paypal
其次,我转到我的 paypal 帐户并创建了测试应用程序:
我的 web.config:
当我打电话
var config = ConfigManager.Instance.GetProperties();
// Use OAuthTokenCredential to request an access token from PayPal
var accessToken = new OAuthTokenCredential(config).GetAccessToken();
它抛出异常:
Retried 1 times.... Exception in PayPal.HttpConnection.Execute(). Check log for more details.
(我应该检查哪个日志 - 不明白...)
当我通过调试器检查时,我看到该对象 config 正确配置了 clientId 和 clientSecret
出了什么问题(或者我丢了什么东西)?
另外,文档有链接 https://www.sandbox.paypal.com/ ,但我根本无法打开此链接。也许,我应该允许更多?
最佳答案
它不起作用,因为它不允许我的 IP 地址(受国家/地区限制)。关于它的更多详细信息https://developer.paypal.com/docs/faq/#international-developer-questions
谢谢你,安德鲁
关于asp.net-mvc - 我无法将 Paypal 配置为在 ASP.NET MVC 应用程序中使用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35663028/