Changeset 8276


Ignore:
Timestamp:
25 Apr 2012, 11:37:11 (12 years ago)
Author:
Henrik Bettermann
Message:

Next try.

Location:
main/waeup.uniben/trunk/src/waeup/uniben/interswitch
Files:
4 edited

Legend:

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

    r8274 r8276  
    228228        student = self.student = self.context.getStudent()
    229229        certificate = getattr(self.student['studycourse'],'certificate',None)
     230        self.amount_auth = 100 * self.context.amount_auth
    230231        xmldict = {}
    231232        if certificate is not None:
     
    235236            xmldict['department'] = None
    236237            xmldict['faculty'] = None
    237         self.amount_special = 100 * (self.context.amount_auth - 150)
    238238        self.category = payment_categories.getTermByToken(
    239239            self.context.p_category).title
     
    285285                xmldict['institution_acct'] = '0122012109'
    286286                xmldict['institution_bank_id'] = '16'
    287         xmldict['institution_amt'] = self.amount_special - 100 * provider_amt
     287        xmldict['institution_amt'] = 100 * (self.amount_auth - provider_amt - 150)
    288288        xmldict['institution_item_name'] = self.context.p_category
    289289        xmldict['institution_name'] = INSTITUTION_NAME
     
    320320            return
    321321        self.applicant = self.context.__parent__
     322        self.amount_auth = 100 * self.context.amount_auth
    322323        xmldict = {}
    323324        self.category = payment_categories.getTermByToken(
    324325            self.context.p_category).title
    325         # substract invisible Interswitch surcharge
    326         self.amount_special = 100 * (self.context.amount_auth - 150)
    327326        self.local_date_time = str(self.context.creation_date)
    328327        self.site_redirect_url = self.url(self.context, 'request_webservice')
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser_templates/applicant_goto_interswitch.pt

    r8263 r8276  
    6262  <input type="hidden" name="site_name" tal:attributes="value view/site_name" />
    6363  <input type="hidden" name="local_date_time" tal:attributes="value view/local_date_time" />
    64   <input type="hidden" name="amount" tal:attributes="value view/amount_special" />
     64  <input type="hidden" name="amount" tal:attributes="value view/amount_auth" />
    6565  <input type="hidden" name="txn_ref" tal:attributes="value view/context/p_id" />
    6666  <input type="hidden" name="pay_item_name" tal:attributes="value view/context/p_item" />
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser_templates/student_goto_interswitch.pt

    r8263 r8276  
    6262  <input type="hidden" name="site_name" tal:attributes="value view/site_name" />
    6363  <input type="hidden" name="local_date_time" tal:attributes="value view/local_date_time" />
    64   <input type="hidden" name="amount" tal:attributes="value view/amount_special" />
     64  <input type="hidden" name="amount" tal:attributes="value view/amount_auth" />
    6565  <input type="hidden" name="txn_ref" tal:attributes="value view/context/p_id" />
    6666  <input type="hidden" name="pay_item_name" tal:attributes="value view/context/p_item" />
  • main/waeup.uniben/trunk/src/waeup/uniben/interswitch/tests.py

    r8271 r8276  
    8484        # has been reduced by the Interswitch fee of 150 Nairas
    8585        self.assertMatches(
    86             '...<input type="hidden" name="amount" value="3985000.0" />...',
     86            '...<input type="hidden" name="amount" value="4000000.0" />...',
    8787            self.browser.contents)
    8888
     
    160160        self.assertMatches('...Total Amount Authorized:...',
    161161                           self.browser.contents)
    162         # The total amount to be processed by Interswitch
    163         # has been reduced by the Interswitch fee of 150 Nairas
    164162        self.assertMatches(
    165             '...<input type="hidden" name="amount" value="85000.0" />...',
     163            '...<input type="hidden" name="amount" value="100000.0" />...',
    166164            self.browser.contents)
    167165
Note: See TracChangeset for help on using the changeset viewer.