Closed madisvain closed 1 year ago
Hi @madisvain, would adding something like is_enabled(self, request)
method on PaymentMethod
class solve your case? That way you could disable payments for a specific request.
This requires adding an optional request
param to the pool methods such as get_choices
and get_payments
and the drawback would be that all URL's for payments are still included (even though they are disabled).
Are there any other advantages to making PaymentMethodPool
overridable instead?
@dinoperovic I think is_enabled is actually a much better idea and would solve all our questions much easier.
@madisvain I will try to implement this soon then.
@madisvain added in v1.1.6
We are implementing a multi site Wagtail based store. The store should have the payment methods limited based on the site.
For example for country Germany you should have Stripe but for US we should only allow the PayPal payment method. Currently the payment_methods_pool does not have a setting to override or modify the Pool in any way.
We'd be happy to help build such a feature if an agreement on how this should be done could be described and agreed upon.