diff --git a/docs/checkout_and_payment.rst b/docs/checkout_and_payment.rst index 30dcd44..c574729 100644 --- a/docs/checkout_and_payment.rst +++ b/docs/checkout_and_payment.rst @@ -13,7 +13,15 @@ which accepts a list of dotted paths to :class:`salesman.checkout.payment.Paymen .. raw:: html -

1. Create payment method

+

1. Create swappable order model

+ +It is recommended to configure and setup all Salesman models as swappable even if it's not necessary at the beginning. This will future-proof your application in case you wish to add it later. This has to be done before the initial migrations are created. See :ref:`swappable_models`. + +.. literalinclude:: /../example/shop/models/order.py + +.. raw:: html + +

2. Create payment method

First create your custom payment method. Payment methods are required to specify a ``label`` and a unique ``identifier`` property on class. To enable payment for the basket you should also @@ -23,7 +31,7 @@ override the :meth:`salesman.checkout.payment.PaymentMethod.basket_payment` meth .. raw:: html -

2. Register payment method

+

3. Register payment method

Then register your payment method in ``settings.py``: