Instantly add simple crowdfunding to your Ruby on Rails application with PayPal Payments Standard.
This project is still in development. Do not use, especially in a production application.
There are several configuation variables. Here is the list and what they do:
-
paypal_email: this will set the PayPal email address to use for making payments to
-
paypal_sandbox: set this to true if you’re wanting to test the functionality with PayPal’s sandbox area. Sign up at developer.paypal.com
-
domain_without_ending_slash: This is the domain name the app is running on. MAKE SURE NOT TO PUT AN ENDING SLASH (this is a bad setup and will be fixed in the future)
To set the configuration, create a the file config/initializers/crowdfunding.rb and set each variable like so: Crowdfunding.variable = value
To test PayPal in your local development environment, you’ll need to have tunnelling enabled to ensure PayPal’s IPN can send the notification to your computer. Setup is very simple.
-
Install the localtunnel gem: gem install localtunnel
-
On the first run you will need to send localtunnel your public key like so: localtunnel -k ~/.ssh/id_rsa.pub 3000
-
Configure the engine with the URL localtunnel gives you
-
Done. Now you can repeat these steps whenever you’re using app in your development environment by just running: localtunnel 3000