Example #1
0
File: views.py Project: zaplon/shop
def processOrder(order, request):
    if order.paymentMethod.code == 'pp':
        pass
    else:
        pmf = PaymentMethodForm(currency='PLN', data={'order': order.id, 'backend': 'getpaid.backends.transferuj'})
        if pmf.is_valid():
            npv = NewPaymentView()
            npv.request = request
            return npv.form_valid(pmf)
Example #2
0
namespace = app_name

includes_list = []
for backend_name, urls in import_backend_modules('urls').items():
    backend_url_regex = r'^%s/' % backend_name
    backend_namespace = backend_name.split('.')[-1]
    backend_url = url(
        backend_url_regex,
        include(urls, app_name=app_name, namespace=backend_namespace)
    )
    includes_list.append(backend_url)


urlpatterns = [
    url(
        r'^new/payment/(?P<currency>[A-Z]{3})/$',
        NewPaymentView.as_view(),
        name='new_payment'
    ),
    url(
        r'^payment/success/(?P<pk>\d+)/$',
        FallbackView.as_view(success=True),
        name='success_fallback'
    ),
    url(
        r'^payment/failure/(?P<pk>\d+)$',
        FallbackView.as_view(success=False),
        name='failure_fallback'
    ),
] + includes_list
Example #3
0
from django.conf.urls import patterns, url, include
from getpaid.views import NewPaymentView, FallbackView
from getpaid.utils import import_backend_modules

includes_list = []
for backend_name, urls in import_backend_modules('urls').items():
    includes_list.append(url(r'^%s/' % backend_name, include(urls)))

urlpatterns = patterns(
    '',
    url(r'^new/payment/(?P<currency>[A-Z]{3})/$', NewPaymentView.as_view(), name='getpaid-new-payment'),
    url(r'^payment/success/(?P<pk>\d+)/$', FallbackView.as_view(success=True), name='getpaid-success-fallback'),
    url(r'^payment/failure/(?P<pk>\d+)$', FallbackView.as_view(success=False), name='getpaid-failure-fallback'),
    *includes_list
)
Example #4
0
namespace = app_name

includes_list = []
for backend_name, urls in import_backend_modules('urls').items():
    backend_url_regex = r'^%s/' % backend_name
    backend_namespace = backend_name.split('.')[-1]
    backend_url = url(
        backend_url_regex,
        include(urls, app_name=app_name, namespace=backend_namespace)
    )
    includes_list.append(backend_url)


urlpatterns = [
    url(
        r'^new/payment/(?P<currency>[A-Z]{3})/$',
        NewPaymentView.as_view(),
        name='new-payment'
    ),
    url(
        r'^payment/success/(?P<pk>\d+)/$',
        FallbackView.as_view(success=True),
        name='success-fallback'
    ),
    url(
        r'^payment/failure/(?P<pk>\d+)$',
        FallbackView.as_view(success=False),
        name='failure-fallback'
    ),
] + includes_list
Example #5
0
from django.conf.urls import patterns, url, include
from getpaid.views import SelectPaymentView, FallbackView, NewPaymentView
from getpaid.utils import import_backend_modules

includes_list = []
for backend_name, urls in import_backend_modules('urls').items():
    includes_list.append(url(r'^%s/' % backend_name, include(urls)))

urlpatterns = patterns('',
    url(r'^new/payment/$', SelectPaymentView.as_view(), name='getpaid-select-payment'),
    url(r'^new/fillform/$', NewPaymentView.as_view(), name='getpaid-new-payment'),
    url(r'^payment/success/(?P<pk>\d+)/$', FallbackView.as_view(success=True), name='getpaid-success-fallback'),
    url(r'^payment/failure/(?P<pk>\d+)$', FallbackView.as_view(success=False), name='getpaid-failure-fallback'),
    *includes_list

)