litle-plugin

Plugin for accessing Litle as a payment gateway

License

License

Categories

Categories

Ruby Languages
GroupId

GroupId

org.kill-bill.billing.plugin.ruby
ArtifactId

ArtifactId

litle-plugin
Last Version

Last Version

5.0.0
Release Date

Release Date

Type

Type

pom
Description

Description

litle-plugin
Plugin for accessing Litle as a payment gateway
Project URL

Project URL

http://github.com/killbill/killbill-litle-plugin
Source Code Management

Source Code Management

https://github.com/killbill/killbill-litle-plugin/

Download litle-plugin

How to add to project

<!-- https://jarcasting.com/artifacts/org.kill-bill.billing.plugin.ruby/litle-plugin/ -->
<dependency>
    <groupId>org.kill-bill.billing.plugin.ruby</groupId>
    <artifactId>litle-plugin</artifactId>
    <version>5.0.0</version>
    <type>pom</type>
</dependency>
// https://jarcasting.com/artifacts/org.kill-bill.billing.plugin.ruby/litle-plugin/
implementation 'org.kill-bill.billing.plugin.ruby:litle-plugin:5.0.0'
// https://jarcasting.com/artifacts/org.kill-bill.billing.plugin.ruby/litle-plugin/
implementation ("org.kill-bill.billing.plugin.ruby:litle-plugin:5.0.0")
'org.kill-bill.billing.plugin.ruby:litle-plugin:pom:5.0.0'
<dependency org="org.kill-bill.billing.plugin.ruby" name="litle-plugin" rev="5.0.0">
  <artifact name="litle-plugin" type="pom" />
</dependency>
@Grapes(
@Grab(group='org.kill-bill.billing.plugin.ruby', module='litle-plugin', version='5.0.0')
)
libraryDependencies += "org.kill-bill.billing.plugin.ruby" % "litle-plugin" % "5.0.0"
[org.kill-bill.billing.plugin.ruby/litle-plugin "5.0.0"]

Dependencies

There are no dependencies for this project. It is a standalone project that does not depend on any other jars.

Project Modules

There are no modules declared in this project.

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
4.x.y 0.18.z
5.x.y 0.20.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"
    :login: "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"
    :login: "your-username"
    :password: "your-password"
    :secure_page_url: "litle-secure-page-url"
    :paypage_id: "your-paypage-id-EUR" 
:multicurrency:
  :USD: "USD"
  :EUR: "EUR"' \
     http://127.0.0.1:8080/1.0/kb/tenants/uploadPluginConfig/killbill-litle

multicurrency setting provides the mapping between transaction currency to account_id. The default currency is the first key in the multicurrency config, in the example above, it is "USD". If multicurrency is not present, the default account_id will be the first account_id in litle dictionary.

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

Running the tests

In order to run the certification and integration tests, you will need a valid merchant id and credentials. You will also likely have received a URL to test with when signing up for the merchant id.

Then run the tests with:

LITLE_TEST=true \
LITLE_TEST_URL="<the URL>" \
LITLE_MERCHANT_ID="<your merchant id>" \
LITLE_LOGIN="<your login>" \
LITLE_PASSWORD="<your password>" \
bundle exec rspec
org.kill-bill.billing.plugin.ruby

Kill Bill

Kill Bill has been the leading open-source platform for billing and payment since 2010.

Versions

Version
5.0.0
4.0.1
4.0.0
3.0.0
2.0.0
1.10.0