Changeset 1355


Ignore:
Timestamp:
25 Jan 2007, 20:49:22 (18 years ago)
Author:
Henrik Bettermann
Message:

simulate callback disabled
performance of getReviewInfo improved

Location:
WAeUP_SRP/trunk/skins
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_default/getReviewInfo.py

    r1191 r1355  
    2323if context.portal_type != "Student":
    2424    student_id = context.getStudentId()
    25     res = context.portal_catalog(id = student_id,portal_type='Student')
    26     if res:
    27         s_review = res[-1].review_state
    28         return "%s / %s" % (s_review,d_review)
     25    if student_id:
     26        res = context.portal_catalog(id = student_id,portal_type='Student')
     27        if res:
     28            s_review = res[-1].review_state
     29            return "%s / %s" % (s_review,d_review)
    2930return "%s" % (d_review)
    3031
  • WAeUP_SRP/trunk/skins/waeup_epayment/pay_online.py

    r1348 r1355  
    2121
    2222student_id = context.getStudentId()
    23 if student_id is None:
    24     return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
     23student = getattr(students,student_id) 
    2524
    26 student = getattr(students,student_id)
    2725sbrain = context.students_catalog(id=student_id)[0]
    2826amount,description = context.getSchoolFee(sbrain.faculty)
     
    5048order_id = info['order_id'] = "%d" % int(now.timeTime()*1000)
    5149info['order_id'] = "%s%s" % (student_id[1:],order_id)
     50p_id = "p%s" % order_id
     51
     52if student_id is None:
     53    return context.REQUEST.RESPONSE.redirect("%s/srp_anonymous_view" % context.portal_url())
     54   
     55if context.portal_url().find('uniben-demo.waeup.org') >-1 or\
     56   context.portal_url().find('uniben.waeup.org') >-1:
     57    info['action'] = "http://www.wemaonlinepayments.biz/payment.aspx"
     58else:
     59    return None
     60    #info['action'] = "%s/payments/%s/simulate_callback" % (student.absolute_url(),p_id) 
     61
     62
    5263if "payments" not in student.objectIds():
    5364    student.invokeFactory('PaymentsFolder','payments')
     
    6273    return context.wema_form(info=info)
    6374
    64 p_id = "p%s" % order_id
     75
    6576payments.invokeFactory('Payment', p_id)
    6677payment = getattr(payments,p_id)
     
    7384#wftool.doActionFor(student,'pay_school_fee')
    7485info['callback_url'] = "%s/payments/%s/epayment_cb" % (student.absolute_url(),p_id)
    75 if context.portal_url().find('uniben-demo.waeup.org') >-1 or\
    76    context.portal_url().find('uniben.waeup.org') >-1:
    77     info['action'] = "http://www.wemaonlinepayments.biz/payment.aspx"
    78 else:
    79     info['action'] = "%s/payments/%s/simulate_callback" % (student.absolute_url(),p_id)
     86
    8087logger.info('"%(student_id)s","%(type_description)s", "%(amount)s N"' % info)
    8188payment_fields = (('x_SiteID','site_id'),
Note: See TracChangeset for help on using the changeset viewer.