Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions html5/_main_toc.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,9 @@ nav.sidebar-nav
li
a.nav-link href="/latest/avatax-plugin.html"
| AvaTax Plugin
li
a.nav-link href="/latest/braintree-plugin.html"
| Braintree Plugin
li
a.nav-link href="/latest/notification_plugin.html"
| Notification Plugins
Expand Down
87 changes: 87 additions & 0 deletions userguide/tutorials/braintree-plugin.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,87 @@
= Braintree Plugin

The https://github.com/killbill/killbill-braintree[Braintree Plugin] is a Kill Bill payment plugin for the https://www.braintreepayments.com/[Braintree payment gateway].

== Prerequisites

* Ensure that you have Kill Bill, Kaui, and the database set up as explained in the https://docs.killbill.io/latest/getting_started.html[__Getting Started Guide__].
* Ensure that you have https://curl.haxx.se/[_cURL_] installed. If you are on Windows, we recommend that you use https://git-scm.com/download/win[_Git Bash_] to run the `cURL` commands.
* Ensure that you have a Braintree account. A Braintree sandbox account may be used for testing purposes. You can sign up for a free account at https://www.braintreepayments.com/sandbox[https://www.braintreepayments.com/sandbox].

== Overview

== Plugin Installation

You can install the plugin as explained in the https://docs.killbill.io/latest/plugin_installation#_plugin_installation[Plugin Installation Guide].

For example, to install the plugin via https://github.com/killbill/killbill-cloud/blob/master/kpm[KPM], you can run the following command:

[source,bash]
----
kpm install_java_plugin braintree-plugin --destination=<path_to_install_plugin>
----

You can also install the plugin via the https://aviate.killbill.io/home[Aviate UI] via the "Plugin Marketplace" tab. Refer to the <<aviate_integration, Aviate Integration>> section below for more details.

== Database Configuration

The Braintree plugin requires some additional database tables. To create these tables, please follow the steps given below:

. Connect to the Kill Bill database.

. Run the https://github.com/killbill/killbill-braintree/blob/master/src/main/resources/ddl.sql[Braintree Plugin DDL].

== Plugin Configuration

The Braintree plugin requires the following properties:

[options="header",cols="1,1,1,1"]
|===
|Property Name |Description | Required|Default Value
//----------------------
|org.killbill.billing.plugin.braintree.btEnvironment| The Braintree environment to use. |Yes|-|
org.killbill.billing.plugin.braintree.btMerchantId |Unique Braintree merchant identifier that tells the plugin which merchant account to process transactions under. | Yes | -
|org.killbill.billing.plugin.braintree.btPublicKey |The public API key from your Braintree account used to authenticate API calls.| Yes |-
|org.killbill.billing.plugin.braintree.btPrivateKey|The private API key from your Braintree account used alongside the public key to authenticate API calls.|No | DEFAULT

|===

These properties can be configured globally via the https://docs.killbill.io/latest/userguide_configuration.html#global_configuration_properties[Kill Bill Configuration File] or on a per-tenant basis via the https://apidocs.killbill.io/tenant#add-a-per-tenant-configuration-for-a-plugin[Add a per-tenant configuration for a plugin] endpoint. For example, to configure these properties for the `bob/lazar` tenant, you can use the following curl:

[source, bash]
----
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.braintree.btEnvironment=sandbox
org.killbill.billing.plugin.braintree.btMerchantId=xxx
org.killbill.billing.plugin.braintree.btPublicKey=xxx
org.killbill.billing.plugin.braintree.btPrivateKey=xxx' \
http://127.0.0.1:8080/1.0/kb/tenants/uploadPluginConfig/killbill-braintree
----

Alternative, you can also configure these properties via the https://aviate.killbill.io/home[Aviate UI] by navigating to the "Plugin Configuration" tab. Refer to the <<aviate_integration, Aviate Integration>> section below for more details.

// == Kaui Integration TBB

== Aviate Integration

You can use the https://aviate.killbill.io/home[Aviate UI] to install/configure the plugin. the following demo

++++
<div>
<script async src="https://js.storylane.io/js/v2/storylane.js"></script>
<div class="sl-embed" style="position:relative;padding-bottom:calc(49.85% + 25px);width:100%;height:0;transform:scale(1)">
<iframe loading="lazy" class="sl-demo" src="https://killbill.storylane.io/demo/8hxhjuek5f2o?embed=inline" name="sl-embed" allow="fullscreen" allowfullscreen style="position:absolute;top:0;left:0;width:100%!important;height:100%!important;border:1px solid rgba(63,95,172,0.35);box-shadow: 0px 0px 18px rgba(26, 19, 72, 0.15);border-radius:10px;box-sizing:border-box;"></iframe>
</div>
</div>
++++





Loading