2018-06-21 18:03:46 +00:00
|
|
|
from django.conf.urls import include, url
|
2018-07-02 19:13:13 +00:00
|
|
|
from django.utils.translation import ugettext_lazy as _l
|
2018-06-21 18:03:46 +00:00
|
|
|
|
|
|
|
from . import comnpay, cheque
|
|
|
|
|
|
|
|
|
|
|
|
urlpatterns = [
|
|
|
|
url(r'^comnpay/', include(comnpay.urls, namespace='comnpay')),
|
|
|
|
url(r'^cheque/', include(cheque.urls, namespace='cheque')),
|
|
|
|
]
|
2018-07-02 19:13:13 +00:00
|
|
|
|
|
|
|
PAYMENT_METHODS = [
|
|
|
|
comnpay,
|
|
|
|
cheque,
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
def find_payment_method(payment):
|
|
|
|
for method in PAYMENT_METHODS:
|
|
|
|
try:
|
|
|
|
o = method.PaymentMethod.objects.get(payment=payment)
|
|
|
|
return o
|
|
|
|
except method.PaymentMethod.DoesNotExist:
|
|
|
|
pass
|
|
|
|
return None
|