killbill-litle-plugin

Plugin to use Litle & Co. as a gateway.

Release builds are available on Maven Central with coordinates org.kill-bill.billing.plugin.ruby:litle-plugin.

Kill Bill compatibility

Plugin version Kill Bill version
2.x.y 0.14.z
3.x.y 0.16.z

Requirements

The plugin needs a database. The latest version of the schema can be found here.

Configuration

curl -v \
     -X POST \
     -u admin:password \
     -H 'X-Killbill-ApiKey: bob' \
     -H 'X-Killbill-ApiSecret: lazar' \
     -H 'X-Killbill-CreatedBy: admin' \
     -H 'Content-Type: text/plain' \
     -d ':litle:
  - :account_id: USD
    :merchant_id: "your-merchant-id-USD"
    :username: "your-username"
    :password: "your-password"
    :secure_page_url: "litle-secure-page-url"
    :paypage_id: "your-paypage-id-USD"
  - :account_id: EUR
    :merchant_id: "your-merchant-id-EUR"
    :username: "your-username"
    :password: "your-password"
    :secure_page_url: "litle-secure-page-url"
    :paypage_id: "your-paypage-id-EUR"' \
     http://127.0.0.1:8080/1.0/kb/tenants/uploadPluginConfig/killbill-litle

To go to production, create a litle.yml configuration file under /var/tmp/bundles/plugins/ruby/killbill-litle/x.y.z/ containing the following:

:litle:
  :test: false

Usage

You would typically implement Litle PayPage to tokenize credit cards.

After receiving the token from Litle, call:

curl -v \
     -X POST \
     -u admin:password \
     -H 'X-Killbill-ApiKey: bob' \
     -H 'X-Killbill-ApiSecret: lazar' \
     -H 'X-Killbill-CreatedBy: admin' \
     -H 'Content-Type: application/json' \
     -d '{
       "pluginName": "killbill-litle",
       "pluginInfo": {
         "properties": [{
           "key": "paypageRegistrationId",
           "value": "t3GER3BP3JHLASZe"
         }]
       }
     }' \
     "http://127.0.0.1:8080/1.0/kb/accounts/2a55045a-ce1d-4344-942d-b825536328f9/paymentMethods?isDefault=true"

An example implementation is exposed at:

http://127.0.0.1:8080/plugins/killbill-litle/form?kb_account_id=2a55045a-ce1d-4344-942d-b825536328f9&kb_tenant_id=a86d9fd1-718d-4178-a9eb-46c61aa2548f