How To Install tryton-modules-account-payment-braintree on Debian 12
Introduction
In this tutorial we learn how to install tryton-modules-account-payment-braintree
on Debian 12.
What is tryton-modules-account-payment-braintree
tryton-modules-account-payment-braintree is:
Tryton is a high-level general purpose application platform. It is the base of a complete business solution as well as a comprehensive health and hospital information system (GNUHealth).
The account_payment_braintree module allows receipt of payments using
Braintree
.
It uses the Drop-in UI
in a checkout form to handle the payment method nonce
_ for card and other supported payment methods.
.. _Braintree
: https://www.braintreepayments.com/
.. _Drop-in UI
: https://developers.braintreepayments.com/guides/drop-in/overview/javascript/v3
.. _payment method nonce
: https://developers.braintreepayments.com/guides/payment-method-nonces
Account
The Account stores the information about the Braintree account like the merchant ID, the public and secret keys etc.
The account’s webhook endpoint is the URL used by Braintree’s webhooks_. If no webhook is setup, disputes will not update existing payments.
.. _webhooks: https://developers.braintreepayments.com/guides/webhooks/overview
Customer
The Customer allows parties to be registered as Braintree customers. The checkout/add card button opens the Braintree Drop-in UI form.
A scheduled task runs every hour to create new customers on Braintree and another to delete them if they have become inactive.
Journal
The journal has a new field to store the Braintree account if the process method is set to “Braintree”.
Payment
The payment also has a checkout button which opens the Braintree Drop-in UI
form.
A payment can be processed using a nonce or a payment method
_ from the
customer.
In case of an error, a new field displays the error message from Braintree.
The settle field can be unchecked to only authorize on processing and settle
the amount in a second step.
Two scheduled tasks run every 15 minutes to transact and settle each processing payment. Another scheduled task also runs every 15 minutes to pull updates for each processing payment until they have succeeded or failed.
The Braintree payments have a pull button which can be used to force an update with the braintree transaction.
.. _payment method: https://developers.braintreepayments.com/guides/payment-methods
Configuration
The account_payment_braintree module uses the section
account_payment_braintree
to retrieve some parameters:
payment_methods_cache
: defines the duration in seconds that payment methods are kept in the cache. The default value is15 * 60
.
There are three methods to install tryton-modules-account-payment-braintree
on Debian 12. We can use apt-get
, apt
and aptitude
. In the following sections we will describe each method. You can choose one of them.
Install tryton-modules-account-payment-braintree Using apt-get
Update apt database with apt-get
using the following command.
sudo apt-get update
After updating apt database, We can install tryton-modules-account-payment-braintree
using apt-get
by running the following command:
sudo apt-get -y install tryton-modules-account-payment-braintree
Install tryton-modules-account-payment-braintree Using apt
Update apt database with apt
using the following command.
sudo apt update
After updating apt database, We can install tryton-modules-account-payment-braintree
using apt
by running the following command:
sudo apt -y install tryton-modules-account-payment-braintree
Install tryton-modules-account-payment-braintree Using aptitude
If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Debian. Update apt database with aptitude
using the following command.
sudo aptitude update
After updating apt database, We can install tryton-modules-account-payment-braintree
using aptitude
by running the following command:
sudo aptitude -y install tryton-modules-account-payment-braintree
How To Uninstall tryton-modules-account-payment-braintree on Debian 12
To uninstall only the tryton-modules-account-payment-braintree
package we can use the following command:
sudo apt-get remove tryton-modules-account-payment-braintree
Uninstall tryton-modules-account-payment-braintree And Its Dependencies
To uninstall tryton-modules-account-payment-braintree
and its dependencies that are no longer needed by Debian 12, we can use the command below:
sudo apt-get -y autoremove tryton-modules-account-payment-braintree
Remove tryton-modules-account-payment-braintree Configurations and Data
To remove tryton-modules-account-payment-braintree
configuration and data from Debian 12 we can use the following command:
sudo apt-get -y purge tryton-modules-account-payment-braintree
Remove tryton-modules-account-payment-braintree configuration, data, and all of its dependencies
We can use the following command to remove tryton-modules-account-payment-braintree
configurations, data and all of its dependencies, we can use the following command:
sudo apt-get -y autoremove --purge tryton-modules-account-payment-braintree
Dependencies
tryton-modules-account-payment-braintree have the following dependencies:
- python3-braintree
- python3-pkg-resources
- python3-werkzeug
- tryton-modules-account
- tryton-modules-account-payment
- tryton-modules-party
- tryton-server
- tryton-server-api-6.0
- python3
References
- tryton-modules-account-payment-braintree website
- tryton-modules-account-payment-braintree on packages.debian.org
Summary
In this tutorial we learn how to install tryton-modules-account-payment-braintree
package on Debian 12 using different package management tools: apt
, apt-get
and aptitude
.