Index: WAeUP_SRP/trunk/skins/waeup_uniben/getPaymentsFolderInfo.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/getPaymentsFolderInfo.py	(revision 7901)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/getPaymentsFolderInfo.py	(revision 7902)
@@ -57,8 +57,12 @@
 # begin customization
 
-if session in ('11','12','13'):
+info['payment_method'] = ""
+
+if review_state in ('cleared_and_validated', 'returning') and session in ('11','12','13'):
     info['payment_method'] = "online_payment"
+elif review_state in ('cleared_and_validated', 'returning'):
+    info['payment_method'] = "sc_payment"
 else:
-    info['payment_method'] = "sc_payment"
+    info['payment_method'] = ""
 
 info['prod_id'] = '61'
Index: WAeUP_SRP/trunk/skins/waeup_uniben/payment_receipt.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/payment_receipt.pt	(revision 7901)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/payment_receipt.pt	(revision 7902)
@@ -51,5 +51,5 @@
         
         <metal:block tal:condition="info/is_etranzact_pmt">
-        <h3>eTranzact Payment Slip</h3>
+        <h3>eTranzact Payment Slip/Receipt</h3>
         <br />
         <table tal:define="student info/student;
@@ -119,5 +119,5 @@
         </tr>
         <tr>
-          <td width="220px">Transaction Id:</td>
+          <td width="220px">Transaction Code:</td>
           <td><strong><span tal:content="pm/order_id" /></strong></td>
         </tr>
@@ -129,4 +129,8 @@
           <td width="220px">Response Description:</td>
           <td><span tal:content="pm/resp_desc" /></td>
+        </tr>
+        <tr>
+          <td width="220px">Response Reference:</td>
+          <td><span tal:content="pm/resp_pay_reference" /></td>
         </tr>
         </table>
Index: WAeUP_SRP/trunk/skins/waeup_uniben/tranzact_cb.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_uniben/tranzact_cb.py	(revision 7901)
+++ WAeUP_SRP/trunk/skins/waeup_uniben/tranzact_cb.py	(revision 7902)
@@ -99,8 +99,10 @@
     return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
 
-pd['resp_desc'] = success_dict['TRANS_DESCR']
+pd = {}
+pd['resp_desc'] = success_dict['TRANS_DESCR'].replace('%20',' ')
 pd['resp_pay_reference'] = success_dict['RECEIPT_NO']
-pd['resp_code'] = '00'
+pd['resp_code'] = 'ET'
 pd['resp_approved_amount'] = success_dict['TRANS_AMOUNT']
+pd['status'] = 'paid'
 
 pay_doc.edit(mapping = pd)
@@ -116,75 +118,71 @@
 next_verdict = next_info['next_verdict']
 next_previous_verdict = next_info['next_previous_verdict']
-if  resp == '00':
-    if pay_doc.category == 'schoolfee':
-        if context.getStudentReviewState() == "school_fee_paid":
-            logger.info('%s paid school_fee in state school_fee_paid' % (student_id))
-        else:
-            study_course = getattr(student,'study_course')
-            try:
-                wftool.doActionFor(study_course,'open')
-            except:
-                pass
-            verdict = s_brain.verdict
-            if next_previous_verdict == 'N/A':
-                next_previous_verdict = ''
-            study_course.getContent().edit(mapping= {'current_level': next_level_id,
-                                                     'current_session': next_session_id,
-                                                     'current_verdict': next_verdict,
-                                                     'previous_verdict': next_previous_verdict,
-                                                     })
-            if next_transition:
-                wftool.doActionFor(student,next_transition)
+if pay_doc.category == 'schoolfee':
+    if context.getStudentReviewState() == "school_fee_paid":
+        logger.info('%s paid school_fee in state school_fee_paid' % (student_id))
+    else:
+        study_course = getattr(student,'study_course')
+        try:
+            wftool.doActionFor(study_course,'open')
+        except:
+            pass
+        verdict = s_brain.verdict
+        if next_previous_verdict == 'N/A':
+            next_previous_verdict = ''
+        study_course.getContent().edit(mapping= {'current_level': next_level_id,
+                                                 'current_session': next_session_id,
+                                                 'current_verdict': next_verdict,
+                                                 'previous_verdict': next_previous_verdict,
+                                                 })
+        if next_transition:
+            wftool.doActionFor(student,next_transition)
 
 
-    elif pay_doc.category == 'hostel_maintenance':
+elif pay_doc.category == 'hostel_maintenance':
 
-        ## callback function for accommodation_catalog method
-        data={}
-        data['acco_maint_date'] = pay_doc.date
-        data['catkey'] =student_id + '|' + pay_doc.session_id
-        data['acco_maint_fee'] = pay_doc.amount
-        data['acco_maint_pay_id'] = context.getId()
-        data['reservation_status'] = 'maintenance_fee_paid'
-        context.accommodation_catalog.modifyRecord(**data)
+    ## callback function for accommodation_catalog method
+    data={}
+    data['acco_maint_date'] = pay_doc.date
+    data['catkey'] =student_id + '|' + pay_doc.session_id
+    data['acco_maint_fee'] = pay_doc.amount
+    data['acco_maint_pay_id'] = context.getId()
+    data['reservation_status'] = 'maintenance_fee_paid'
+    context.accommodation_catalog.modifyRecord(**data)
 
-        ## callback function for accommodation object method (deactivated since March 2011)
-        #acco_info = context.getAccommodationInfo()
-        #d = {}
-        #d['acco_maint_date'] = pay_doc.date
-        #d['acco_maint_fee'] = pay_doc.amount
-        #d['acco_maint_pay_id'] = context.getId()
-        #try:
-        #    acco_info['acco_doc'].edit(mapping=d)
-        #except:
-        #    logger.info('%s requeried payment though maintenance already paid' % student_id)
-        #try:
-        #    wftool.doActionFor(acco_info['acco'],'pay_maintenance_fee',dest_container=acco_info['acco'])
-        #except:
-        #    logger.info('%s no workflow action pay_maintenance_fee' % student_id)
+    ## callback function for accommodation object method (deactivated since March 2011)
+    #acco_info = context.getAccommodationInfo()
+    #d = {}
+    #d['acco_maint_date'] = pay_doc.date
+    #d['acco_maint_fee'] = pay_doc.amount
+    #d['acco_maint_pay_id'] = context.getId()
+    #try:
+    #    acco_info['acco_doc'].edit(mapping=d)
+    #except:
+    #    logger.info('%s requeried payment though maintenance already paid' % student_id)
+    #try:
+    #    wftool.doActionFor(acco_info['acco'],'pay_maintenance_fee',dest_container=acco_info['acco'])
+    #except:
+    #    logger.info('%s no workflow action pay_maintenance_fee' % student_id)
 
-    elif pay_doc.category == 'acceptance':
-        if context.getStudentReviewState() in ('admitted', 'objection_raised'):
-            logger.info('%s paid acceptance fee' % (student_id))
-            current = DateTime.DateTime()
-            wf = context.portal_workflow
-            info = context.getClearanceInfo()
-            wftool.doActionFor(student,'enter_clearance_pin')
-            context.waeup_tool.changeWorkflowState(info['clear'], 'opened')
-            context.waeup_tool.changeWorkflowState(info['app'], 'closed')
-            dc = {}
-            app_doc = info['app_doc']
-            #dc['clr_ac_pin'] = pay_doc.order_id
-            dc['clr_ac_date'] = current
-            dc['entry_date'] = current
-            info['clear_doc'].edit(mapping = dc)
-            if info['penalty']:
-                logger.info('%s started late clearance' % (info['id']))
-            #return redirect("%s/clearance_edit_form" % info['clear'].absolute_url())
+elif pay_doc.category == 'acceptance':
+    if context.getStudentReviewState() in ('admitted', 'objection_raised'):
+        logger.info('%s paid acceptance fee' % (student_id))
+        current = DateTime.DateTime()
+        wf = context.portal_workflow
+        info = context.getClearanceInfo()
+        wftool.doActionFor(student,'enter_clearance_pin')
+        context.waeup_tool.changeWorkflowState(info['clear'], 'opened')
+        context.waeup_tool.changeWorkflowState(info['app'], 'closed')
+        dc = {}
+        app_doc = info['app_doc']
+        #dc['clr_ac_pin'] = pay_doc.order_id
+        dc['clr_ac_date'] = current
+        dc['entry_date'] = current
+        info['clear_doc'].edit(mapping = dc)
+        if info['penalty']:
+            logger.info('%s started late clearance' % (info['id']))
+        #return redirect("%s/clearance_edit_form" % info['clear'].absolute_url())
 
-    logger.info('%s received valid callback' % student_id)
-
-else:
-    logger.info('%s received unsuccessful callback: %s' % (student_id,pd['resp_desc']))
+logger.info('%s received valid callback' % student_id)
 
 #review_state = wftool.getInfoFor(context,'review_state',None)
