cybersource-plugin

Plugin for accessing Cybersource as a payment gateway

License

License

Categories

Categories

Ruby Languages
GroupId

GroupId

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

ArtifactId

cybersource-plugin
Last Version

Last Version

5.2.7
Release Date

Release Date

Type

Type

pom
Description

Description

cybersource-plugin
Plugin for accessing Cybersource as a payment gateway
Project URL

Project URL

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

Source Code Management

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

Download cybersource-plugin

How to add to project

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

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-cybersource-plugin

Plugin to use CyberSource as a gateway.

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

Kill Bill compatibility

Plugin version Kill Bill version
1.x.y 0.14.z
4.x.y 0.16.z
5.x.y 0.18.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 ':cybersource:
  - :account_id: "merchant_account_1"
    :login: "your-login"
    :password: "your-password"
  - :account_id: "merchant_account_2"
    :login: "your-login"
    :password: "your-password"' \
     http://127.0.0.1:8080/1.0/kb/tenants/uploadPluginConfig/killbill-cybersource

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

:cybersource:
  :test: false

To use PostgreSQL:

  • Set the following Kill Bill property: org.killbill.osgi.system.bundle.export.packages.extra=org.postgresql
  • Update the on-disk CyberSource configuration file with this section:
:database:
  :adapter: postgresql

Usage

To store a credit card (note that CyberSource requires a full billing address, hence the various fields below):

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-cybersource",
       "pluginInfo": {
         "properties": [
           {
             "key": "ccFirstName",
             "value": "John"
           },
           {
             "key": "ccLastName",
             "value": "Doe"
           },
           {
             "key": "address1",
             "value": "5th Street"
           },
           {
             "key": "city",
             "value": "San Francisco"
           },
           {
             "key": "zip",
             "value": "94111"
           },
           {
             "key": "state",
             "value": "CA"
           },
           {
             "key": "country",
             "value": "USA"
           },
           {
             "key": "ccExpirationMonth",
             "value": 12
           },
           {
             "key": "ccExpirationYear",
             "value": 2017
           },
           {
             "key": "ccNumber",
             "value": "4111111111111111"
           }
         ]
       }
     }' \
     "http://127.0.0.1:8080/1.0/kb/accounts/2a55045a-ce1d-4344-942d-b825536328f9/paymentMethods?isDefault=true&pluginProperty=skip_gw=true"

CyberSource also requires an email address during the payment call. The plugin will pull the one from the Kill Bill account. Alternatively, you can pass it as a plugin property:

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 '{
       "transactionType": "AUTHORIZE",
       "amount": 5
     }' \
     http://127.0.0.1:8080/1.0/kb/accounts/2a55045a-ce1d-4344-942d-b825536328f9/[email protected]

Plugin properties

Key Description
skip_gw If true, skip the call to CyberSource
payment_processor_account_id Config entry name of the merchant account to use
external_key_as_order_id If true, set the payment external key as the CyberSource order id
ignore_avs If true, ignore the results of AVS checking
ignore_cvv If true, ignore the results of CVN checking
cc_first_name Credit card holder first name
cc_last_name Credit card holder last name
cc_type Credit card brand
cc_expiration_month Credit card expiration month
cc_expiration_year Credit card expiration year
cc_verification_value CVC/CVV/CVN
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
commerce_indicator Override the commerce indicator field
eci Network tokenization attribute
payment_cryptogram Network tokenization attribute
transaction_id Network tokenization attribute
payment_instrument_name ApplePay tokenization attribute
payment_network ApplePay tokenization attribute
transaction_identifier ApplePay tokenization attribute
source androidpay for AndroidPay or googlepay for GooglePay
force_validation If true, trigger a non-$0 auth to validate cards not supporting $0 auth
force_validation_amount Amount to use when force_validation is set
merchant_descriptor Merchant descriptor as {"name":"Merchant Name","contact":"8888888888"}
reconciliation_id Optional reconciliation id. CYBS will generate one if not present.
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.2.7
5.2.6
5.2.5
5.2.4
5.2.3
5.2.2
5.2.1
5.2.0
5.1.0
5.0.1
5.0.0
4.0.12
4.0.11
4.0.10
4.0.9
4.0.8
4.0.7
4.0.6
4.0.5
4.0.4
4.0.3
4.0.2
4.0.1
4.0.0
3.3.0
3.2.0
3.1.0
3.0.0
2.0.0
1.0.0
0.0.4
0.0.3
0.0.2
0.0.1