Ignore:
Timestamp:
23 Jul 2014, 12:42:22 (10 years ago)
Author:
Henrik Bettermann
Message:

All fee amounts must be passed to Interswitch as integers (mutltiples of Kobos) not floats.

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

Legend:

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

    r11642 r11767  
    167167            self.context.p_item, self.context.p_session):
    168168            return _("This type of payment has already been made.")
    169         self.amount_auth = 100 * self.context.amount_auth
     169        self.amount_auth = int(100 * self.context.amount_auth)
    170170        xmldict = {}
    171171        if certificate is not None:
     
    217217                     "Application period has expired.")
    218218        self.applicant = self.context.__parent__
    219         self.amount_auth = 100 * self.context.amount_auth
     219        self.amount_auth = int(100 * self.context.amount_auth)
    220220        self.category = getUtility(IKofaUtils).PAYMENT_CATEGORIES[self.context.p_category]
    221221        tz = getUtility(IKofaUtils).tzinfo
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/tests.py

    r11640 r11767  
    6464        self.assertEqual(self.student.current_mode, 'ug_ft')
    6565        self.assertMatches(
    66             '...<input type="hidden" name="amount" value="4000000.0" />...',
     66            '...<input type="hidden" name="amount" value="4000000" />...',
    6767            self.browser.contents)
    6868
     
    9191                           self.browser.contents)
    9292        self.assertMatches(
    93             '...<input type="hidden" name="amount" value="2000000.0" />...',
     93            '...<input type="hidden" name="amount" value="2000000" />...',
    9494            self.browser.contents)
    9595
     
    132132                           self.browser.contents)
    133133        self.assertMatches(
    134             '...<input type="hidden" name="amount" value="100000.0" />...',
     134            '...<input type="hidden" name="amount" value="100000" />...',
    135135            self.browser.contents)
    136136
Note: See TracChangeset for help on using the changeset viewer.