Satchmo expects Payment subsystem

Issue #157 invalid
Anonymous created an issue

I wanted to tag this, the maintainers may not feel this is a bug. Satchmo relies on the payment subsystem. When I opted to remove it (no loading of satchmo.payment in settings), I still faced other issues:

1) shop/urls.py is loaded; which loads payment/urls.py; which loads PaymentSettings

2) PaymentSettings expects for PAYMENT_MODULES to be defined, otherwise it throws exception: raise NameError("No PAYMENT_MODULES found in settings")

3) Including PAYMENT_MODULES, but not leaving even a default payment module enabled throws a list error, produced by payment/common/forms.py:class PaymentContactInfoForm(ContactInfoForm): _choices = PaymentSettings().as_selectpairs() if len(_choices) > 1: _paymentwidget = forms.RadioSelect else: _paymentwidget = forms.HiddenInput(attrs={'value' : _choices[0][0]}) ...essentially _choices is an empty list, and thus throws a index error (list index out of range).

To resolve this temp. on my end, I have commented out the loading of payment.urls from within shop.urls. This will ensure PaymentSettings is therefore not loaded, causing the exception.

I do not know where the maintainers wish to divide the line with regards to a modular framework, etc. Perhaps my situation is too rare?

Contact me if you wish for any further details.

Reported by markph

Comments (3)

  1. Log in to comment