Пример #1
0
from lib.buyers.views import check_pin
from lib.paypal.urls import paypal
from lib.sellers.resources import (SellerResource, SellerBlueviaResource,
                                   SellerPaypalResource, SellerProductResource)
from lib.services.resources import (ErrorResource, SettingsResource,
                                    StatusResource)
from lib.transactions.resources import TransactionResource

# Generic APIs
api = Api(api_name='generic')
api.register(BuyerResource())
api.register(SellerResource())
api.register(SellerProductResource())

# PayPal specific APIs
paypal.register(BuyerPaypalResource())
paypal.register(SellerPaypalResource())
paypal.register(TransactionResource())

# BlueVia specific APIs
bluevia.register(SellerBlueviaResource())

# Service APIs
service = Api(api_name='services')
service.register(ErrorResource())
if settings.CLEANSED_SETTINGS_ACCESS:
    service.register(SettingsResource())
service.register(StatusResource())

urlpatterns = patterns('',
    url(r'^proxy/paypal/', include('lib.proxy.urls')),
Пример #2
0
from lib.sellers.resources import (SellerPaypalResource, SellerProductResource,
                                   SellerResource)
from lib.transactions.resources import TransactionResource

# Generic APIs
api = Api(api_name='generic')
api.register(BuyerResource())
api.register(BuyerConfirmPinResource())
api.register(BuyerVerifyPinResource())
api.register(BuyerResetPinResource())
api.register(SellerResource())
api.register(SellerProductResource())
api.register(TransactionResource())

# PayPal specific APIs
paypal.register(BuyerPaypalResource())
paypal.register(SellerPaypalResource())

# URLs to query delayed jobs.
delayable = Api(api_name='delay')
delayable.register(DelayableResource())
delayable.register(ReplayResource())

services_patterns = patterns('lib.services.resources',
    url(r'^settings/$', 'settings_list', name='services.settings'),
    url(r'^settings/(?P<setting>[^/<>]+)/$', 'settings_view',
        name='services.setting'),
    url(r'^error/', 'error', name='services.error'),
    url(r'^logs/', 'logs', name='services.log'),
    url(r'^status/', 'status', name='services.status'),
    url(r'^request/', 'request_resource', name='services.request'),
Пример #3
0
from lib.sellers.resources import (SellerPaypalResource, SellerProductResource,
                                   SellerResource)
from lib.transactions.resources import TransactionResource

# Generic APIs
api = Api(api_name='generic')
api.register(BuyerResource())
api.register(BuyerConfirmPinResource())
api.register(BuyerVerifyPinResource())
api.register(BuyerResetPinResource())
api.register(SellerResource())
api.register(SellerProductResource())
api.register(TransactionResource())

# PayPal specific APIs
paypal.register(BuyerPaypalResource())
paypal.register(SellerPaypalResource())

services_patterns = patterns(
    'lib.services.resources',
    url(r'^settings/$', 'settings_list', name='services.settings'),
    url(r'^settings/(?P<setting>[^/<>]+)/$',
        'settings_view',
        name='services.setting'),
    url(r'^error/', 'error', name='services.error'),
    url(r'^logs/', 'logs', name='services.log'),
    url(r'^status/', 'status', name='services.status'),
    url(r'^request/', 'request_resource', name='services.request'),
    url(r'^failures/transactions/',
        'transactions_failures',
        name='services.failures.transactions'),