Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Add missing gateway configuration guide

NyanKiyoshi726979f2c8e0
diff --git a/docs/deployment/heroku.rst b/docs/deployment/heroku.rst
index a376520147..f501a4f55c 100644
--- a/docs/deployment/heroku.rst
+++ b/docs/deployment/heroku.rst
@@ -51,9 +51,9 @@ This needs to be run periodically. The best way to achieve this is using Heroku'
Then log into your Heroku account, find the Heroku Scheduler addon in the active addon list, and have it run the following command on a daily basis:
-.. code-block::
+.. code-block:: console
- python manage.py update_exchange_rates --all
+ $ python manage.py update_exchange_rates --all
Enabling Elasticsearch
diff --git a/docs/gettingstarted/configuration.rst b/docs/gettingstarted/configuration.rst
index 0ebdda662b..9ece5fec28 100644
--- a/docs/gettingstarted/configuration.rst
+++ b/docs/gettingstarted/configuration.rst
@@ -6,9 +6,35 @@ Configuration
We are fans of the `12factor <https://12factor.net/>`_ approach and portable code so you can configure most of Saleor using just environment variables.
+.. _payment_gateways_configuration:
+
Payments Gateways
-----------------
-For the configuration of the payment gateways, see :ref:`payment-gateways`.
+
+``CHECKOUT_PAYMENT_GATEWAYS``
+ This contains the list of enabled payment gateways, with the payment friendly name
+ to show to the user on the payment selection form.
+
+ For example, to add braintree to the enabled gateways,
+ you can do the following:
+
+ .. code-block:: python
+
+ CHECKOUT_PAYMENT_GATEWAYS = {
+ DUMMY: pgettext_lazy('Payment method name', 'Dummy gateway'),
+ BRAINTREE: pgettext_lazy('Payment method name', 'Brain tree')
+ }
+
+ The supported payment providers are:
+
+ - ``DUMMY`` (for tests purposes only!);
+ - ``BRAINTREE``;
+ - ``RAZORPAY``.
+
+
+``PAYMENT_GATEWAYS``
+ For information on how to configure payment gateways (API keys, miscellaneous information),
+ see :ref:`the list of supported payment gateway and their associated environment variables <payment-gateways>`.
Environment variables
diff --git a/docs/payment-gateways.rst b/docs/payment-gateways.rst
index b9cf599726..230eceb7a5 100644
--- a/docs/payment-gateways.rst
+++ b/docs/payment-gateways.rst
@@ -3,7 +3,7 @@
Supported Payment Gateways
==========================
-Here is our list of supported payment gateways:
+Here is our list of supported payment gateways, and their configuration:
.. toctree::
:maxdepth: 1
@@ -11,7 +11,8 @@ Here is our list of supported payment gateways:
payment-gateways/braintree.rst
payment-gateways/razorpay.rst
-The default configuration uses the `dummy` backend.
+The default configuration only uses the `dummy` backend
+(see :ref:`how to enable/disable payment gateways <payment_gateways_configuration>`).
It's meant to allow developers to easily simulate different payment results.
For an how-to guide on adding new payments into your Saleor project
@@ -21,4 +22,3 @@ please check :ref:`adding-payments`.
All payment backends default to using sandbox mode.
This is very useful for development but make sure you use production mode when deploying to a production server.
-
diff --git a/docs/payment-gateways/braintree.rst b/docs/payment-gateways/braintree.rst
index ac8c5b7e04..50db956477 100644
--- a/docs/payment-gateways/braintree.rst
+++ b/docs/payment-gateways/braintree.rst
@@ -16,8 +16,7 @@ This gateway implements payments using `Braintree <https://www.braintreepayments
.. note::
-
- This backend does not support fraud detection.
+ This backend does not support fraud detection.
- .. warning::
- Make sure that Braintree's currency is the same as your shop's, otherwise, customers will be charged the wrong amount.
+.. warning::
+ Make sure that Braintree's currency is the same as your shop's, otherwise, customers will be charged the wrong amount.