API for marking orders as paid

This commit is contained in:
Raphael Michel
2015-03-15 17:30:05 +01:00
parent 5ea81b33f8
commit d397c03fde

View File

@@ -1345,6 +1345,14 @@ class Order(Versionable):
return True
return False # nothing there to modify
def mark_paid(self, provider, info, date=None):
order = self.clone()
order.payment_provider = provider
order.payment_info = info
order.payment_date = date or now()
order.status = Order.STATUS_PAID
order.save()
class QuestionAnswer(Versionable):
"""