Ignore:
Timestamp:
24 Oct 2012, 22:01:59 (12 years ago)
Author:
Henrik Bettermann
Message:

Add payment category 'block_h_payment'.

The interswitch module has still to be configured. Bank details and pay_item_id is missing.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.futminna/trunk/src/waeup/futminna/interswitch/browser.py

    r9386 r9409  
    2828from waeup.kofa.students.viewlets import ApprovePaymentActionButton as APABStudent
    2929from waeup.kofa.applicants.viewlets import ApprovePaymentActionButton as APABApplicant
    30 from waeup.kofa.payments.interfaces import payment_categories
    3130from waeup.futminna.students.interfaces import ICustomStudentOnlinePayment
    3231from waeup.futminna.applicants.interfaces import ICustomApplicantOnlinePayment
     
    177176            xmldict['department'] = None
    178177            xmldict['faculty'] = None
    179         self.category = payment_categories.getTermByToken(
    180             self.context.p_category).title
     178        self.category = getUtility(IKofaUtils).PAYMENT_CATEGORIES[self.context.p_category]
    181179        tz = getUtility(IKofaUtils).tzinfo
    182180        self.local_date_time = to_timezone(
     
    265263            self.pay_item_id = "11706"
    266264
     265        elif self.context.p_category == 'hostel_maintenance':
     266            xmldict['institution_amt'] = 100 * (
     267                self.context.amount_auth - 300)
     268            xmldict['institution_acct'] = "0000000000000"
     269            xmldict['institution_bank_id'] = '00'
     270            self.pay_item_id = "0000"
     271
     272        elif self.context.p_category == 'block_h_maintenance':
     273            xmldict['institution_amt'] = 100 * (
     274                self.context.amount_auth - 300)
     275            xmldict['institution_acct'] = "0000000000000"
     276            xmldict['institution_bank_id'] = '00'
     277            self.pay_item_id = "0000"
     278
    267279        xmldict['institution_name'] = INSTITUTION_NAME
    268280        # Interswitch amount is not part of the xml data
     
    275287</item_details>
    276288</payment_item_detail>""" % xmldict
     289
    277290        elif self.context.p_category == 'clearance':
    278291            xmltext = """<payment_item_detail>
     
    281294</item_details>
    282295</payment_item_detail>""" % xmldict
     296
     297        elif 'maintenance' in self.context.p_category:
     298            xmltext = """<payment_item_detail>
     299<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     300<item_detail item_id="1" item_name="Maintenance Fee" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
     301</item_details>
     302</payment_item_detail>""" % xmldict
     303
     304
    283305        self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
    284306        return
Note: See TracChangeset for help on using the changeset viewer.