awesto / django-shop

A Django based shop system
http://www.django-shop.org
BSD 3-Clause "New" or "Revised" License
3.2k stars 1.04k forks source link

Fixes/778 two payment modifiers same processor #782

Closed moellering closed 4 years ago

moellering commented 4 years ago
  1. I added another payment modifier which uses the same payment provider as the PayInAdvanceModifier to the testshop.
  2. I included the new ComplexPayInAdvanceModifier in the settings.py of the testshop.
  3. I provided a new Test that check the is_active function of all payment_modifiers
  4. I wrote a fix for the PaymentModifier base implementation of is_active

Main change: PaymentModifier:is_active method now uses its identifier property instead of the namespace of its payment_provider. Since the default implementation of the identifierproperty returns the namespace of the payment_provider, in default cases this should not change a thing. If, however, identity is set to a specific value, (e.g. to be able to distinguish between pretty similar PaymentModifier objects) this identity is used.

should fix #778