Changeset 11768


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

If the total amount (amount authorized) is less than 2000 Nairas gateway_amt is 1.5% of the amount authorized.

Location:
main/waeup.kwarapoly/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kwarapoly/trunk/CHANGES.txt

    r11766 r11768  
    441.2dev (unreleased)
    55===================
     6
     7* If the total amount (amount authorized) is less than 2000 Nairas
     8  gateway_amt is 1.5% of the amount authorized.
    69
    710* Adjust provider_amt and gateway_amt and dalash_amt for log_book
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/browser.py

    r11766 r11768  
    142142            dalash_amt = 6.0
    143143            provider_amt = 9.0
    144             gateway_amt = 15.0
     144            #gateway_amt = 15.0
     145            gateway_amt = round(0.015 * self.context.amount_auth, 2)
    145146        elif self.context.p_category == 'loss_examcard':
    146147            self.pay_item_id = '123'
    147148            dalash_amt = 3.0
    148149            provider_amt = 4.5
    149             gateway_amt = 7.5
     150            #gateway_amt = 7.5
     151            gateway_amt = round(0.015 * self.context.amount_auth, 2)
    150152        elif self.context.p_category == 'loss_result':
    151153            self.pay_item_id = '124'
     
    168170            dalash_amt = 6.0
    169171            provider_amt = 9.0
    170             gateway_amt = 15.0
     172            #gateway_amt = 15.0
     173            gateway_amt = round(0.015 * self.context.amount_auth, 2)
    171174        elif self.context.p_category == 'hnd_conv_brochure':
    172175            self.pay_item_id = '133'
     
    181184            dalash_amt = 3.0
    182185            provider_amt = 4.5
    183             gateway_amt = 7.5
     186            #gateway_amt = 7.5
     187            gateway_amt = round(0.015 * self.context.amount_auth, 2)
    184188            xmldict['institution_acct'] = "1010508401"
    185189            xmldict['institution_bank_id'] = '117'
     
    315319                dalash_amt = 6.0
    316320                provider_amt = 9.0
    317                 gateway_amt = 15.0
     321                #gateway_amt = 15.0
     322                gateway_amt = round(0.015 * self.context.amount_auth, 2)
    318323            elif self.applicant.special_application == 'loss_examcard':
    319324                self.pay_item_id = '123'
    320325                dalash_amt = 3.0
    321326                provider_amt = 4.5
    322                 gateway_amt = 7.5
     327                #gateway_amt = 7.5
     328                gateway_amt = round(0.015 * self.context.amount_auth, 2)
    323329            elif self.applicant.special_application == 'loss_result':
    324330                self.pay_item_id = '124'
     
    341347                dalash_amt = 6.0
    342348                provider_amt = 9.0
    343                 gateway_amt = 15.0
     349                #gateway_amt = 15.0
     350                gateway_amt = round(0.015 * self.context.amount_auth, 2)
    344351            elif self.context.p_category == 'hnd_conv_brochure':
    345352                self.pay_item_id = '133'
     
    354361                dalash_amt = 3.0
    355362                provider_amt = 4.5
    356                 gateway_amt = 7.5
     363                #gateway_amt = 7.5
     364                gateway_amt = round(0.015 * self.context.amount_auth, 2)
    357365                xmldict['institution_acct'] = "1010508401"
    358366                xmldict['institution_bank_id'] = '117'
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py

    r11760 r11768  
    303303        self.assertEqual(self.student['payments'][value].thirdparty_amt, 200.0)
    304304
    305         self.app['configuration']['2004'].loss_idcard_fee = 1000.0
     305        self.app['configuration']['2004'].loss_idcard_fee = 1015.0
    306306        self.browser.open(self.payments_path + '/addop')
    307307        self.browser.getControl(name="form.p_category").value = ['loss_idcard']
     
    312312        self.assertMatches('...Amount Authorized...', self.browser.contents)
    313313        self.assertMatches(
    314             '...<span>1000.0</span>...', self.browser.contents)
    315         self.payment_url = self.browser.url
    316         self.browser.getLink("CollegePAY", index=0).click()
    317         self.assertEqual(self.student['payments'][value].amount_auth, 1000.0)
     314            '...<span>1015.0</span>...', self.browser.contents)
     315        self.payment_url = self.browser.url
     316        self.browser.getLink("CollegePAY", index=0).click()
     317        self.assertEqual(self.student['payments'][value].amount_auth, 1015.0)
    318318        self.assertEqual(self.student['payments'][value].provider_amt, 9.0)
    319         self.assertEqual(self.student['payments'][value].gateway_amt, 15.0)
     319        self.assertEqual(self.student['payments'][value].gateway_amt, 15.22)
    320320        self.assertEqual(self.student['payments'][value].thirdparty_amt, 6.0)
    321321
     
    371371        self.assertEqual(self.student['payments'][value].thirdparty_amt, 200.0)
    372372
    373         self.app['configuration']['2004'].loss_idcard_fee = 3000.0
     373        self.app['configuration']['2004'].loss_idcard_fee = 1900.0
    374374        self.browser.open(self.payments_path + '/addop')
    375375        self.browser.getControl(name="form.p_category").value = ['loss_idcard']
     
    380380        self.assertMatches('...Amount Authorized...', self.browser.contents)
    381381        self.assertMatches(
    382             '...<span>3000.0</span>...', self.browser.contents)
    383         self.payment_url = self.browser.url
    384         self.browser.getLink("CollegePAY", index=0).click()
    385         self.assertEqual(self.student['payments'][value].amount_auth, 3000.0)
     382            '...<span>1900.0</span>...', self.browser.contents)
     383        self.payment_url = self.browser.url
     384        self.browser.getLink("CollegePAY", index=0).click()
     385        self.assertEqual(self.student['payments'][value].amount_auth, 1900.0)
    386386        self.assertEqual(self.student['payments'][value].provider_amt, 9.0)
    387         self.assertEqual(self.student['payments'][value].gateway_amt, 15.0)
     387        self.assertEqual(self.student['payments'][value].gateway_amt, 28.5)
    388388        self.assertEqual(self.student['payments'][value].thirdparty_amt, 6.0)
    389389
Note: See TracChangeset for help on using the changeset viewer.