Ignore:
Timestamp:
22 Jun 2007, 15:21:07 (18 years ago)
Author:
joachim
Message:

aprove closed payments

File:
1 edited

Legend:

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

    r1943 r1947  
    6969                                                  payment_doc.resp_code
    7070                                                  ))
    71     if payment_doc.resp_code == "" and response_code == "00":
     71    #if payment_doc.resp_code == "" and response_code == "00":
     72    if response_code == "00":
    7273        pd = {}
    7374        review_state = wftool.getInfoFor(payment_obj,'review_state',None)
    74         if review_state != "opened":
    75             logger.info('payment object of %s closed' % (student_id))
    76             continue
     75        if payment_doc.resp_code == "":
     76            if review_state != "opened":
     77                logger.info('payment object of %s closed' % (student_id))
     78                continue
     79        else:
     80            logger.info('payment object of %s old resp_code: %s' % (student_id,
     81                                                                  payment_doc.resp_code,
     82                                                                 ))
     83            if review_state == "closed":
     84                logger.info('payment object of %s closed will be reopened' % (student_id))
     85                wftool.doActionFor(payment_obj,'open')
    7786        review_state = context.getStudentReviewState(student_id)
    7887        if review_state != "cleared_and_validated":
Note: See TracChangeset for help on using the changeset viewer.