Index: /WAeUP_SRP/base/skins/waeup_epayment/upgradePayments.py
===================================================================
--- /WAeUP_SRP/base/skins/waeup_epayment/upgradePayments.py	(revision 2885)
+++ /WAeUP_SRP/base/skins/waeup_epayment/upgradePayments.py	(revision 2886)
@@ -56,48 +56,50 @@
 
 set_trace()
-for payment in payments:
-    student_id = payment.getPath().split('/')[-3]
-    student_brain = context.students_catalog.getRecordByKey(student_id)
-    if student_brain is None:
-        logger.info("student %s not in students_catalog" % student_id)
-        continue
-    d = {}
-    doc = payment.getObject().getContent()
-    d['key'] = payment.getId
-    d['amount'] = doc.amount
-    d['description'] = d['type_description'] = doc.type_description
-    subject = ''
-    if doc.type_description.startswith('School'):
-        subject = 'schoolfee'
-    sp = doc.type_description.rfind('/')
-    d['session_id'] = doc.type_description[sp-2:sp]
-    d['subject'] = subject # zb. schoolfee
-    d['target'] = "%s" % (student_brain.course)  # faculty departmen course
-    while True:
-        if doc.resp_code == "SC":
-            p_type = "sc"
-            p_status = "paid"
-            break
-        if doc.resp_code == "00":
-            p_type = "onl"
-            p_status = "paid"
-            break
-        p_type = "ONL"
-        p_status = "open"
-        break
-    d['key'] = payment.getId
-    d['type'] = p_type  # scratch card
-    d['status'] = p_status
-    d['resp_approved_amount'] = getattr(doc,'resp_approved_amount',None)
-    d['resp_pay_reference'] = doc.resp_pay_reference
-    d['resp_desc'] = doc.resp_desc
-    d['order_id'] = doc.order_id
-    d['resp_code'] = doc.resp_code
-    d['resp_card_num'] = doc.resp_card_num
-    d['date'] = getattr(doc,'date',None)
-    d['resp_date'] = getattr(doc,'resp_date',None)
-    doc.edit(mapping = d)
-    msg = " ".join(["%s: %s" % (key,value) for key,value in d.items()])
-    rwrite(msg)
+for payment_brain in payments:
+    payment = payment_brain.getObject()
+    payment['updatePayment']()
+    # student_id = payment.getPath().split('/')[-3]
+    # student_brain = context.students_catalog.getRecordByKey(student_id)
+    # if student_brain is None:
+    #     logger.info("student %s not in students_catalog" % student_id)
+    #     continue
+    # d = {}
+    # doc = payment.getObject().getContent()
+    # d['key'] = payment.getId
+    # d['amount'] = doc.amount
+    # d['description'] = d['type_description'] = doc.type_description
+    # subject = ''
+    # if doc.type_description.startswith('School'):
+    #     subject = 'schoolfee'
+    # sp = doc.type_description.rfind('/')
+    # d['session_id'] = doc.type_description[sp-2:sp]
+    # d['subject'] = subject # zb. schoolfee
+    # d['target'] = "%s" % (student_brain.course)  # faculty departmen course
+    # while True:
+    #     if doc.resp_code == "SC":
+    #         p_type = "sc"
+    #         p_status = "paid"
+    #         break
+    #     if doc.resp_code == "00":
+    #         p_type = "onl"
+    #         p_status = "paid"
+    #         break
+    #     p_type = "ONL"
+    #     p_status = "open"
+    #     break
+    # d['key'] = payment.getId
+    # d['type'] = p_type  # scratch card
+    # d['status'] = p_status
+    # d['resp_approved_amount'] = getattr(doc,'resp_approved_amount',None)
+    # d['resp_pay_reference'] = doc.resp_pay_reference
+    # d['resp_desc'] = doc.resp_desc
+    # d['order_id'] = doc.order_id
+    # d['resp_code'] = doc.resp_code
+    # d['resp_card_num'] = doc.resp_card_num
+    # d['date'] = getattr(doc,'date',None)
+    # d['resp_date'] = getattr(doc,'resp_date',None)
+    # doc.edit(mapping = d)
+    # msg = " ".join(["%s: %s" % (key,value) for key,value in d.items()])
+    # rwrite(msg)
     logger.info('upgraded student %s payment %s' % (student_id,d['key']))
     if not count % commit_after:
