Changeset 2798 for WAeUP_SRP


Ignore:
Timestamp:
27 Nov 2007, 21:30:19 (17 years ago)
Author:
Henrik Bettermann
Message:

This is the correct total amount.

Joachim, please check.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • WAeUP_SRP/fceokene/waeup_custom/pay_interswitch.py

    r2765 r2798  
    103103d = {}
    104104d.update(info)
    105 #from Products.zdb import set_trace;set_trace()
    106105payment.getContent().edit(mapping=d)
    107 #wftool.doActionFor(payment,'close')
    108 #wftool.doActionFor(student,'pay_school_fee')
    109106info['callback_url'] = "%s/payments/%s/interswitch_cb?echo=%s" % (student.absolute_url(),
    110107                                                                  p_id,
     
    125122    args[arg] = info[field]
    126123itotal = int(amount)*100
    127 wema_amount = 10000
    128 provider_amount = 35000
    129124interswitch_amount = 15000
    130 #uniben_amount = itotal - wema_amount - provider_amount - interswitch_amount
    131 uniben_amount = itotal - interswitch_amount
    132 xmldict = {}
    133 xmldict['detail_ref'] = args['txn_ref']
    134 xmldict['department'] = sbrain.department
    135 xmldict['faculty'] = sbrain.faculty
    136 #xmldict['wema_amt'] = "%d" % wema_amount
    137 #xmldict['provider_amt'] = "%d" % provider_amount
    138 xmldict['uniben_amt'] = "%d" % uniben_amount
    139 ##<item_detail item_id="2" item_name="WEMA" item_amt="%(wema_amt)s" bank_id="16" acct_num="48398023902" />
    140 ##<item_detail item_id="3" item_name="Portal Provider" item_amt="%(provider_amt)s" bank_id="47" acct_num="0980938209483" />
    141 xmltext = """
    142 <payment_item_detail>
    143 <item_details detail_ref="%(detail_ref)s" college="FCEOKENE" department="%(department)s"
    144 faculty="%(faculty)s">
    145 <item_detail item_id="1" item_name="FCEOKENE" item_amt="%(uniben_amt)s" bank_id="16" acct_num="384950902390" />
    146 </item_details>
    147 </payment_item_detail>
    148 """ % xmldict
    149 #total = int(xmldict['uniben_amt'])+int(xmldict['wema_amt'])+int(xmldict['provider_amt'])
    150 total = int(xmldict['uniben_amt'])
    151 args['Amount'] = "%d" % (total + 15000)
     125total_amount = itotal + interswitch_amount
     126
     127args['Amount'] = "%d" % (total_amount)
    152128args['site_name'] = "fceokene.waeup.org"
    153129args['cust_name_desc'] = "Student Name"
     
    155131args['pay_item_name'] = "FCEOKENE Tuition Payments"
    156132args['payment_params'] = 'switch_college_split'
    157 #args['xml_data'] = xmltext % info
    158133args['xml_data'] = ''
    159134info['args'] = args
Note: See TracChangeset for help on using the changeset viewer.