Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Testing PayPal with Rails

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

like image 609
guyaloni Avatar asked Jun 28 '16 17:06

guyaloni


People also ask

How do I integrate PayPal with rails?

Step 1: Create a plan using the PayPal API. Step 2: Update the last product in the database paypal_plan_name with the returned plan.id . Step 3: Add routes for PayPal subscription. Step 4: Handle create and execution in the PayPal service.

Does PayPal have a test mode?

Specify Test or Live TransactionsTest means that all transaction information is sent to test servers at PayPal. No money trades hands in test transactions. Once you complete your testing, you can Activate your account by clicking on the Activate Your Account button on the Home page to transact actual currency.

How do I test PayPal Express?

You can switch the «Paypal Express Checkout» payment method to the sandbox (test) mode on the PayPal module settings backend section: Create a PayPal sandbox account adn get credentials for it.

How to install stripe and PayPal in rails 6?

Note: You can check out new Rails 6 features in our recent article. Step 1: Initialize a Rails application. Initialize the project by running the project initialization with the rails command with your app name: And cd in your application folder. Step 2: Install gems. Besides Stripe and PayPal gems, a few other gems were added:

How do I test if my PayPal account is working?

For the PayPal processor, there ware two ways of testing based on how your account is setup: Using the Payflow simulator Using the PayPal sandbox To verify which one is being used do the following: Login to PayPal Manager. Click on Service Settings. Click on Set Upunder Hosted Checkout Page.

How do I start a stripe app in rails?

Step 1: Initialize a Rails application. Initialize the project by running the project initialization with the rails command with your app name: And cd in your application folder. Step 2: Install gems. Besides Stripe and PayPal gems, a few other gems were added:

How do I track sandbox Transactions on the PayPal API?

Just as you track live transactions on the PayPal live site, you track your sandbox transactions on the sandbox test site. During the test phase, use the sandbox endpoints and your sandbox account details in each PayPal API request that you make. Create and manage your set of sandbox accounts from the sandbox Accounts page.


2 Answers

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

like image 93
Subhash Chandra Avatar answered Sep 28 '22 00:09

Subhash Chandra


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.

like image 30
johncip Avatar answered Sep 28 '22 00:09

johncip