我无法配置Paypal在ASP.NET MVC应用程序中使用 [英] I can't configure Paypal to use in ASP.NET MVC application

查看:71
本文介绍了我无法配置Paypal在ASP.NET MVC应用程序中使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想将PayPal集成到我的应用程序中. 我已经阅读了很多文章,包括官方文档. IE. http://www.codeproject. com/Articles/870870/使用PayPal-Rest-API-with-ASP-NET-MVC https://github.com/paypal/PayPal-NET-SDK 并逐步进行.没有结果:(

I want to integrate PayPal to my application. I have read a lot of articles, including official documentation. I.e. http://www.codeproject.com/Articles/870870/Using-Paypal-Rest-API-with-ASP-NET-MVC https://github.com/paypal/PayPal-NET-SDK and do step by step. No result :(

首先,我从Nuget安装了PayPal软件包:

First at all, I installed package PayPal from Nuget:

安装包Paypal

Install-Package Paypal

第二,我去了我的Paypal帐户并创建了测试应用程序:

Secondly, I went to my paypal account and created test application:

我的web.config:

My web.config:

我打电话时

        var config = ConfigManager.Instance.GetProperties();

        // Use OAuthTokenCredential to request an access token from PayPal
        var accessToken = new OAuthTokenCredential(config).GetAccessToken();

它引发异常:

重试1次....PayPal.HttpConnection.Execute()中的异常. 查看日志以获取更多详细信息.

Retried 1 times.... Exception in PayPal.HttpConnection.Execute(). Check log for more details.

(我应该检查哪个日志-不理解...)

(which log should I check - don't understand...)

当我通过调试器检查时,发现该对象 config 具有正确的配置clientId和clientSecret

when I check by debugger I see, that object config has configurations clientId and clientSecret correctly

哪里出了问题(或者我丢失了一些东西)?

what is wrong (or maybe I lost something)?

此外,文档具有链接 https://www.sandbox.paypal.com/,但我根本无法打开此链接.也许我应该允许更多的东西?

Also, documentation has link https://www.sandbox.paypal.com/ , but I can't open this link at all. Maybe, I should allow something more?

推荐答案

它不起作用,因为不允许使用我的IP地址(受国家/地区限制).关于它的更多详细信息 https://developer.paypal.com/docs/faq /#international-developer-questions

It does not work because my IP address in not allowed for it (restriction by country). More detail information about it https://developer.paypal.com/docs/faq/#international-developer-questions

谢谢你,安德鲁·安吉尔(Andrew Angell)

Thank you, Andrew Angell

这篇关于我无法配置Paypal在ASP.NET MVC应用程序中使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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