Ignore:
Timestamp:
19 Oct 2011, 06:56:47 (13 years ago)
Author:
Henrik Bettermann
Message:

Implement FUTMinna acceptance fee payment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/trunk/skins/waeup_epayment/interswitch_cb.py

    r5939 r6910  
    121121next_verdict = next_info['next_verdict']
    122122next_previous_verdict = next_info['next_previous_verdict']
    123 
    124123if  resp == '00':
    125124    if pay_doc.category == 'schoolfee': 
     
    170169        #    logger.info('%s no workflow action pay_maintenance_fee' % student_id)
    171170           
    172 
     171    elif pay_doc.category == 'acceptance':
     172        if context.getStudentReviewState() == "admitted":
     173            logger.info('%s paid acceptance fee' % (student_id))
     174            current = DateTime.DateTime()
     175            wf = context.portal_workflow
     176            info = context.getClearanceInfo()
     177            wftool.doActionFor(student,'enter_clearance_pin')
     178            context.waeup_tool.changeWorkflowState(info['clear'], 'opened')
     179            context.waeup_tool.changeWorkflowState(info['app'], 'closed')
     180            dc = {}
     181            app_doc = info['app_doc']
     182            #dc['clr_ac_pin'] = pay_doc.order_id
     183            dc['clr_ac_date'] = current
     184            dc['entry_date'] = current
     185            info['clear_doc'].edit(mapping = dc)
     186            if info['penalty']:
     187                logger.info('%s started late clearance' % (info['id']))
     188            #return redirect("%s/clearance_edit_form" % info['clear'].absolute_url())
    173189
    174190    logger.info('%s received valid callback' % student_id)
     
    177193    logger.info('%s received unsuccessful callback: %s' % (student_id,pd['resp_desc']))
    178194
    179 review_state = wftool.getInfoFor(context,'review_state',None)
    180 if review_state == 'opened':
    181     wftool.doActionFor(context,'close')
     195#review_state = wftool.getInfoFor(context,'review_state',None)
     196#if review_state == 'opened':
     197#    wftool.doActionFor(context,'close')
     198context.waeup_tool.changeWorkflowState(context, 'closed')
    182199
    183200return request.RESPONSE.redirect("%s/waeup_document_view" % context.absolute_url())
Note: See TracChangeset for help on using the changeset viewer.