You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: userguide/tutorials/braintree-plugin.adoc
+28-55Lines changed: 28 additions & 55 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,7 +5,7 @@ The https://github.com/killbill/killbill-braintree[Braintree Plugin] is a Kill B
5
5
== Prerequisites
6
6
7
7
* 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__].
8
-
* 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.
8
+
* Ensure that you have https://curl.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.
9
9
* 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].
10
10
11
11
== Overview
@@ -41,11 +41,10 @@ The Braintree plugin requires the following properties:
41
41
|===
42
42
|Property Name |Description | Required|Default Value
43
43
//----------------------
44
-
|org.killbill.billing.plugin.braintree.btEnvironment| The Braintree environment to use. |Yes|-|
45
-
org.killbill.billing.plugin.braintree.btMerchantId |Unique Braintree merchant identifier that tells the plugin which merchant account to process transactions under. | Yes | -
46
-
|org.killbill.billing.plugin.braintree.btPublicKey |The public API key from your Braintree account used to authenticate API calls.| Yes |-
47
-
|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
48
-
44
+
|org.killbill.billing.plugin.braintree.btEnvironment|The Braintree environment to use.|Yes|-
45
+
|org.killbill.billing.plugin.braintree.btMerchantId|Unique Braintree merchant identifier that tells the plugin which merchant account to process transactions under.|Yes|-
46
+
|org.killbill.billing.plugin.braintree.btPublicKey|The public API key from your Braintree account used to authenticate API calls.|Yes|-
47
+
|org.killbill.billing.plugin.braintree.btPrivateKey|The private API key from your Braintree account used alongside the public key to authenticate API calls.|Yes|-
49
48
|===
50
49
51
50
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:
Expected result: HTTP `201`/`204` and no validation errors in the response.
69
+
69
70
Alternatively, you can also configure these properties via the https://aviate.killbill.io/home[Aviate UI] "Plugin Configuration" tab. Refer to the <<aviate_integration, Aviate Integration>> section below for more details.
70
71
71
-
// == Kaui Integration TBB
72
+
// == Kaui Integration TBD
72
73
73
74
[[aviate_integration]]
74
75
== Aviate Integration
@@ -85,20 +86,21 @@ You can use the https://aviate.killbill.io/home[Aviate UI] to install/configure
85
86
++++
86
87
87
88
89
+
[[testing_the_plugin]]
88
90
== Testing the Plugin
89
91
90
92
Once the plugin is installed and configured, you can use it to process payments via the Braintree payment gateway. You can create a payment method, make a purchase, and view the transaction details in Kaui.
91
93
92
94
You can follow the steps given below to test the plugin:
93
95
94
-
1. Ensure that the plugin is installed and configured as explained above.
95
-
96
-
2. https://developer.paypal.com/braintree/articles/control-panel/vault/create[Create a customer] in Braintree with https://developer.paypal.com/braintree/docs/reference/general/testing#valid-card-numbers[test card details]. Save the **Customer ID** generated for future reference (it should be something like **620594365**).
96
+
. Ensure that the plugin is installed and configured as explained above.
97
97
98
-
3. https://apidocs.killbill.io/account#create-an-account[Create] a Kill Bill account. Save the **accountId** for further use.
98
+
. https://developer.paypal.com/braintree/articles/control-panel/vault/create[Create a customer] in Braintree with https://developer.paypal.com/braintree/docs/reference/general/testing#valid-card-numbers[test card details]. Save the **Customer ID** generated for future reference (it should be something like **620594365**).
99
99
100
-
4. https://apidocs.killbill.io/account#add-a-payment-method[Create] a payment method in Kill Bill using a https://developer.paypal.com/braintree/docs/reference/general/testing#payment-method-nonces[fake valid nonce] and the braintree customer id as follows:
100
+
. https://apidocs.killbill.io/account#create-an-account[Create] a Kill Bill account. Save the **accountId** for further use.
101
101
102
+
. https://apidocs.killbill.io/account#add-a-payment-method[Create] a payment method in Kill Bill using a https://developer.paypal.com/braintree/docs/reference/general/testing#payment-method-nonces[fake valid nonce] and the Braintree customer ID as follows:
Expected result: HTTP `201` and a response containing a `paymentMethodId`.
128
132
129
-
5. Create an https://apidocs.killbill.io/invoice#create-external-charge-s[external charge] on the account.
133
+
. Create an https://apidocs.killbill.io/invoice#create-external-charge-s[external charge] on the account.
130
134
131
-
6. Use the `paymentMethodId` to https://apidocs.killbill.io/invoice#trigger-an-invoice-run[trigger payment] (required only if the `paymentMethodId` is not set as the default payment).
135
+
. Use the `paymentMethodId` to https://apidocs.killbill.io/invoice#trigger-an-invoice-run[trigger payment] (required only if the `paymentMethodId` is not set as the default payment method).
132
136
133
-
## Integration
137
+
== Integration
134
138
135
-
In order to use the Braintree plugin, follow the steps given below:
139
+
In order to use the Braintree plugin in your application, follow the steps given below:
136
140
137
-
1. Ensure that the plugin is installed and configured as explained above.
138
-
139
-
2. Invoke the `BraintreeTokenServlet` to obtain a token:
141
+
. Ensure that the plugin is installed and configured as explained above.
140
142
143
+
. Invoke the `BraintreeTokenServlet` to obtain a token:
Expected result: HTTP `200` and a client token payload.
154
160
155
-
3. Use the https://developer.paypal.com/braintree/docs/start/drop-in[Braintree Drop-in] implementation to gather the customer's payment details and obtain a payment nonce.
156
-
157
-
4. https://developer.paypal.com/braintree/docs/guides/customers[Create a customer] in Braintree. Save the **Customer ID** generated for future reference (it should be something like **620594365**).
161
+
. Use the https://developer.paypal.com/braintree/docs/start/drop-in[Braintree Drop-in] implementation to gather the customer's payment details and obtain a payment nonce.
158
162
159
-
5. https://apidocs.killbill.io/account#create-an-account[Create] a Kill Bill account. Save the **accountId** for further use.
163
+
. Complete steps 2-4 from <<testing_the_plugin, Testing the Plugin>> to create a Braintree customer, create a Kill Bill account, and add a Kill Bill payment method with the generated nonce and Braintree customer ID.
160
164
161
-
6. https://apidocs.killbill.io/account#add-a-payment-method[Create] a payment method in Kill Bill using the nonce and the braintree customer id as follows:
0 commit comments