Index: WAeUP_SRP/trunk/skins/waeup_epayment/check_online_payments.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_epayment/check_online_payments.py	(revision 1620)
+++ WAeUP_SRP/trunk/skins/waeup_epayment/check_online_payments.py	(revision 1620)
@@ -0,0 +1,67 @@
+## Script (Python) "check_online_payments"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+payment callback
+"""
+import logging
+logger = logging.getLogger('Skins.check_online_payments')
+from AccessControl import Unauthorized
+import DateTime
+if context.portal_membership.isAnonymousUser():
+    return None
+
+request = context.REQUEST
+response = request.RESPONSE
+students = context.portal_url.getPortalObject().campus.students
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+student_id = context.getStudentId()
+online_transactions = context.online_payment_transactions
+try:
+    from Products.zdb import set_trace
+except:
+    def set_trace():
+        pass
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n" % s)
+try:
+    from Products.AdvancedQuery import Eq, Between, Le,In
+    aq_portal = context.portal_catalog.evalAdvancedQuery
+    aq_students = context.students_catalog.evalAdvancedQuery
+except:
+    aq_portal = None
+
+query1 = Eq('portal_type','Payment')
+query2 = ~ Eq('SearchableText',"SC Payment Successful")
+online_payments = aq_portal(query1 & query2)
+set_trace()
+online_transactions = context.online_payment_transactions
+
+for op_brain in online_payments:
+    student_id = op_brain.getPath().split('/')[-3]
+    payment_doc = op_brain.getObject().getContent()
+    order_id = "%s%s" % (student_id[1:],op_brain.getId[1:])
+    transactions = online_transactions(student_id = student_id)
+    if payment_doc.resp_code == "00" and not transactions:
+        rwrite("%s no transaction for successfull payment %s" % (student_id,payment_id))
+        continue
+    for transaction in transactions:
+        t_order_id = transaction.order_id
+        if t_order_id == order_id:
+            rwrite("%s payment %s found bankresponse: %s resp_code: %s" % (student_id,
+                                                                        payment_id,
+                                                                        transaction.response_code,
+                                                                        payment_doc.resp_code
+                                                                        ))
+            continue
Index: WAeUP_SRP/trunk/skins/waeup_epayment/check_transactions.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_epayment/check_transactions.py	(revision 1620)
+++ WAeUP_SRP/trunk/skins/waeup_epayment/check_transactions.py	(revision 1620)
@@ -0,0 +1,68 @@
+## Script (Python) "check_transactions"
+##bind container=container
+##bind context=context
+##bind namespace=
+##bind script=script
+##bind subpath=traverse_subpath
+##parameters=
+##title=
+##
+# $Id$
+"""
+payment callback
+"""
+import logging
+logger = logging.getLogger('Skins.check_transactions')
+from AccessControl import Unauthorized
+import DateTime
+if context.portal_membership.isAnonymousUser():
+    return None
+
+request = context.REQUEST
+response = request.RESPONSE
+students = context.portal_url.getPortalObject().campus.students
+wftool = context.portal_workflow
+mtool = context.portal_membership
+member = mtool.getAuthenticatedMember()
+member_id = str(member)
+student_id = context.getStudentId()
+online_transactions = context.online_payment_transactions
+def rwrite(s):
+    response.setHeader('Content-type','text/html; charset=ISO-8859-15')
+    response.write("%s<br>\n" % s)
+correct = 0
+count = 0
+for ot_brain in online_transactions():
+    student_id = ot_brain.student_id
+    if not students.hasObject(student_id):
+        rwrite("%s not found" % student_id)
+        continue
+    student_obj = getattr(students,student_id)
+    if not student_obj.hasObject('payments'):
+        rwrite("%s payments-folder not found" % student_id)
+        continue
+    payments_folder = getattr(student_obj,'payments')
+    payment_id = "p%s" % ot_brain.order_id[6:]
+    if not payments_folder.hasObject(payment_id):
+        rwrite("%s payment %s not found" % (student_id,payment_id))
+        continue
+    payment_doc = getattr(payments_folder,payment_id).getContent()
+    response_code = ot_brain.response_code
+    count +=1
+    if payment_doc.resp_code != response_code:
+        rwrite("%d:%d %s payment %s found bankresponse: %s != resp_code %s" % (
+                                                                        count,correct,
+                                                                        student_id,
+                                                                        payment_id,
+                                                                        response_code,
+                                                                        payment_doc.resp_code
+                                                                        ))
+    elif payment_doc.resp_code == response_code:
+        correct +=1
+        rwrite("%d:%d %s payment %s found bankresponse: %s matches resp_code %s" % (
+                                                                        count,correct,
+                                                                        student_id,
+                                                                        payment_id,
+                                                                        response_code,
+                                                                        payment_doc.resp_code
+                                                                        ))
Index: WAeUP_SRP/trunk/skins/waeup_epayment/requery_payment.py
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_epayment/requery_payment.py	(revision 1619)
+++ WAeUP_SRP/trunk/skins/waeup_epayment/requery_payment.py	(revision 1620)
@@ -10,9 +10,9 @@
 # $Id$
 """
-pay online
+requery online-payment
 """
 from urllib import urlencode
 import logging
-logger = logging.getLogger('Skins.pay_online')
+logger = logging.getLogger('Skins.requery_payment')
 import DateTime
 
@@ -45,5 +45,4 @@
 
 
-info['callback_url'] = "%s/payments/%s/epayment_requery_cb" % (student.absolute_url(),p_id)
 payment = context
 if payment.portal_type != 'Payment':
@@ -51,8 +50,9 @@
 payment_doc = payment.getContent()
 #from Products.zdb import set_trace;set_trace()
-info['order_id'] = payment_doc.order_id
+info['order_id'] = p_id = payment_doc.order_id
+info['callback_url'] = "%s/payments/%s/epayment_requery_cb" % (student.absolute_url(),p_id)
 info['type_description'] = payment_doc.type_description
-info['pay_bill_to'] = payment_doc.pay_bill_to
 info['amount'] = payment_doc.amount
+info['student_id'] = student_id
 logger.info('%(student_id)s requeried online school fee payment for order_id %(order_id)s' % info)
 payment_fields = (('x_SiteID','site_id'),
Index: WAeUP_SRP/trunk/skins/waeup_epayment/requery_payment_form.pt
===================================================================
--- WAeUP_SRP/trunk/skins/waeup_epayment/requery_payment_form.pt	(revision 1619)
+++ WAeUP_SRP/trunk/skins/waeup_epayment/requery_payment_form.pt	(revision 1620)
@@ -3,5 +3,5 @@
                 tal:define="info options/info">
                 
-        <h3>Authorize Online Payment! </h3>
+        <h3>Requery Online Payment! </h3>
         <br />
                 
@@ -12,5 +12,4 @@
           <input type="hidden" tal:attributes="name python:arg[0];value python:arg[1]" />
       </span>          
-      <div>Requery this payment</div>
         <table>
           <tr>
@@ -18,10 +17,4 @@
             Payment:</td>
             <td tal:content="info/type_description"></td>
-          </tr>
-          <tr>
-            <td>
-            Name:
-            </td>
-            <td tal:content="info/pay_bill_to" />
           </tr>
           <tr>
