Exemple #1
0
    url(r'^profiles/$',
        paypal.PaypalProfileAdminView.as_view(),
        name='profiles'),
]

SDN_URLS = [
    url(r'^failure/$', SDNFailure.as_view(), name='failure'),
]

STRIPE_URLS = [
    url(r'^submit/$', stripe.StripeSubmitView.as_view(), name='submit'),
]

urlpatterns = [
    url(r'^cybersource/', include(CYBERSOURCE_URLS, namespace='cybersource')),
    url(r'^error/$', PaymentFailedView.as_view(), name='payment_error'),
    url(r'^paypal/', include(PAYPAL_URLS, namespace='paypal')),
    url(r'^sdn/', include(SDN_URLS, namespace='sdn')),
    url(r'^stripe/', include(STRIPE_URLS, namespace='stripe')),
]

if settings.ENABLE_ALIPAY_WECHATPAY:
    from ecommerce.extensions.payment.views import alipay, wechatpay
    ALIPAY_URLS = [
        url(r'^execute/$',
            alipay.AlipayPaymentExecutionView.as_view(),
            name='execute'),
        url(r'^result/$',
            alipay.AlipayPaymentResultView.as_view(),
            name='result'),
    ]
Exemple #2
0
""" Payment-related URLs """
from django.conf.urls import url

from ecommerce.extensions.payment.views import cybersource, PaymentFailedView, SDNFailure
from ecommerce.extensions.payment.views.paypal import PaypalPaymentExecutionView, PaypalProfileAdminView

urlpatterns = [
    url(r'^cybersource/notify/$', cybersource.CybersourceNotifyView.as_view(), name='cybersource_notify'),
    url(r'^cybersource/redirect/$', cybersource.CybersourceInterstitialView.as_view(), name='cybersource_redirect'),
    url(r'^cybersource/submit/$', cybersource.CybersourceSubmitView.as_view(), name='cybersource_submit'),
    url(r'^error/$', PaymentFailedView.as_view(), name='payment_error'),
    url(r'^sdn/failure/$', SDNFailure.as_view(), name='sdn_failure'),
    url(r'^paypal/execute/$', PaypalPaymentExecutionView.as_view(), name='paypal_execute'),
    url(r'^paypal/profiles/$', PaypalProfileAdminView.as_view(), name='paypal_profiles'),
]