def testTemplateTagLoad(self): original_settings = settings.MERCHANT_SETTINGS settings.MERCHANT_SETTINGS = {"google_checkout": {"MERCHANT_ID": "", "MERCHANT_KEY": ""}} # Raises TemplateSyntaxError: Invalid Block Tag self.assertRaises( TemplateSyntaxError, lambda: Template("{% load render_integration from billing_tags %}{% stripe obj %}") ) tmpl = Template("{% load render_integration from billing_tags %}{% render_integration obj %}") gc = get_integration("google_checkout") fields = { "items": [ { "name": "name of the item", "description": "Item description", "amount": 1, "id": "999AXZ", "currency": "USD", "quantity": 1, } ], "return_url": "http://127.0.0.1:8000/offsite/google-checkout/", } gc.add_fields(fields) self.assertTrue(len(tmpl.render(Context({"obj": gc}))) > 0) settings.MERCHANT_SETTINGS = original_settings
def testTemplateTagLoad(self): original_settings = settings.MERCHANT_SETTINGS settings.MERCHANT_SETTINGS = { "google_checkout": { "MERCHANT_ID": '', "MERCHANT_KEY": '' } } # Raises TemplateSyntaxError: Invalid Block Tag self.assertRaises( TemplateSyntaxError, lambda: Template( "{% load render_integration from billing_tags %}{% stripe obj %}" )) tmpl = Template( "{% load render_integration from billing_tags %}{% render_integration obj %}" ) gc = get_integration("google_checkout") fields = { "items": [{ "name": "name of the item", "description": "Item description", "amount": 1, "id": "999AXZ", "currency": "USD", "quantity": 1, }], "return_url": "http://127.0.0.1:8000/offsite/google-checkout/", } gc.add_fields(fields) self.assertTrue(len(tmpl.render(Context({"obj": gc}))) > 0) settings.MERCHANT_SETTINGS = original_settings
def setUp(self): self.gc = get_integration("google_checkout") target_url_name = "example.com/offsite/my_content/" target_url = 'http://' + target_url_name fields = { "items": [ { "name": "name of the item", "description": "Item description", "amount": 0.00, "id": "999AXZ", "currency": "USD", "quantity": 1, "subscription": { "type": "merchant", # valid choices is ["merchant", "google"] "period": "YEARLY", # valid choices is ["DAILY", "WEEKLY", "SEMI_MONTHLY", "MONTHLY", "EVERY_TWO_MONTHS"," QUARTERLY", "YEARLY"] "payments": [ { "maximum-charge": 9.99, # Item amount must be "0.00" "currency": "USD" } ] }, "digital-content": { "display-disposition": "OPTIMISTIC", # valid choices is ['OPTIMISTIC', 'PESSIMISTIC'] "description": "Congratulations! Your subscription is being set up. Feel free to log onto <a href='%s'>%s</a> and try it out!" % (target_url, target_url_name) }, }, ], "return_url": "http://127.0.0.1:8000/offsite/google-checkout/", 'private_data': "*****@*****.**", } self.gc.add_fields(fields)
def setUp(self): self.wp = get_integration("world_pay") fields = { "cartId": "TEST123", "amount": 1, "currency": "USD", "testMode": 100, "futurePayType": "regular", "option": 0, "noOfPayments": 12, "intervalUnit": 3, "intervalMult": 1, "normalAmount": 1, "startDelayUnit": 3, "startDelayMult": 1, "instId": 12345, "signatureFields": "instId:amount:cartId", } self.wp.add_fields(fields) # Since the secret key cannot be distributed settings.WORLDPAY_MD5_SECRET_KEY = "test" signature = md5( "%s:%s:%s:%s" % ( settings.WORLDPAY_MD5_SECRET_KEY, self.wp.fields["instId"], self.wp.fields["amount"], self.wp.fields["cartId"], ) ).hexdigest() self.wp.add_field("signature", signature)
def testRaiseExceptionNotConfigured(self): original_settings = settings.MERCHANT_SETTINGS settings.MERCHANT_SETTINGS = {"google_checkout": {"MERCHANT_ID": "", "MERCHANT_KEY": ""}} # Test if we can import any other gateway or integration self.assertRaises(IntegrationNotConfigured, lambda: get_integration("stripe")) self.assertRaises(GatewayNotConfigured, lambda: get_gateway("authorize_net")) settings.MERCHANT_SETTINGS = original_settings
def testRaiseExceptionNotConfigured(self): with self.settings(MERCHANT_SETTINGS = { "pay_pal": { } }): # Test if we can import any other gateway or integration self.assertRaises(IntegrationNotConfigured, lambda: get_integration("stripe")) self.assertRaises(GatewayNotConfigured, lambda: get_gateway("authorize_net"))
def donation_orderpay(request, entry): # if not request.user.is_authenticated(): # return redirect('/donations/user/?next=%s' % request.path) donation_amount = request.POST['amount'] objective = request.POST.get('objective', None) # donation_amount = request.POST['donation_amount'] int_obj = get_integration("authorize_net_dpm") payment_method = request.POST.get('payment_method', 'Credit') if payment_method == 'ACH': setattr(int_obj, 'form_class', lambda: AuthorizeNetDPMFormCheck) fields = { 'x_amount': donation_amount, 'x_fp_sequence': datetime.datetime.now().strftime( '%Y%m%d%H%M%S'), # any identifier for the transaction 'x_fp_timestamp': str(int( time.time())), # the timestamp when x_fp_sequence was generated 'x_recurring_bill': 'F', 'x_relay_url': request.build_absolute_uri(reverse("authorize_net_notify_handler")), 'x_cust_id': request.user, 'x_extra_data': '{}', 'x_first_name': entry.first_name, 'x_last_name': entry.last_name, 'x_bank_acct_name': '%s %s' % (entry.first_name, entry.last_name), 'x_zip': entry.zip, 'x_address': entry.address, 'x_city': entry.city, 'x_country': entry.country, 'x_payment_method': payment_method, } if objective is not None: fields['x_extra_data'] = '{ "objective": %s }' % objective int_obj.add_fields(fields) logging.info("User '%s' is prepared to donate. Entering payment info..." % (request.user)) return render_to_response("donations/donations_orderpay.html", { "adp": int_obj, "amount": donation_amount, "objective": objective }, context_instance=RequestContext(request))
def offsite_eway(request): return_url = request.build_absolute_uri(reverse(offsite_eway_done)) eway_obj = get_integration("eway_au") customer = eway_obj.request_access_code(return_url=return_url, customer={}, payment={"total_amount": 100}) request.session["eway_access_code"] = eway_obj.access_code template_vars = {"title": "eWAY", "eway_obj": eway_obj} return render(request, "app/eway.html", template_vars)
def setUp(self): self.fps = get_integration("amazon_fps") self.fields = { "callerReference": "100", "paymentReason": "Digital Download", "pipelineName": "SingleUse", "transactionAmount": '30', "returnURL": "http://localhost/fps/fps-return-url/", } self.fps.add_fields(self.fields)
def offsite_world_pay(request): wp = get_integration("world_pay") fields = {"instId": settings.WORLDPAY_INSTALLATION_ID_TEST, "cartId": "TEST123", "currency": "USD", "amount": 1, "desc": "Test Item",} wp.add_fields(fields) template_vars = {'title': 'WorldPay', "wp_obj": wp} return render(request, 'app/world_pay.html', template_vars)
def setUp(self): self.fps = get_integration("amazon_fps") fields = { "callerReference": "100", "paymentReason": "Digital Download", "pipelineName": "SingleUse", "transactionAmount": 30, "returnURL": "http://localhost/fps/fps-return-url/", } self.fps.add_fields(fields)
def offsite_eway(request): return_url = request.build_absolute_uri(reverse(offsite_eway_done)) eway_obj = get_integration("eway_au") customer = eway_obj.request_access_code( return_url=return_url, customer={}, payment={"total_amount": 100}) request.session["eway_access_code"] = eway_obj.access_code template_vars = {"title": "eWAY", "eway_obj": eway_obj} return render(request, "app/eway.html", template_vars)
def testTemplateTagLoad(self): with self.settings(MERCHANT_SETTINGS = { "pay_pal": { } }): # Raises TemplateSyntaxError: Invalid Block Tag self.assertRaises(TemplateSyntaxError, lambda: Template("{% load render_integration from billing_tags %}{% stripe obj %}")) tmpl = Template("{% load render_integration from billing_tags %}{% render_integration obj %}") gc = get_integration("stripe") self.assertTrue(len(tmpl.render(Context({"obj": gc}))) > 0)
def offsite_world_pay(request): wp = get_integration("world_pay") fields = { "instId": settings.WORLDPAY_INSTALLATION_ID_TEST, "cartId": "TEST123", "currency": "USD", "amount": 1, "desc": "Test Item", } wp.add_fields(fields) template_vars = {'title': 'WorldPay', "wp_obj": wp} return render(request, 'app/world_pay.html', template_vars)
def setUp(self): self.today = datetime.datetime.today().strftime("%Y-%m-%d") self.pws = get_integration("pay_pal") self.pws.test_mode = True fields = {"cmd": "_xclick", 'notify_url': 'http://localhost/paypal-ipn-handler/', 'return_url': 'http://localhost/offsite/paypal/done/', 'cancel_return': 'http://localhost/offsite/paypal/', 'amount': 1, 'item_name': "Test Item", 'invoice': self.today,} self.pws.add_fields(fields)
def testRaiseExceptionNotConfigured(self): original_settings = settings.MERCHANT_SETTINGS settings.MERCHANT_SETTINGS = { "google_checkout": { "MERCHANT_ID": '', "MERCHANT_KEY": '' } } # Test if we can import any other gateway or integration self.assertRaises(IntegrationNotConfigured, lambda: get_integration("stripe")) self.assertRaises(GatewayNotConfigured, lambda: get_gateway("authorize_net")) settings.MERCHANT_SETTINGS = original_settings
def setUp(self): self.gc = get_integration("google_checkout") fields = {"items": [{ "name": "name of the item", "description": "Item description", "amount": 1, "id": "999AXZ", "currency": "USD", "quantity": 1, }], "return_url": "http://127.0.0.1:8000/offsite/google-checkout/", } self.gc.add_fields(fields)
def setUp(self): self.today = datetime.datetime.today().strftime("%Y-%m-%d") self.pws = get_integration("pay_pal") self.pws.test_mode = True fields = { "cmd": "_xclick", 'notify_url': 'http://localhost/paypal-ipn-handler/', 'return_url': 'http://localhost/offsite/paypal/done/', 'cancel_return': 'http://localhost/offsite/paypal/', 'amount': '1', 'item_name': "Test Item", 'invoice': self.today, } self.pws.add_fields(fields)
def setUp(self): self.today = datetime.datetime.today().strftime("%Y-%m-%d") self.pws = get_integration("pay_pal") self.pws.test_mode = True fields = { "cmd": "_xclick", "notify_url": "http://localhost/paypal-ipn-handler/", "return_url": "http://localhost/offsite/paypal/done/", "cancel_return": "http://localhost/offsite/paypal/", "amount": "1", "item_name": "Test Item", "invoice": self.today, } self.pws.add_fields(fields)
def setUp(self): self.bp = get_integration("braintree_payments") fields = { "transaction": { "type": "sale", "amount": "10.00", "order_id": 1, "customer": { "first_name": "John", "last_name": "Doe", "email": "*****@*****.**", }, } } self.bp.add_fields(fields)
def setUp(self): self.gc = get_integration("google_checkout") fields = { "items": [{ "name": "name of the item", "description": "Item description", "amount": 1, "id": "999AXZ", "currency": "USD", "quantity": 1, }], "return_url": "http://127.0.0.1:8000/offsite/google-checkout/", } self.gc.add_fields(fields)
def offsite_paypal(request): paypal_obj = get_integration("pay_pal") invoice_id = datetime.datetime.now().strftime('%Y%m%d%H%M%S') return_url = request.build_absolute_uri(reverse('app_offsite_paypal_done')) cancel_return = request.build_absolute_uri(request.META['PATH_INFO']) notify_url = request.build_absolute_uri(reverse('paypal-ipn')) paypal_params = {'amount': 1, 'item_name': "name of the item", 'invoice': invoice_id, 'notify_url': notify_url, 'return_url': return_url, 'cancel_return': cancel_return, } paypal_obj.add_fields(paypal_params) template_vars = {"obj": paypal_obj, 'title': 'PayPal Offsite'} return render(request, 'app/offsite_paypal.html', template_vars)
def offsite_paypal(request): paypal_obj = get_integration("pay_pal") invoice_id = datetime.datetime.now().strftime('%Y%m%d%H%M%S') return_url = request.build_absolute_uri(reverse('app_offsite_paypal_done')) cancel_return = request.build_absolute_uri(request.META['PATH_INFO']) notify_url = request.build_absolute_uri(reverse('paypal-ipn')) paypal_params = { 'amount': 1, 'item_name': "name of the item", 'invoice': invoice_id, 'notify_url': notify_url, 'return_url': return_url, 'cancel_return': cancel_return, } paypal_obj.add_fields(paypal_params) template_vars = {"obj": paypal_obj, 'title': 'PayPal Offsite'} return render(request, 'app/offsite_paypal.html', template_vars)
def setUp(self): self.wp = get_integration("world_pay") fields = { "cartId": "TEST123", "amount": "1", "currency": "USD", "testMode": "100", "futurePayType": "regular", "option": "0", "noOfPayments": "12", "intervalUnit": "3", "intervalMult": "1", "normalAmount": "1", "startDelayUnit": "3", "startDelayMult": "1", "instId": "12345", "signatureFields": "instId:amount:cartId", } self.wp.add_fields(fields)
def setUp(self): self.op = get_integration("ogone_payments") self.data = { 'orderID': 21, 'ownerstate': '', 'cn': 'Venkata Ramana', 'language': 'en_US', 'ownertown': 'Hyderabad', 'ownercty': 'IN', 'exceptionurl': 'http://127.0.0.1:8000/offsite/ogone/failure/', 'ownerzip': 'Postcode', 'catalogurl': 'http://127.0.0.1:8000/', 'currency': 'EUR', 'amount': '579', 'declineurl': 'http://127.0.0.1:8000/offsite/ogone/failure/', 'homeurl': 'http://127.0.0.1:8000/', 'cancelurl': 'http://127.0.0.1:8000/offsite/ogone/failure/', 'accepturl': 'http://127.0.0.1:8000/offsite/ogone/success/', 'owneraddress': 'Near Madapur PS', 'com': 'Order #21: Venkata Ramana', 'email': '*****@*****.**' } self.op.add_fields(self.data)
def setUp(self): self.op = get_integration("ogone_payments") self.data = { 'orderID': 21, 'ownerstate': u'', 'cn': u'Venkata Ramana', 'language': 'en_US', 'ownertown': u'Hyderabad', 'ownercty': u'IN', 'exceptionurl': u'http://127.0.0.1:8000/offsite/ogone/failure/', 'ownerzip': u'Postcode', 'catalogurl': u'http://127.0.0.1:8000/', 'currency': u'EUR', 'amount': u'579', 'declineurl': u'http://127.0.0.1:8000/offsite/ogone/failure/', 'homeurl': u'http://127.0.0.1:8000/', 'cancelurl': u'http://127.0.0.1:8000/offsite/ogone/failure/', 'accepturl': u'http://127.0.0.1:8000/offsite/ogone/success/', 'owneraddress': u'Near Madapur PS', 'com': u'Order #21: Venkata Ramana', 'email': u'*****@*****.**' } self.op.add_fields(self.data)
def offsite_eway_done(request): access_code = request.session["eway_access_code"] eway_obj = get_integration("eway_au", access_code=access_code) result = eway_obj.check_transaction() return render(request, "app/eway_done.html", {"result": result})
from django.conf.urls import patterns, include, url from django.core.urlresolvers import reverse from django.views.generic import RedirectView from billing import get_integration pay_pal = get_integration('pay_pal') from django.views.decorators.csrf import csrf_exempt from paypal.standard.ipn.views import ipn # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() from money.models import * urlpatterns = patterns('', # Examples: # url(r'^$', 'auth.views.home', name='home'), url(r'^$', RedirectView.as_view(permanent=False, url='/zoho/member_list')), url(r'^accounts/', include('accounts.urls')), url(r'^zoho/', include('zoho_integration.urls')), url( r'^paypal-ipn-handler/', include(pay_pal.urls)), url(r'^admin/', include(admin.site.urls)), # Uncomment the admin/doc line below to enable admin documentation: # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), # Uncomment the next line to enable the admin: )
from django.conf.urls import * from billing import get_integration pay_pal = get_integration("pay_pal") fps = get_integration("amazon_fps") braintree = get_integration("braintree_payments") urlpatterns = patterns('', ('^paypal-ipn-url/', include(pay_pal.urls)), ('^fps/', include(fps.urls)), ('^braintree/', include(braintree.urls)), )
from django.conf.urls.defaults import * from billing import get_integration pay_pal = get_integration("pay_pal") fps = get_integration("amazon_fps") braintree = get_integration("braintree_payments") urlpatterns = patterns('', ('^paypal-ipn-url/', include(pay_pal.urls)), ('^fps/', include(fps.urls)), ('^braintree/', include(braintree.urls)), )
def setUp(self): self.gc = get_integration("google_checkout") self.maxDiff = None
from django.conf.urls.defaults import * from billing import get_integration google_checkout_obj = get_integration("google_checkout") authorize_net_obj = get_integration("authorize_net_dpm") pay_pal_obj = get_integration("pay_pal") amazon_fps_obj = get_integration("fps") fps_recur_obj = get_integration("fps") world_pay_obj = get_integration("world_pay") braintree_obj = get_integration("braintree_payments") stripe_obj = get_integration("stripe_example") samurai_obj = get_integration("samurai_example") urlpatterns = patterns('app.views', url(r'^$', 'index', name='app_index'), url(r'^authorize/$', 'authorize', name='app_authorize'), url(r'^paypal/$', 'paypal', name='app_paypal'), url(r'^eway/$', 'eway', name='app_eway'), url(r'^braintree/$', 'braintree', name='app_braintree'), url(r'^stripe/$', 'stripe', name='app_stripe'), url(r'^samurai/$', 'samurai', name='app_samurai'), url(r'^paylane/$', 'paylane', name='app_paylane'), ) # offsite payments urlpatterns += patterns('app.views', url(r'offsite/authorize_net/$', 'offsite_authorize_net', name='app_offsite_authorize_net'), url(r'offsite/paypal/$', 'offsite_paypal', name='app_offsite_paypal'), url(r'offsite/google-checkout/$', 'offsite_google_checkout', name='app_offsite_google_checkout'), url(r'offsite/world_pay/$', 'offsite_world_pay', name='app_offsite_world_pay'),
from django.conf.urls.defaults import * from billing import get_integration pay_pal = get_integration("pay_pal") fps = get_integration("amazon_fps") urlpatterns = patterns('', ('^paypal-ipn-url/', include(pay_pal.urls)), ('^fps/', include(fps.urls)), )
def get_context_data(self, **kwargs): context = super(IndexView, self).get_context_data(**kwargs) context['stripe_obj'] = billing.get_integration('stripe') return context
from django.conf.urls.defaults import * from billing import get_integration google_checkout_obj = get_integration("google_checkout") pay_pal_obj = get_integration("pay_pal") amazon_fps_obj = get_integration("fps") fps_recur_obj = get_integration("fps") world_pay_obj = get_integration("world_pay") braintree_obj = get_integration("braintree_payments") stripe_obj = get_integration("stripe_example") samurai_obj = get_integration("samurai_example") urlpatterns = patterns( 'app.views', url(r'^$', 'index', name='app_index'), url(r'^authorize/$', 'authorize', name='app_authorize'), url(r'^paypal/$', 'paypal', name='app_paypal'), url(r'^eway/$', 'eway', name='app_eway'), url(r'^braintree/$', 'braintree', name='app_braintree'), url(r'^stripe/$', 'stripe', name='app_stripe'), url(r'^samurai/$', 'samurai', name='app_samurai'), ) # offsite payments urlpatterns += patterns( 'app.views', url(r'offsite/paypal/$', 'offsite_paypal', name='app_offsite_paypal'), url(r'offsite/google-checkout/$', 'offsite_google_checkout', name='app_offsite_google_checkout'), url(r'offsite/world_pay/$',
from django.core import urlresolvers # from django.views import generic from django.template.defaultfilters import linebreaks # noqa from django.template.defaultfilters import safe # noqa from django.utils.encoding import force_unicode from django.utils.translation import ugettext_lazy as _ from django.views.decorators.csrf import csrf_exempt # noqa from django.views.generic.edit import FormView # noqa #import hashlib #import hmac from horizon import exceptions from horizon import forms as horizon_forms from horizon import tables as horizon_tables # noqa stripe_obj = billing.get_integration("stripe") class MobileNumberTableEntry(object): def __init__(self, id, number): self.id = id self.number = number self.name = number class CardTableEntry(object): def __init__(self, id, name, default): self.id = id self.name = name
1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Add an import: from blog import urls as blog_urls 2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) """ from django.conf import settings from django.conf.urls import include, url, patterns from django.contrib import admin from django.conf.urls.static import static from billing import get_integration stripe_obj = get_integration("stripe",) braintree = get_integration("braintree_payments") urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^',include('apps.posts.urls')), url(r'^accounts/',include('apps.accounts.urls')), url(r'dashboard/',include('apps.dashboard.urls')), url(r'^paypal/', include('paypal.standard.ipn.urls')), url(r'^stripe/', include(stripe_obj.urls)), url(r'^braintree/', include(braintree.urls)), ] urlpatterns += patterns('', (r'^static/(.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT,'show_indexes': False}), )+ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django import template from django.core import urlresolvers # from django.views import generic from django.template.defaultfilters import linebreaks # noqa from django.template.defaultfilters import safe # noqa from django.utils.encoding import force_unicode from django.utils.translation import ugettext_lazy as _ from django.views.decorators.csrf import csrf_exempt # noqa from django.views.generic.edit import FormView # noqa #import hashlib #import hmac from horizon import exceptions from horizon import forms as horizon_forms from horizon import tables as horizon_tables # noqa stripe_obj = billing.get_integration("stripe") class MobileNumberTableEntry(object): def __init__(self, id, number): self.id = id self.number = number self.name = number class CardTableEntry(object): def __init__(self, id, name, default): self.id = id self.name = name self.default = default
from django.conf.urls import * from billing import get_integration from django.views.decorators.csrf import csrf_exempt from django.views.generic import TemplateView google_checkout_obj = get_integration("google_checkout") authorize_net_obj = get_integration("authorize_net_dpm") pay_pal_obj = get_integration("pay_pal") amazon_fps_obj = get_integration("fps") fps_recur_obj = get_integration("fps") world_pay_obj = get_integration("world_pay") braintree_obj = get_integration("braintree_payments") stripe_obj = get_integration("stripe_example") ogone_obj = get_integration("ogone_payments") urlpatterns = patterns( 'app.views', url(r'^$', 'index', name='app_index'), url(r'^authorize/$', 'authorize', name='app_authorize'), url(r'^paypal/$', 'paypal', name='app_paypal'), url(r'^eway/$', 'eway', name='app_eway'), url(r'^braintree/$', 'braintree', name='app_braintree'), url(r'^stripe/$', 'stripe', name='app_stripe'), url(r'^paylane/$', 'paylane', name='app_paylane'), url(r'^beanstream/$', 'beanstream', name='app_beanstream'), url(r'^chargebee/$', 'chargebee', name='app_chargebee'), url(r'^bitcoin/$', 'bitcoin', name='app_bitcoin'), url(r'^bitcoin/done/$', 'bitcoin_done', name='app_bitcoin_done'), ) # offsite payments
urlpatterns = patterns('app.views', url(r'^$', 'index', name='app_index'), url(r'^authorize/$', 'authorize', name='app_authorize'), url(r'^paypal/$', 'paypal', name='app_paypal'), url(r'^eway/$', 'eway', name='app_eway'), ) # offsite payments urlpatterns += patterns('app.views', url(r'offsite/paypal/$', 'offsite_paypal', name='app_offsite_paypal'), url(r'offsite/google-checkout/$', 'offsite_google_checkout', name='app_offsite_google_checkout'), url(r'offsite/rbs/$', 'offsite_rbs', name='app_offsite_rbs'), ) paypal = get_integration("pay_pal") # paypal payment notification handler urlpatterns += patterns('', (r'^paypal-ipn-handler/', include(paypal.urls)), ) urlpatterns += patterns('django.views.generic.simple', url(r'offsite/paypal/done/$', 'direct_to_template', {'template': 'app/payment_done.html'}, name='app_offsite_paypal_done'), url(r'offsite/google-checkout/done/$', 'direct_to_template', {'template': 'app/payment_done.html'}, name='app_offsite_google_checkout_done'), )
urlpatterns = patterns('app.views', url(r'^$', 'index', name='app_index'), url(r'^authorize/$', 'authorize', name='app_authorize'), url(r'^paypal/$', 'paypal', name='app_paypal'), url(r'^eway/$', 'eway', name='app_eway'), ) # offsite payments urlpatterns += patterns('app.views', url(r'offsite/paypal/$', 'offsite_paypal', name='app_offsite_paypal'), url(r'offsite/google-checkout/$', 'offsite_google_checkout', name='app_offsite_google_checkout'), url(r'offsite/world_pay/$', 'offsite_world_pay', name='app_offsite_world_pay'), ) paypal = get_integration("pay_pal") # paypal payment notification handler urlpatterns += patterns('', (r'^paypal-ipn-handler/', include(paypal.urls)), ) urlpatterns += patterns('django.views.generic.simple', url(r'offsite/paypal/done/$', 'direct_to_template', {'template': 'app/payment_done.html'}, name='app_offsite_paypal_done'), url(r'offsite/google-checkout/done/$', 'direct_to_template', {'template': 'app/payment_done.html'}, name='app_offsite_google_checkout_done'), )
from django.conf.urls.defaults import * from billing import get_integration google_checkout_obj = get_integration("google_checkout") pay_pal_obj = get_integration("pay_pal") amazon_fps_obj = get_integration("fps") fps_recur_obj = get_integration("fps") world_pay_obj = get_integration("world_pay") urlpatterns = patterns('app.views', url(r'^$', 'index', name='app_index'), url(r'^authorize/$', 'authorize', name='app_authorize'), url(r'^paypal/$', 'paypal', name='app_paypal'), url(r'^eway/$', 'eway', name='app_eway'), ) # offsite payments urlpatterns += patterns('app.views', url(r'offsite/paypal/$', 'offsite_paypal', name='app_offsite_paypal'), url(r'offsite/google-checkout/$', 'offsite_google_checkout', name='app_offsite_google_checkout'), url(r'offsite/world_pay/$', 'offsite_world_pay', name='app_offsite_world_pay'), url(r'offsite/amazon_fps/$', 'offsite_amazon_fps', name='app_offsite_amazon_fps'), ) # paypal payment notification handler urlpatterns += patterns('', (r'^paypal-ipn-handler/', include(pay_pal_obj.urls)), ) urlpatterns += patterns('', (r'^', include(google_checkout_obj.urls)),
from donations import views from billing import get_integration from donations.views import DonationBilling #from django.contrib import admin #admin.autodiscover() urlpatterns = patterns( "", # url(r"^donations/home$", "donations.views.donation_index", name="donations_home"), url(r"^home$", "donations.views.fundpage_index", name="fund_home"), url(r"^add$", "donations.views.donation_add", name="donations_add"), url(r"^billing$", DonationBilling.as_view(), name="donations_billing"), url(r"^confirmation$", "donations.views.donation_confirmation", name="donations_confirmation"), url(r"^order_pay$", "donations.views.donation_orderpay", name="donations_pay"), url(r"^user$", "donations.views.contribution_history", name="contribution_user"), ) int_obj = get_integration("authorize_net_dpm") urlpatterns += patterns( '', (r'^authorize_net/', include(int_obj.urls)), )
from django.conf.urls import * from billing import get_integration from django.views.decorators.csrf import csrf_exempt from django.views.generic import TemplateView authorize_net_obj = get_integration("authorize_net_dpm") pay_pal_obj = get_integration("pay_pal") amazon_fps_obj = get_integration("fps") fps_recur_obj = get_integration("fps") world_pay_obj = get_integration("world_pay") braintree_obj = get_integration("braintree_payments") stripe_obj = get_integration("stripe_example") ogone_obj = get_integration("ogone_payments") urlpatterns = patterns('app.views', url(r'^$', 'index', name='app_index'), url(r'^authorize/$', 'authorize', name='app_authorize'), url(r'^paypal/$', 'paypal', name='app_paypal'), url(r'^eway/$', 'eway', name='app_eway'), url(r'^braintree/$', 'braintree', name='app_braintree'), url(r'^stripe/$', 'stripe', name='app_stripe'), url(r'^paylane/$', 'paylane', name='app_paylane'), url(r'^beanstream/$', 'beanstream', name='app_beanstream'), url(r'^chargebee/$', 'chargebee', name='app_chargebee'), url(r'^bitcoin/$', 'bitcoin', name='app_bitcoin'), url(r'^bitcoin/done/$', 'bitcoin_done', name='app_bitcoin_done'), ) # offsite payments urlpatterns += patterns('app.views', url(r'offsite/authorize_net/$', 'offsite_authorize_net', name='app_offsite_authorize_net'),