Index: /WAeUP_SRP/trunk/Widgets.py
===================================================================
--- /WAeUP_SRP/trunk/Widgets.py	(revision 1375)
+++ /WAeUP_SRP/trunk/Widgets.py	(revision 1376)
@@ -693,6 +693,5 @@
         datastructure[widget_id+'_b'] = b
         datastructure[widget_id+'_n'] = n
-
-###)
+    ###)
 
     def validate(self, datastructure, **kw): ###(
@@ -710,4 +709,5 @@
         pins = self.portal_pins
         pin = "%(prefix)s%(b)s%(n)s" % vars()
+        pin_str = "%(prefix)s-%(b)-s%(n)s" % vars()
         do = 1
         s_id = str(self.portal_membership.getAuthenticatedMember())
@@ -716,5 +716,9 @@
             do = 0
             err ='You are not a Student. PIN neither checked nor used.'
-            s_logger.info('"%s","tried to use Scratchcard", "%s"' % (s_id,pin))
+            s_logger.info('"%s","tried to use Scratchcard", "%s"' % (s_id,pin_str))
+        elif len(n) != 10:
+            do = 0
+            err = 'Invalid PIN-Number length %d' % len(n)
+            s_logger.info('"%s","Invalid PIN-Number length", "%d"' % (s_id,len(n)))
         elif self.reference == "":
             ref = s_id
@@ -724,22 +728,22 @@
                 do = 0
                 datastructure.setError(widget_id, 'Errors in other data, PIN neither checked nor used.')
-                s_logger.info('"%s", "%s","entered wrong data together with pin", "%s"' % (s_id,ref,pin))
+                s_logger.info('"%s", "%s","entered wrong data together with pin", "%s"' % (s_id,ref,pin_str))
         while do:
             ok = pins.searchAndSetRecord(pin,ref,prefix)
             if ok < -2 or ok > 2:
                 err = 'Unknown error, please report!'
-                s_logger.info('"%s","%s", "caused unknown error with pin", "%s"' % (s_id,ref,pin))
+                s_logger.info('"%s","%s", "caused unknown error with pin", "%s"' % (s_id,ref,pin_str))
                 break
             elif ok == -2:
                 err = 'Service already activated but with a different PIN.'
-                s_logger.info('"%s","%s", "repeatedly activated service but with different pin", "%s"' % (s_id,ref,pin))
+                s_logger.info('"%s","%s", "repeatedly activated service but with different pin", "%s"' % (s_id,ref,pin_str))
                 break
             elif ok == -1:
                 err = 'Invalid PIN'
-                s_logger.info('"%s","%s", "entered invalid pin", "%s"' % (s_id,ref,pin))
+                s_logger.info('"%s","%s", "entered invalid pin", "%s"' % (s_id,ref,pin_str))
                 break
             if ok == 0:
                 err = 'PIN already used.'
-                s_logger.info('"%s","%s", "entered used pin", "%s"' % (s_id,ref,pin))
+                s_logger.info('"%s","%s", "entered used pin", "%s"' % (s_id,ref,pin_str))
                 break
             if ok >= 1:
@@ -748,14 +752,14 @@
                     if self.reference == "jamb_reg_no":
                         err = "You are already logged in."
-                        s_logger.info('"%s","%s", "checked admission though logged in", "%s"' % (s_id,ref,pin))
+                        s_logger.info('"%s","%s", "checked admission though logged in", "%s"' % (s_id,ref,pin_str))
                         break
                     if ok == 1:
-                        s_logger.info('"%s","%s", "successfully used pin", "%s"' % (s_id,ref,pin))
+                        s_logger.info('"%s","%s", "successfully used pin", "%s"' % (s_id,ref,pin_str))
                     else:
-                        s_logger.info('"%s","%s", "repeatedly used pin", "%s"' % (s_id,ref,pin))
+                        s_logger.info('"%s","%s", "repeatedly used pin", "%s"' % (s_id,ref,pin_str))
                     break
                 else:
                     student = getStudentByRegNo(self,ref)
-                    s_logger.info('"%s","%s","successfully used pin","%s"' % (s_id,ref,pin))
+                    s_logger.info('"%s","%s","successfully used pin","%s"' % (s_id,ref,pin_str))
                 if student is None:
                     err = "Student not found."
@@ -767,18 +771,18 @@
                         if hasattr(self.portal_directories.students,s_id):
                             err = "Please login with your Student Id %s and 10-digit PIN." % s_id
-                            s_logger.info('"%s","%s", "repeatedly checked admission with pin", "%s"' % (s_id,ref,pin))
+                            s_logger.info('"%s","%s", "repeatedly checked admission with pin", "%s"' % (s_id,ref,pin_str))
                             break
                         else:
-                            s_logger.info('"%s","%s","(non-member) repeatedly checked admission with pin", "%s"' % (s_id,ref,pin))
+                            s_logger.info('"%s","%s","(non-member) repeatedly checked admission with pin", "%s"' % (s_id,ref,pin_str))
                     else:
                         err = "Unknown error" % s_id
-                        s_logger.info('"%s","%s", "repeatedly activated service with pin", "%s"' % (s_id,ref,pin))
+                        s_logger.info('"%s","%s", "repeatedly activated service with pin", "%s"' % (s_id,ref,pin_str))
                         break
                 try:
                     student.getContent().makeStudentMember(s_id,password=pin[4:])
-                    s_logger.info('"%s","%s", "has been created using pin", "%s"' % (s_id,ref,pin))
+                    s_logger.info('"%s","%s", "has been created using pin", "%s"' % (s_id,ref,pin_str))
                 except:
                     err = "Please login with your Student Id %s and 10-digit PIN." % s_id
-                    s_logger.info('"%s","%s", "could not be made a member with pin", "%s"' % (s_id,ref,pin))
+                    s_logger.info('"%s","%s", "could not be made a member with pin", "%s"' % (s_id,ref,pin_str))
                     break
             break
Index: /WAeUP_SRP/trunk/profiles/default/layouts/student_schoolfee.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/layouts/student_schoolfee.xml	(revision 1375)
+++ /WAeUP_SRP/trunk/profiles/default/layouts/student_schoolfee.xml	(revision 1376)
@@ -10,5 +10,5 @@
   <property name="title">Schoolfee Scratch Card</property>
   <property name="fields">
-   <element value="payment_id"/>
+   <element value="order_id"/>
   </property>
   <property name="label">Access Code</property>
Index: eUP_SRP/trunk/profiles/default/schemas/epayment.xml
===================================================================
--- /WAeUP_SRP/trunk/profiles/default/schemas/epayment.xml	(revision 1375)
+++ 	(revision )
@@ -1,15 +1,0 @@
-<?xml version="1.0"?>
-<object name="epayment" meta_type="CPS Schema">
- <field name="payers_id" meta_type="CPS String Field"/>
- <field name="payers_name" meta_type="CPS String Field"/>
- <field name="payers_address" meta_type="CPS String Field"/>
- <field name="payment_id" meta_type="CPS String Field"/>
- <field name="order_id" meta_type="CPS String Field"/>
- <field name="amount" meta_type="CPS Float Field"/>
- <field name="currency_id" meta_type="CPS String Field"/>
- <field name="pay_date" meta_type="CPS DateTime Field"/>
- <field name="response_code" meta_type="CPS String Field"/>
- <field name="response_desc" meta_type="CPS String Field"/>
- <field name="response_reference" meta_type="CPS String Field"/>
- <field name="card_number" meta_type="CPS String Field"/>
-</object>
Index: /WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py
===================================================================
--- /WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py	(revision 1375)
+++ /WAeUP_SRP/trunk/skins/waeup_epayment/pay_by_sc.py	(revision 1376)
@@ -33,5 +33,5 @@
 validate = request.has_key("cpsdocument_create_button")
 res,psm,ds = lt.renderLayout(layout_id= 'student_schoolfee',
-                      schema_id= 'epayment',
+                      schema_id= 'payment',
                       context=context,
                       mapping=validate and request,
