diff options
author | Marcin Gębala <maarcin.gebala@gmail.com> | 2014-09-09 16:38:21 +0200 |
---|---|---|
committer | Marcin Gębala <maarcin.gebala@gmail.com> | 2014-09-09 16:38:21 +0200 |
commit | dd8804409410fb89d239699c46f8b3ff16048e2e (patch) | |
tree | 03390fdd89a6e49df5e08530f6c5f7a14f8bc377 /doc | |
parent | 9c96c80c931a529f33bbef0428b6db38758df447 (diff) | |
download | django-payments-taler-dd8804409410fb89d239699c46f8b3ff16048e2e.tar.gz django-payments-taler-dd8804409410fb89d239699c46f8b3ff16048e2e.tar.bz2 django-payments-taler-dd8804409410fb89d239699c46f8b3ff16048e2e.zip |
Fix indentation
Diffstat (limited to 'doc')
-rw-r--r-- | doc/preauth.rst | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/doc/preauth.rst b/doc/preauth.rst index 01f57bf..f5189df 100644 --- a/doc/preauth.rst +++ b/doc/preauth.rst @@ -5,25 +5,24 @@ Authorization and capture Some gateways offer a two-step payment method known as Authorization & Capture, which allows you to collect the payment manually after the buyer has authorized it. To enable this payment type, you have to set the ``capture`` parameter to ``False`` in the configuration of payment backend:: - # settings.py - PAYMENT_VARIANTS = { - 'default': ('payments.dummy.DummyProvider', { - 'capture': False})} + # settings.py + PAYMENT_VARIANTS = { + 'default': ('payments.dummy.DummyProvider', {'capture': False})} Capturing the payment --------------------- To capture the payment from the buyer, call the ``capture()`` method on the :class:`Payment` instance:: - >>> from payments import get_payment_model - >>> Payment = get_payment_model() - >>> payment = Payment.objects.get() - >>> payment.capture() + >>> from payments import get_payment_model + >>> Payment = get_payment_model() + >>> payment = Payment.objects.get() + >>> payment.capture() By default, the total amount will be captured. You can capture a lower amount, by providing the ``amount`` parameter:: - >>> from decimal import Decimal - >>> payment.capture(amount=Decimal(10.0)) + >>> from decimal import Decimal + >>> payment.capture(amount=Decimal(10.0)) .. note:: @@ -34,10 +33,10 @@ Releasing the payment --------------------- To release the payment to the buyer, call the ``release()`` method on your :class:`Payment` instance:: - >>> from payments import get_payment_model - >>> Payment = get_payment_model() - >>> payment = Payment.objects.get() - >>> payment.release() + >>> from payments import get_payment_model + >>> Payment = get_payment_model() + >>> payment = Payment.objects.get() + >>> payment.release() .. note:: |