I can't configure Paypal to use in ASP.NET MVC application

℡╲_俬逩灬. 提交于 2019-12-13 00:48:59

问题


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 :(

First at all, I installed package PayPal from Nuget:

Install-Package Paypal

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

My web.config:

when I call

        var config = ConfigManager.Instance.GetProperties();

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

it throws exception:

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

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

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

what is wrong (or maybe I lost something)?

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


回答1:


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

Thank you, Andrew Angell




回答2:


It's network proxy that blocking Paypal API request



来源:https://stackoverflow.com/questions/35663028/i-cant-configure-paypal-to-use-in-asp-net-mvc-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!