Testing PayPal with Rails

大城市里の小女人 提交于 2019-12-22 04:00:37

问题


I need to test a new PayPal integration with my application. I use PayPal sandbox in development env.

In order to test the entire interface, I figured out that ngrok might solve the problem of messages from PayPal.

I installed ngrok using apt-get install ngrok-client on my new Ubuntu 16.04 instalation.

When I try to run it (ngrok 3000, ngrok 80) I get the following error:

Invalid address server_addr 'ngrokd.ngrok.com:443': lookup ngrokd.ngrok.com: no such host

Any idea?
Any other solution to test PayPal integration?

==================== EDIT ==================

Very important - if youi use Rails 4.2.0, have a look at this tutorial, it might save you some hours of frustration:
https://www.youtube.com/watch?v=YXKNxEv35HU


回答1:


Try to Run ./ngrok http 3000 in the Directory where your Ngrok executable file is placed.




回答2:


I ran into this when trying to install ngrok with apt-get on Ubuntu 14.

The packaged version (1.6) no longer works, because service for ngrok 1.x was discontinued in April 2016.

The ngrok 1.X service has shut down and all users are encouraged to upgrade to ngrok 2.0.

The easiest way to continue using ngrok is to upgrade to 2.0. ngrok 2.0 has been available for nearly a year and it is a faster, more stable and more powerful tool. I hope that you'll love it even more than the original.

Ubuntu 16 also ships ngrok 1.6, unfortunately.

The current version available for download at ngrok.com is 2.1.3, which works fine. ngrok is a single executable file, so all you need to do to install it is unzip and put it somewhere on your PATH.




回答3:


I supposed you installed ngrok from package manager with this command

$ sudo apt-get install ngrok-client

But it no longer work because it's the 1.6 version.

You have to download a new version on official page. Then you can run it like this:

$ ./ngrok http 3000


来源:https://stackoverflow.com/questions/38082548/testing-paypal-with-rails

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