Changeset 2916 for WAeUP_SRP


Ignore:
Timestamp:
10 Dec 2007, 23:22:20 (17 years ago)
Author:
Henrik Bettermann
Message:

upgradePayments did not work

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Payment.py

    r2909 r2916  
    9393                    d['order_id'] = str(doc.order_id)
    9494                break
     95
     96            if self.order_id.startswith('p'):
     97                try:
     98                    self.payments_catalog.deleteRecord(self.order_id)
     99                except:
     100                    pass
     101                d['order_id'] = "%s%s" % (student_record.id[1:],self.aq_parent.getId()[1:])
     102
    95103            if doc.resp_code in ("00","IP","AP"):
    96104                p_type = "online"
     
    100108            p_status = "started"
    101109            # don't set order_id it is already correct
    102             if self.order_id.startswith('p'):
    103                 try:
    104                     self.payments_catalog.deleteRecord(self.order_id)
    105                 except:
    106                     pass
    107                 d['order_id'] = "%s%s" % (student_record.id[1:],self.aq_parent.getId()[1:])
     110
    108111            break
    109112        d['type'] = p_type  # scratch card
Note: See TracChangeset for help on using the changeset viewer.