Changeset 2925


Ignore:
Timestamp:
12 Dec 2007, 11:51:17 (17 years ago)
Author:
Henrik Bettermann
Message:

Payment.py: set payment status properly

upgradePayments.py: commit transactions

Location:
WAeUP_SRP
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/base/Payment.py

    r2917 r2925  
    101101            #    d['order_id'] = "%s%s" % (student_record.id[1:],self.aq_parent.getId()[1:])
    102102
     103            p_type = "online"
    103104            if doc.resp_code in ("00","IP","AP"):
    104                 p_type = "online"
    105105                p_status = "paid"
    106106                break
    107             p_type = "online"
    108             p_status = "started"
     107            elif doc.resp_code == '':
     108                p_status = "started"
     109            else:
     110                p_status = "failed"
    109111            # don't set order_id it is already correct
    110112
  • WAeUP_SRP/base/skins/waeup_epayment/upgradePayments.py

    r2923 r2925  
    5151sid = "xxx"
    5252count = 0
    53 commit_after = 5
    54 #commit_count = 0
     53commit_after = 10
     54commit_count = 0
    5555
    5656student_id = ''
     
    6363    payment['updatePayment'](student_record)
    6464    logger.info('upgraded student %s payment %s' % (student_record.id,payment.getId()))
    65     #if not count % commit_after:
    66     #    logger.info("committing %d total %d" % (commit_after,count))
    67         #commit_count += 1
    68         #if not commit_count % 2:
    69         #    break
     65    if not count % commit_after:
     66        logger.info("committing %d total %d" % (commit_after,count))
     67        commit_count += 1
     68        context.waeup_tool.doCommit()
     69        if not commit_count % 2:
     70            break
    7071logger.info("%d of %d upgraded" % (count,total))
  • WAeUP_SRP/uniben/waeup_custom/getSchoolFee.py

    r2830 r2925  
    107107            "BAGRSW":{'description':"Bachelor of Agricultural Science Education (Sandwich)",'returning':"23200",'new':"38700"},
    108108            "BHEDSW":{'description':"Bachelor of Health Education (Sandwich)",'returning':"23200",'new':"38700"},
    109             "BAH":{'description':"Bachelor of Arts in History",'returning':"27700",'new':"42200"}, 
    110             "BAFW":{'description':"Bachelor in Agriculture (Forestry & Wildlife)",'returning':"27700",'new':"42200"},
    111            
     109            "BAH":{'description':"Bachelor of Arts in History",'returning':"27700",'new':"42200"},
     110            "BFW":{'description':"Bachelor in Agriculture (Forestry & Wildlife)",'returning':"27700",'new':"42200"},
     111
    112112         }
    113113
Note: See TracChangeset for help on using the changeset viewer.