Giter Club home page Giter Club logo

killbill-notifications-proxy's Introduction

Knp

The Kill Bill Notifications Proxy is a Rails mountable engine that can be exposed on a public IP to process notifications from gateways.

Assuming your Knp public address is killbill-public.acme.com, configure the notification URL in the gateway to be killbill-public.acme.com/notifications/plugin-name:

If you have multiple Kill Bill clusters, you can specify an optional cluster parameter in the path (see also the configuration section):

Mounting Knp into your own Rails app

  • Add knp to your Gemfile
  • Add mount Knp::Engine, at: "/killbill" in your config/routes.rb

Configuration

Using a configuration file

Create a file config/knp.yml:

development:
  killbill:
    base_uri: http://127.0.0.1:8080/
    api_key: bob
    api_secret: lazar
    username: admin
    password: password

Check out the symmetric-encryption gem for encrypting the password.

If you have multiple Kill Bill clusters:

development:
  killbill:
    us:
      base_uri: http://killbill-us.acme.com:8080/
      api_key: bob_us
      api_secret: lazar_us
      username: admin
      password: password
    europe:
      base_uri: http://killbill-europe.acme:8080/
      api_key: bob_europe
      api_secret: lazar_europe
      username: admin
      password: password

Using code

Specify your Kill Bill server configuration in config/initializers/killbill_client.rb:

KillBillClient.url        = 'http://127.0.0.1:8080/'
KillBillClient.api_key    = 'bob'
KillBillClient.api_secret = 'lazar'
KillBillClient.username   = 'admin'
KillBillClient.password   = 'password'
# To log requests
KillBillClient.logger     = Rails.logger

Running tests

rake test

Note: functional tests require an instance of Kill Bill to test against.

killbill-notifications-proxy's People

Contributors

pierre avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.