Commits

Ian George committed c095315

Added more logging and whatnot to the payment_made stuff

Comments (0)

Files changed (1)

quiet/shop/models/order.py

     debug("payment", "Order %s complete" % oid)
 
 def payment_made(**kwargs):
-    debug("payment", "Signal entry")
+    debug("payment", "Payment made: %s" % kwargs)
     ordr = None
     try:
         ordr = Order.objects.get(pk=int(kwargs['order_id']))
         status.save()
 
     for payment in ordr.payments.all():
-        ordr.balance -= payment.amount
+        if payment.amount:
+            ordr.balance -= payment.amount
     ordr.complete = True
     ordr.save()