Ignore:
Timestamp:
10 Nov 2020, 14:33:53 (4 years ago)
Author:
Henrik Bettermann
Message:

Implement GNS Pack payments. This is a good example how sophisticated such requirements are.

Location:
main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/browser.py

    r16026 r16309  
    186186            xmldict['institution_acct'] = '2015327204'
    187187            xmldict['institution_bank_id'] = '8'
     188        elif self.context.p_category == 'gns_1':
     189            self.pay_item_id = '154'
     190            xmldict['institution_acct'] = '2017447652'
     191            xmldict['institution_bank_id'] = '8'
     192        elif self.context.p_category == 'gns_2':
     193            self.pay_item_id = '155'
     194            xmldict['institution_acct'] = '2017447652'
     195            xmldict['institution_bank_id'] = '8'
    188196        elif self.context.p_category == 'hostel_maintenance':
    189197            if self.context.p_item != 'Balance':
  • main/kofacustom.dspg/trunk/src/kofacustom/dspg/interswitch/tests.py

    r16308 r16309  
    6767        self.browser.getControl(name="form.p_category").value = ['schoolfee']
    6868        self.browser.getControl("Create ticket").click()
    69         self.assertTrue('You have to pay NADESU/SA/SUG Dues first'
     69        self.assertTrue('You have to pay NADESU/SA/SUG and GNS Dues first'
    7070            in self.browser.contents)
    7171        payment = createObject('waeup.StudentOnlinePayment')
     
    7575        payment.p_state = u'paid'
    7676        self.student['payments']['anykey'] = payment
     77        payment2 = createObject('waeup.StudentOnlinePayment')
     78        payment2.p_category = u'gns_1'
     79        payment2.p_session = self.student.current_session
     80        payment2.p_id = u'anyid2'
     81        payment2.p_state = u'paid'
     82        self.student['payments']['anykey2'] = payment2
    7783        self.browser.open(self.payments_path + '/addop')
    7884        self.browser.getControl(name="form.p_category").value = ['schoolfee']
Note: See TracChangeset for help on using the changeset viewer.