Index: /WAeUP_SRP/trunk/WAeUPTool.py
===================================================================
--- /WAeUP_SRP/trunk/WAeUPTool.py	(revision 1797)
+++ /WAeUP_SRP/trunk/WAeUPTool.py	(revision 1798)
@@ -287,5 +287,5 @@
         #    st = res[0]
         #res = self.returning_import(matric_no = st.matric_no)
-        res = self.returning_import(id = student_id)        
+        res = self.returning_import(id = student_id)
         if res:
             student = res[0]
@@ -617,9 +617,16 @@
 
             # format of the second file sent by Tayo
+            #data['datetime'] = date = 0
+            #data['student_id'] = student_id = pay_transaction['Payer ID']
+            #data['order_id'] = order_id = pay_transaction['Order ID (Tranx Ref)']
+            #data['response_code'] = response_code = '00'
+            #data['amount'] = amount = pay_transaction['Amount']
+            
+            # format of the third file sent by Kehinde
             data['datetime'] = date = 0
-            data['student_id'] = student_id = pay_transaction['Payer ID']
-            data['order_id'] = order_id = pay_transaction['Order ID (Tranx Ref)']
+            data['student_id'] = student_id = pay_transaction['customer_id']
+            data['order_id'] = order_id = pay_transaction['merchant_reference']
             data['response_code'] = response_code = '00'
-            data['amount'] = amount = pay_transaction['Amount']
+            data['amount'] = amount = pay_transaction['Amount']            
 
             dup = False
@@ -633,5 +640,9 @@
             if dup:
                 if response_code == "00":
-                    opt.modifyRecord(**data)
+                    try:
+                        opt.modifyRecord(**data)
+                    except:
+                        logger.info("duplicate uid, order_id %(order_id)s, student_id %(student_id)s, response_code %(response_code)s" % data)
+                        continue
                 else:
                     pay_transaction['Error'] = "Duplicate order_id"
