Commits

Tay Ray Chuan committed 5567314

paypal.views: strip trailing whitespace

Comments (0)

Files changed (1)

satchmo/apps/payment/modules/paypal/views.py

 from django.utils.http import urlencode
 from django.utils.translation import ugettext as _
 from django.views.decorators.cache import never_cache
-from livesettings import config_get_group, config_value 
+from livesettings import config_get_group, config_value
 from payment.config import gateway_live
 from payment.utils import get_processor_by_key
 from payment.views import payship
             payment_module.RETURN_ADDRESS.value, include_server=True)
     except urlresolvers.NoReverseMatch:
         address = payment_module.RETURN_ADDRESS.value
-    
+
     processor_module = payment_module.MODULE.load_module('processor')
     processor = processor_module.PaymentProcessor(payment_module)
     processor.create_pending_payment(order=order)
-    default_view_tax = config_value('TAX', 'DEFAULT_VIEW_TAX') 
-  
+    default_view_tax = config_value('TAX', 'DEFAULT_VIEW_TAX')
+
     recurring = None
     order_items = order.orderitem_set.all()
     for item in order_items:
                     recurring['trial2']['expire_length'] = trial1.expire_length
                     recurring['trial2']['expire_unit'] = trial1.expire_unit[0]
                     recurring['trial2']['price'] = trial1.price
- 
+
     ctx = RequestContext(request, {'order': order,
      'post_url': url,
-     'default_view_tax': default_view_tax, 
+     'default_view_tax': default_view_tax,
      'business': account,
      'currency_code': payment_module.CURRENCY_CODE.value,
      'return_address': address,
         if not OrderPayment.objects.filter(transaction_id=txn_id).count():
             # If the payment hasn't already been processed:
             order = Order.objects.get(pk=invoice)
-            
+
             order.add_status(status='New', notes=_("Paid through PayPal."))
             processor = get_processor_by_key('PAYMENT_PAYPAL')
             payment = processor.record_payment(order=order, amount=gross, transaction_id=txn_id)
-            
+
             if 'memo' in data:
                 if order.notes:
                     notes = order.notes + "\n"
                 else:
                     notes = ""
-                
+
                 order.notes = notes + _('---Comment via Paypal IPN---') + u'\n' + data['memo']
                 order.save()
                 log.debug("Saved order notes from Paypal")
-            
+
             for item in order.orderitem_set.filter(product__subscriptionproduct__recurring=True, completed=False):
                 item.completed = True
                 item.save()
             for cart in Cart.objects.filter(customer=order.contact):
                 cart.empty()
-                
+
     except:
         log.exception(''.join(format_exception(*exc_info())))