class AddonInvoiceProcessor(object):
+ can_refund=False
# Process invoices for additional options added to an existing
# registration.
#
# here.
order.delete()
- def process_invoice_refund(self, invoice):
- raise Exception("Don't know how to process refunds for this!")
-
# Return the user to their dashboard
def get_return_url(self, invoice):
try:
msgtxt,
sendername=sponsor.conference.conferencename)
+
# Return the user to the sponsor page if they have paid.
def get_return_url(self, invoice):
try:
# If this invoice has a processor, we need to start by calling it
processor = self.get_invoice_processor(invoice)
- if processor:
+ if processor and getattr(processor, 'can_refund', True):
try:
- processor.process_invoice_refund(invoice)
+ r = processor.process_invoice_refund(invoice)
except Exception, ex:
raise Exception("Failed to run invoice processor '%s': %s" % (invoice.processor, ex))
from datetime import datetime, timedelta, date
class InvoiceProcessor(object):
+ can_refund=False
# Process invoices once they're getting paid
#
# In the case of membership, that simply means extending the
member.activeinvoice = None
member.save()
- # We don't implement this yet
- def process_invoice_refund(self, invoice):
- raise Exception("Unable to refund membership invoices at this time")
-
# Return the user to a page showing what happened as a result
# of their payment. In our case, we just return the user directly
# to the membership page.