Changeset 17469


Ignore:
Timestamp:
7 Jul 2023, 08:08:22 (18 months ago)
Author:
Henrik Bettermann
Message:

Configure application payments.

Location:
main/waeup.aaue/trunk/src/waeup/aaue/interswitch
Files:
2 edited

Legend:

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

    r17468 r17469  
    154154            self.context.r_company = u'interswitch'
    155155        xmldict = {}
    156         provider_amt = 2000.0
    157         if self.applicant.applicant_id.startswith('trans'):
    158             provider_amt = 3000.0
     156        provider_amt = 3000.0
     157        if self.applicant.__parent__.code in ('ver2019', 'send2019'):
     158            provider_amt = 0.0
    159159        xmldict['institution_acct'] = '1012332141'
    160160        xmldict['institution_bank_id'] = '123'
     
    176176            self.context.provider_amt = provider_amt
    177177            self.context.amount_auth += provider_amt
    178         xmltext = """<payment_item_detail>
     178        if provider_amt:
     179            xmltext = """<payment_item_detail>
    179180<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s">
    180181<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
    181182<item_detail item_id="2" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
     183</item_details>
     184</payment_item_detail>""" % xmldict
     185        else:
     186            xmltext = """<payment_item_detail>
     187<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s">
     188<item_detail item_id="1" item_name="%(institution_item_name)s" item_amt="%(institution_amt)d" bank_id="%(institution_bank_id)s" acct_num="%(institution_acct)s" />
    182189</item_details>
    183190</payment_item_detail>""" % xmldict
  • main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py

    r17456 r17469  
    7171        self.browser.getControl("Save").click()
    7272
    73     def deactivated_test_interswitch_form_regular(self):
     73    def test_interswitch_form_regular(self):
    7474        self.browser.getControl("Add online").click()
    7575        self.assertTrue('ticket created' in self.browser.contents)
     
    8282        self.assertTrue('Total Amount Authorized:' in self.browser.contents)
    8383        self.assertTrue(
    84             '<input type="hidden" name="amount" value="1000000" />'
    85             in self.browser.contents)
    86         self.assertTrue(
    87             'item_name="WAeAC" item_amt="200000"'
    88             in self.browser.contents)
    89         self.assertTrue(
    90             'item_name="Application Fee" item_amt="780000" bank_id="117" acct_num="1010835352"'
     84            '<input type="hidden" name="amount" value="1320000" />'
     85            in self.browser.contents)
     86        self.assertTrue(
     87            'item_name="WAeAC Portal Fee" item_amt="300000"'
     88            in self.browser.contents)
     89        self.assertTrue(
     90            'item_name="Application Fee" item_amt="1000000" bank_id="123" acct_num="1012332141"'
    9191            in self.browser.contents)
    9292        self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.