To enable basket checkout you need to define a payment method in SALESMAN_PAYMENT_METHODS
setting which accepts a list of dotted paths to salesman.checkout.payment.PaymentMethod
classes.
Note
For this example, we assume your custom app is named shop
.
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 override the salesman.checkout.payment.PaymentMethod.basket_payment
method. Eg:
/../example/shop/payment.py
Then register your payment method in settings.py
:
SALESMAN_PAYMENT_METHODS = [
'shop.payment.PayInAdvance',
]
Now you can make a basket purchase through the :http:post:/checkout/ request with payment_method
set to pay-in-advance
.
For more information about payment methods see payment_methods
.