Kill Bill PayPal demo
Ruby
Switch branches/tags
Nothing to show
Clone or download
Latest commit 6eb7c30 Nov 16, 2016
Permalink
Failed to load latest commit information.
Gemfile Initial implementation Nov 16, 2016
Gemfile.lock Initial implementation Nov 16, 2016
README.md Update README.md Nov 16, 2016
app.rb Initial implementation Nov 16, 2016
screen1.png Add screenshots Nov 16, 2016
screen2.png Add screenshots Nov 16, 2016
screen3.png Add screenshots Nov 16, 2016

README.md

Kill Bill PayPal demo

This sample app shows you how to integrate PayPal Express with Kill Bill subscriptions APIs.

Prerequisites

Ruby 2.1+ or JRuby 1.7.20+ is recommended. If you don’t have a Ruby installation yet, use RVM:

gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
\curl -sSL https://get.rvm.io | bash -s stable --ruby

After following the post-installation instructions, you should have access to the ruby and gem executables.

Install the dependencies by running in this folder:

gem install bundler
bundle install

This also assumes:

Run

To run the app:

ruby app.rb

or if you are using Docker:

KB_URL='http://192.168.99.100:8080' ruby app.rb

Then go to http://localhost:4567/ where you should see the PayPal checkout link.

Make sure to configure Kill Bill with a large timeout, e.g. org.killbill.payment.plugin.timeout=15s, as the API calls to PayPal take time.

This will:

  • Create a BAID in PayPal
  • Create a new Kill Bill account
  • Add a default payment method on this account associated with this BAID
  • Create a new subscription for the sports car monthly plan (with a $10 30-days trial)
  • Charge the BAID for $10

Shopping cart

Checkout Review

Checkout