Kill Bill OSGI Payeezy plugin

Kill Bill Payeezy plugin

License

License

Categories

Categories

Java Languages
GroupId

GroupId

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

ArtifactId

payeezy-plugin
Last Version

Last Version

0.1.0
Release Date

Release Date

Type

Type

bundle
Description

Description

Kill Bill OSGI Payeezy plugin
Kill Bill Payeezy plugin
Project URL

Project URL

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

Source Code Management

http://github.com/killbill/killbill-payeezy-plugin/tree/master

Download payeezy-plugin

Dependencies

provided (5)

Group / Artifact Type Version
com.google.code.findbugs : jsr305 jar 2.0.1
javax.servlet : javax.servlet-api jar 3.1.0
org.kill-bill.billing : killbill-api jar 0.40
org.kill-bill.billing.plugin : killbill-plugin-api-notification jar 0.20
org.kill-bill.billing.plugin : killbill-plugin-api-payment jar 0.20

test (5)

Group / Artifact Type Version
mysql : mysql-connector-mxj jar 5.0.12
org.kill-bill.billing.plugin.java : killbill-base-plugin test-jar 1.0.1
org.kill-bill.commons : killbill-embeddeddb-mysql test-jar 0.19
org.mockito : mockito-all jar 1.10.19
org.testng : testng jar 6.8.8

Project Modules

There are no modules declared in this project.

killbill-payeezy-plugin

Plugin to use Payeezy as a gateway.

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

Kill Bill compatibility

Plugin version Kill Bill version
0.1.y 0.17.z

Requirements

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

Configuration

The following properties are required:

  • org.killbill.billing.plugin.payeezy.apiKey: your API Key
  • org.killbill.billing.plugin.payeezy.token: your token
  • org.killbill.billing.plugin.payeezy.paymentUrl: Payment service url (i.e. https://api-cert.payeezy.com or https://api.payeezy.com)

The following properties are optional:

  • org.killbill.billing.plugin.payeezy.paymentConnectionTimeout: Connection time-out in milliseconds
  • org.killbill.billing.plugin.payeezy.paymentReadTimeout: Read time-out in milliseconds
  • org.killbill.billing.plugin.payeezy.proxyServer: Proxy server address
  • org.killbill.billing.plugin.payeezy.proxyPort: Proxy server port
  • org.killbill.billing.plugin.payeezy.proxyType: Proxy server type (HTTP or SOCKS)
  • org.killbill.billing.plugin.payeezy.trustAllCertificates: Whether to disable SSL certificates validation

These properties can be specified globally via System Properties or on a per tenant basis:

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 'org.killbill.billing.plugin.payeezy.paymentUrl=WWW
org.killbill.billing.plugin.payeezy.apiKey=XXX
org.killbill.billing.plugin.payeezy.token=YYY' \
     http://127.0.0.1:8080/1.0/kb/tenants/uploadPluginConfig/killbill-payeezy

Usage

Credit cards

Add a payment method:

curl -v \
     -u admin:password \
     -H "X-Killbill-ApiKey: bob" \
     -H "X-Killbill-ApiSecret: lazar" \
     -H "Content-Type: application/json" \
     -H "X-Killbill-CreatedBy: demo" \
     -X POST \
     --data-binary '{
       "pluginName": "killbill-payeezy",
       "pluginInfo": {
         "properties": [
           {
             "key": "ccFirstName",
             "value": "John"
           },
           {
             "key": "ccLastName",
             "value": "Smith"
           },
           {
             "key": "ccExpirationMonth",
             "value": 10
           },
           {
             "key": "ccExpirationYear",
             "value": 2020
           },
           {
             "key": "ccNumber",
             "value": 4788250000028291
           },
           {
             "key": "ccType",
             "value": "visa"
           },
           {
             "key": "ccVerificationValue",
             "value": 123
           }
         ]
       }
     }' \
     "http://127.0.0.1:8080/1.0/kb/accounts/<ACCOUNT_ID>/paymentMethods?isDefault=true"

Notes:

  • Make sure to replace ACCOUNT_ID with the id of the Kill Bill account
  • Test data is available here

To trigger a payment:

curl -v \
     -u admin:password \
     -H "X-Killbill-ApiKey: bob" \
     -H "X-Killbill-ApiSecret: lazar" \
     -H "Content-Type: application/json" \
     -H "X-Killbill-CreatedBy: demo" \
     -X POST \
     --data-binary '{"transactionType":"AUTHORIZE","amount":"5","currency":"USD"}' \
    "http://127.0.0.1:8080/1.0/kb/accounts/<ACCOUNT_ID>/payments

Notes:

  • Make sure to replace ACCOUNT_ID with the id of the Kill Bill account

You can verify the state of the transaction by listing the payments:

curl -v \
     -u admin:password \
     -H "X-Killbill-ApiKey: bob" \
     -H "X-Killbill-ApiSecret: lazar" \
     -H "Content-Type: application/json" \
     -H "X-Killbill-CreatedBy: demo" \
    "http://127.0.0.1:8080/1.0/kb/accounts/<ACCOUNT_ID>/payments?withPluginInfo=true"

Plugin properties

Key Description
ccNumber Credit card number
ccType Credit card brand
ccFirstName Credit card holder first name
ccLastName Credit card holder last name
ccExpirationMonth Credit card expiration month
ccExpirationYear Credit card expiration year
ccStartMonth Credit card start month
ccStartYear Credit card start year
ccVerificationValue CVC/CVV/CVN
ddNumber Direct Debit number
ddHolderName Direct Debit holder name
ddBic Direct Debit bank identification code
ddMandate Direct Debit mandate reference
email Purchaser email
address1 Billing address first line
address2 Billing address second line
city Billing address city
zip Billing address zip code
state Billing address state
country Billing address country
PaReq 3D-Secure Pa Request
PaRes 3D-Secure Pa Response
MD 3D-Secure Message Digest
TermUrl 3D-Secure Term URL
threeDThreshold Minimum amount for triggering 3D-Secure
userAgent User-Agent for 3D-Secure Browser Info
acceptHeader Accept-Header for 3D-Secure Browser Info
org.kill-bill.billing.plugin.java

Kill Bill

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

Versions

Version
0.1.0