Changeset 10176


Ignore:
Timestamp:
13 May 2013, 05:06:23 (12 years ago)
Author:
Henrik Bettermann
Message:

Configure commission for Dalash.

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

Legend:

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

    r10142 r10176  
    221221            self.context.creation_date, tz).strftime("%Y-%m-%d %H:%M:%S %Z")
    222222        self.site_redirect_url = self.url(self.context, 'request_webservice')
    223         provider_amt = 500.0
     223        provider_amt = 300.0
     224        dalash_amt = 200.0
    224225        if self.applicant.applicant_id.startswith('hnd'):
    225226            xmldict['institution_acct'] = '7000016463'
     
    231232            xmldict['institution_acct'] = '00000000000'
    232233            xmldict['institution_bank_id'] = '00'
     234        xmldict['dalash_amt'] = 100 * dalash_amt
    233235        xmldict['detail_ref'] = self.context.p_id
    234236        xmldict['provider_amt'] = 100 * provider_amt
     
    237239        xmldict['provider_item_name'] = PROVIDER_ITEM_NAME
    238240        xmldict['institution_amt'] = 100 * (
    239             self.context.amount_auth - provider_amt - GATEWAY_AMT)
     241            self.context.amount_auth - provider_amt - GATEWAY_AMT - dalash_amt)
    240242        xmldict['institution_item_name'] = self.context.p_category
    241243        xmldict['institution_name'] = INSTITUTION_NAME
     
    254256<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s">
    255257<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" />
    256 <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" />
     258<item_detail item_id="2" item_name="Dalash" item_amt="%(dalash_amt)d" bank_id="117" acct_num="1013196791" />
     259<item_detail item_id="3" item_name="%(provider_item_name)s" item_amt="%(provider_amt)d" bank_id="%(provider_bank_id)s" acct_num="%(provider_acct)s" />
    257260</item_details>
    258261</payment_item_detail>""" % xmldict
     
    260263        self.context.provider_amt = provider_amt
    261264        self.context.gateway_amt = GATEWAY_AMT
     265        self.context.thirdparty_amt = dalash_amt
    262266        return
    263267
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py

    r10143 r10176  
    357357            'item_amt="253300" bank_id="9" acct_num="7000016463" />'
    358358            in self.browser.contents)
    359         self.assertTrue(
    360             '<item_detail item_id="2" item_name="BT Education" '
    361             'item_amt="50000" bank_id="117" acct_num="1010764827" />'
    362             in self.browser.contents)
     359        # Commission or bribe?
     360        self.assertTrue(
     361            '<item_detail item_id="2" item_name="Dalash" item_amt="20000" '
     362            'bank_id="117" acct_num="1013196791" />'
     363            in self.browser.contents)
     364        self.assertTrue(
     365            '<item_detail item_id="3" item_name="BT Education" '
     366            'item_amt="30000" bank_id="117" acct_num="1010764827" />'
     367            in self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.