Commits

Josh VanderLinden  committed ffabb7b

Fixing some problems with the moneybookers view code

  • Participants
  • Parent commits e9dbf6e

Comments (0)

Files changed (1)

File moneybookers

 # HG changeset patch
-# Parent aa603f2dfa2af608c9a58bd94f369dadf71c9610
+# Parent 1e83a95621e8555b28366dddb31b96756cc00c80
 
 diff --git a/satchmo/apps/payment/modules/genericemail/urls.py b/satchmo/apps/payment/modules/genericemail/urls.py
 --- a/satchmo/apps/payment/modules/genericemail/urls.py
 new file mode 100644
 --- /dev/null
 +++ b/satchmo/apps/payment/modules/moneybookers/views.py
-@@ -0,0 +1,141 @@
+@@ -0,0 +1,143 @@
 +import logging
 +import traceback
 +
 +from django.conf import settings
 +from django.core.mail import mail_admins
 +from django.http import HttpResponseRedirect, HttpResponse
++from django.shortcuts import render_to_response
++from django.template import RequestContext
 +from django.utils.translation import ugettext as _
 +from django.views.decorators.cache import never_cache
 +from django.views.decorators.csrf import csrf_exempt
 +from payment.modules.genericemail import views
 +from payment.utils import get_processor_by_key
 +from satchmo_store.shop.models import Cart, Order, OrderPayment
-+from satchmo_utils.dynamic import lookup_url
++from satchmo_utils.dynamic import lookup_url, lookup_template
 +
 +log = logging.getLogger()
 +
 +
 +    tempCart = Cart.objects.from_request(request)
 +    if tempCart.numItems == 0 and not order.is_partially_paid:
-+        template = lookup_template(payment_module, 'shop/checkout/empty_cart.html')
++        template = lookup_template(config, 'shop/checkout/empty_cart.html')
 +        return render_to_response(template, context_instance=RequestContext(request))
 +
 +    try:
 +        order.order_success()
 +
 +    return response
-\ No newline at end of file
 diff --git a/satchmo/apps/payment/templates/shop/checkout/moneybookers/confirm.html b/satchmo/apps/payment/templates/shop/checkout/moneybookers/confirm.html
 new file mode 100644
 --- /dev/null
 +++ b/satchmo/apps/payment/templates/shop/checkout/moneybookers/confirm.html
-@@ -0,0 +1,72 @@
+@@ -0,0 +1,76 @@
 +{% extends "shop/checkout/base_confirm.html" %}
 +{% load dv_tags dv_gifts %}
 +{% load satchmo_util %}
 +    <input type="hidden" name="transaction_id" value="{{ order.id }}" />
 +    <input type="hidden" name="return_url" value="{{ shop.base_url_secure }}{% url MONEYBOOKERS_satchmo_checkout-success %}" />
 +    <input type="hidden" name="status_url" value="{{ shop.base_url }}{% url MONEYBOOKERS_satchmo_checkout-status %}" />
++    {% comment %}
++    <input type="hidden" name="return_url" value="http://localhost:8000{% url MONEYBOOKERS_satchmo_checkout-success %}" />
++    <input type="hidden" name="status_url" value="{{ shop.base_url }}{% url MONEYBOOKERS_satchmo_checkout-status %}" />
++    {% endcomment %}
 +    <input type="hidden" name="language" value="EN" />
 +    {# <input type="hidden" name="logo_url" value="" /> #}
 +