Changeset 13329 for main/waeup.kwarapoly


Ignore:
Timestamp:
15 Oct 2015, 10:46:38 (9 years ago)
Author:
Henrik Bettermann
Message:

Change banc account data and strengthen tests.

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

    r13237 r13329  
    5151httplib.HTTPConnection.debuglevel = 0
    5252
    53 #All special payments moved to Skye Bank on 03-09-2015
     53#All special payments moved to GTBank on 15-10-2015
    5454SPECIAL_PAYMENT_PARAMS = {
    55     'certificate': ('111', 200.0, 300.0, '1771440667', '120'),
    56     'state_result': ('112', 200.0, 300.0, '1771440667', '120'),
    57     'transcript_local': ('113', 200.0, 300.0, '1771440667', '120'),
    58     'transcript_foreign': ('114', 200.0, 300.0, '1771440667', '120'),
    59     'ver_result': ('115', 200.0, 300.0, '1771440667', '120'),
    60     'change_course': ('116', 200.0, 300.0, '1771440667', '120'),
    61     'change_inst': ('117', 200.0, 300.0, '1771440667', '120'),
    62     'jamb_reject': ('118', 200.0, 300.0, '1771440667', '120'),
    63     'cert_of_cert': ('119', 200.0, 300.0, '1771440667', '120'),
    64     'ref_let': ('120', 200.0, 300.0, '1771440667', '120'),
    65     'proc_cert': ('121', 200.0, 300.0, '1771440667', '120'),
    66     'loss_idcard': ('122', 6.0, 9.0, '1771440667', '120'),
    67     'loss_examcard': ('123', 3.0, 4.5, '1771440667', '120'),
    68     'loss_result': ('124', 200.0, 300.0, '1771440667', '120'),
    69     'loss_receipt': ('125', 200.0, 300.0, '1771440667', '120'),
    70     'loss_clearance': ('126', 200.0, 300.0, '1771440667', '120'),
    71     'conv_brochure': ('127', 200.0, 300.0, '1771440667', '120'),
    72     'hnd_certificate': ('128', 200.0, 300.0, '1771440667', '120'),
    73     'hnd_state_result': ('129', 200.0, 300.0, '1771440667', '120'),
    74     'hnd_transcript_local': ('130', 200.0, 300.0, '1771440667', '120'),
    75     'hnd_transcript_foreign': ('131', 200.0, 300.0, '1771440667', '120'),
    76     'staff_loss_idcard': ('132', 6.0, 9.0, '1771440667', '120'),
    77     'hnd_conv_brochure': ('133', 200.0, 300.0, '1771440667', '120'),
    78     'pgd_state_result': ('134', 200.0, 300.0, '1771440667', '120'),
    79     'pgd_conv_brochure': ('135', 200.0, 300.0, '1771440667', '120'),
    80     'pgd_certificate': ('136', 200.0, 300.0, '1771440667', '120'),
    81     'log_book': ('137', 3.0, 4.5, '1771440667', '120'),
    82     'pgd_transcript_foreign': ('138', 200.0, 300.0, '1771440667', '120'),
    83     'pgd_transcript_local': ('139', 200.0, 300.0, '1771440667', '120'),
    84     'jamb_regularization': ('140', 200.0, 300.0, '1771440667', '120'),
    85     'utme_registration': ('142', 6.0, 9.0, '1771440667', '120'),
    86     'utme_cbt': ('143', 6.0, 9.0, '1771440667', '120'),
    87     'nysc_id_card': ('144', 6.0, 9.0, '1771440667', '120'),
     55    'certificate': ('111', 200.0, 300.0, '0106259811', '10'),
     56    'state_result': ('112', 200.0, 300.0, '0106259811', '10'),
     57    'transcript_local': ('113', 200.0, 300.0, '0106259811', '10'),
     58    'transcript_foreign': ('114', 200.0, 300.0, '0106259811', '10'),
     59    'ver_result': ('115', 200.0, 300.0, '0106259811', '10'),
     60    'change_course': ('116', 200.0, 300.0, '0106259811', '10'),
     61    'change_inst': ('117', 200.0, 300.0, '0106259811', '10'),
     62    'jamb_reject': ('118', 200.0, 300.0, '0106259811', '10'),
     63    'cert_of_cert': ('119', 200.0, 300.0, '0106259811', '10'),
     64    'ref_let': ('120', 200.0, 300.0, '0106259811', '10'),
     65    'proc_cert': ('121', 200.0, 300.0, '0106259811', '10'),
     66    'loss_idcard': ('122', 6.0, 9.0, '0106259811', '10'),
     67    'loss_examcard': ('123', 3.0, 4.5, '0106259811', '10'),
     68    'loss_result': ('124', 200.0, 300.0, '0106259811', '10'),
     69    'loss_receipt': ('125', 200.0, 300.0, '0106259811', '10'),
     70    'loss_clearance': ('126', 200.0, 300.0, '0106259811', '10'),
     71    'conv_brochure': ('127', 200.0, 300.0, '0106259811', '10'),
     72    'hnd_certificate': ('128', 200.0, 300.0, '0106259811', '10'),
     73    'hnd_state_result': ('129', 200.0, 300.0, '0106259811', '10'),
     74    'hnd_transcript_local': ('130', 200.0, 300.0, '0106259811', '10'),
     75    'hnd_transcript_foreign': ('131', 200.0, 300.0, '0106259811', '10'),
     76    'staff_loss_idcard': ('132', 6.0, 9.0, '0106259811', '10'),
     77    'hnd_conv_brochure': ('133', 200.0, 300.0, '0106259811', '10'),
     78    'pgd_state_result': ('134', 200.0, 300.0, '0106259811', '10'),
     79    'pgd_conv_brochure': ('135', 200.0, 300.0, '0106259811', '10'),
     80    'pgd_certificate': ('136', 200.0, 300.0, '0106259811', '10'),
     81    'log_book': ('137', 3.0, 4.5, '0106259811', '10'),
     82    'pgd_transcript_foreign': ('138', 200.0, 300.0, '0106259811', '10'),
     83    'pgd_transcript_local': ('139', 200.0, 300.0, '0106259811', '10'),
     84    'jamb_regularization': ('140', 200.0, 300.0, '0106259811', '10'),
     85    'utme_registration': ('142', 6.0, 9.0, '0106259811', '10'),
     86    'utme_cbt': ('143', 6.0, 9.0, '0106259811', '10'),
     87    'nysc_id_card': ('144', 6.0, 9.0, '0106259811', '10'),
    8888    }
    8989
     
    121121        gateway_amt = GATEWAY_AMT
    122122        self.pay_item_id = '000'
    123         xmldict['institution_acct'] = "1751084083"
    124         xmldict['institution_bank_id'] = "120"
     123        xmldict['institution_acct'] = "0106259811"
     124        xmldict['institution_bank_id'] = "10"
    125125        if self.context.p_category == 'schoolfee':
    126126            self.pay_item_id = '101'
    127127            dalash_amt = 1800.0
    128128            provider_amt = 1200.0
    129             if not student.current_mode.endswith('_pt'):
     129            if not student.current_mode.endswith('_we'):
    130130                if xmldict['faculty'] in ('CPGS',):
    131                     xmldict['institution_acct'] = "1771586608"    #changed account no. from 1771180233
    132                     xmldict['institution_bank_id'] = '120'
     131                    xmldict['institution_acct'] = "0106259811"   
     132                    xmldict['institution_bank_id'] = '10'
    133133                elif xmldict['faculty'] in ('IAS',):
    134                     xmldict['institution_acct'] = "1771586608"  #Changed from FBN to SKYE Bank
    135                     xmldict['institution_bank_id'] = '120'
     134                    xmldict['institution_acct'] = "0106259811" 
     135                    xmldict['institution_bank_id'] = '10'
    136136                    self.pay_item_id = '107'
    137137                elif xmldict['faculty'] in ('IES',):
    138                     xmldict['institution_acct'] = "0693033406" #Changed from FBN to Access Bank
    139                     xmldict['institution_bank_id'] = '31'
     138                    xmldict['institution_acct'] = "0106259811"
     139                    xmldict['institution_bank_id'] = '10'
    140140                    self.pay_item_id = '109'
    141141                elif xmldict['faculty'] in ('IFMS',):
    142                     xmldict['institution_acct'] = "2013910271" #changed bank from GTBank to FBN
    143                     xmldict['institution_bank_id'] = '8'
     142                    xmldict['institution_acct'] = "0106259811"
     143                    xmldict['institution_bank_id'] = '10'
    144144                    self.pay_item_id = '106'
    145145                elif xmldict['faculty'] in ('IOT',):
    146                     xmldict['institution_acct'] = "0106259811"    #changed from SKYE Bank to GTbank
     146                    xmldict['institution_acct'] = "0106259811"   
    147147                    xmldict['institution_bank_id'] = '10'
    148148                    self.pay_item_id = '110'
    149149                elif xmldict['faculty'] in ('IICT',):
    150                     xmldict['institution_acct'] = "1100019929" #changed from FBN to Keystone Bank
    151                     xmldict['institution_bank_id'] = '123'
     150                    xmldict['institution_acct'] = "0106259811"
     151                    xmldict['institution_bank_id'] = '10'
    152152                    self.pay_item_id = '108'
    153153            else:
    154                 xmldict['institution_acct'] = "0838798020"  #part-time fees acquired by FCMB
    155                 xmldict['institution_bank_id'] = '76'
     154                xmldict['institution_acct'] = "0106259811" 
     155                xmldict['institution_bank_id'] = '10'
    156156                #Introduce a pay_item_id for part-time for the first time on this portal
    157157                self.pay_item_id = '145'
     
    166166        elif 'maintenance' in self.context.p_category:
    167167            self.pay_item_id = '102'
    168             xmldict['institution_acct'] = "0039050937"
    169             xmldict['institution_bank_id'] = '31'
     168            xmldict['institution_acct'] = "0106259811"
     169            xmldict['institution_bank_id'] = '10'
    170170            dalash_amt = 0.0
    171171            provider_amt = 0.0
     
    239239        xmldict['institution_bank_id'] = '00'
    240240        if self.applicant.applicant_id.startswith('hnd'):
    241             xmldict['institution_acct'] = '1771440667'
    242             xmldict['institution_bank_id'] = '120'
     241            xmldict['institution_acct'] = '0106259811'
     242            xmldict['institution_bank_id'] = '10'
    243243        elif self.applicant.applicant_id.startswith('nd'):
    244             xmldict['institution_acct'] = '1771440667'
    245             xmldict['institution_bank_id'] = '120'
     244            xmldict['institution_acct'] = '0106259811'
     245            xmldict['institution_bank_id'] = '10'
    246246        elif self.applicant.applicant_id.startswith('rmd'):
    247             xmldict['institution_acct'] = '1771440667'
    248             xmldict['institution_bank_id'] = '120'
     247            xmldict['institution_acct'] = '0106259811'
     248            xmldict['institution_bank_id'] = '10'
    249249        elif self.applicant.applicant_id.startswith('pgft'):
    250             xmldict['institution_acct'] = '1751084083'
    251             xmldict['institution_bank_id'] = '120'
     250            xmldict['institution_acct'] = '0106259811'
     251            xmldict['institution_bank_id'] = '10'
    252252        elif self.applicant.applicant_id.startswith('prejambites') or \
    253253            self.applicant.applicant_id.startswith('putme'):
    254             # reverting for prejambites to GTBank '0106259811' from FBN '2013910271'
    255254            xmldict['institution_acct'] = '0106259811'
    256255            xmldict['institution_bank_id'] = '10'
    257256            self.pay_item_id = '104'
    258             # Until 14/9/2014 we have not sent split amount data for pre applications.
    259             # To compenstate the loss we temporarily doubled the split amounts
    260             # until 20/9/2014, see ticket 75.
    261             #provider_amt = 600.0
    262             #dalash_amt = 400.0
    263257        elif self.applicant.applicant_id.startswith('pre'):
    264             # changed for pre-applicants from GTBank '0106259811' to Skye Bank '1771440667'
    265             xmldict['institution_acct'] = '1771440667'
    266             xmldict['institution_bank_id'] = '120'
    267             # Until 14/9/2014 we have not sent split amount data for pre applications.
    268             # To compenstate the loss we temporarily doubled the split amounts
    269             # until 20/9/2014, see ticket 75.
    270             #provider_amt = 600.0
    271             #dalash_amt = 400.0
     258            xmldict['institution_acct'] = '0106259811'
     259            xmldict['institution_bank_id'] = '10'
    272260        elif self.applicant.applicant_id.startswith('special'):
    273261            if self.context.p_category in SPECIAL_PAYMENT_PARAMS.keys():
  • main/waeup.kwarapoly/trunk/src/waeup/kwarapoly/interswitch/tests.py

    r13306 r13329  
    111111        self.assertMatches('...Amount Authorized...',
    112112                           self.browser.contents)
    113         self.assertMatches(
    114             '...<span>39400.0</span>...',
    115             self.browser.contents)
     113        self.assertTrue(
     114            '<span>39400.0</span>' in self.browser.contents)
    116115        self.payment_url = self.browser.url
    117116
     
    146145        self.browser.getLink(self.value).click()
    147146        self.assertMatches('...Amount Authorized...', self.browser.contents)
    148         self.assertMatches(
    149             '...<span>31500.0</span>...',
    150             self.browser.contents)
     147        self.assertTrue(
     148            '<span>31500.0</span>' in self.browser.contents)
    151149        self.payment_url = self.browser.url
    152150
     
    166164            self.browser.contents)
    167165        self.assertTrue(
    168             'item_name="School Fee" item_amt="2820000" bank_id="120" acct_num="1771586608"' in
     166            'item_name="School Fee" item_amt="2820000" bank_id="10" acct_num="0106259811"' in
    169167            self.browser.contents)
    170168        self.assertTrue(
     
    208206                           self.browser.contents)
    209207        # Maint fee is taken from the hostel object
    210         self.assertMatches(
    211             '...<span>876.0</span>...',
    212             self.browser.contents)
     208        self.assertTrue('<span>876.0</span>' in self.browser.contents)
    213209        self.payment_url = self.browser.url
    214210        # Manager can access InterswitchForm
     
    222218        self.assertMatches('...Total Amount Authorized:...',
    223219                           self.browser.contents)
    224         self.assertMatches(
    225             '...<input type="hidden" name="pay_item_id" value="102" />...',
    226             self.browser.contents)
    227         self.assertMatches(
    228             '...<input type="hidden" name="amount" value="87600" />...',
    229             self.browser.contents)
    230         self.assertMatches(
    231             '...item_name="Hostel Maintenance" item_amt="57600" bank_id="31" acct_num="0039050937"...',
     220        self.assertTrue(
     221            '<input type="hidden" name="pay_item_id" value="102" />' in
     222            self.browser.contents)
     223        self.assertTrue(
     224            '<input type="hidden" name="amount" value="87600" />' in
     225            self.browser.contents)
     226        self.assertTrue(
     227            'item_name="Hostel Maintenance" item_amt="57600" bank_id="10" acct_num="0106259811"' in
    232228            self.browser.contents)
    233229
     
    239235        value = ctrl.options[2]
    240236        self.browser.getLink(value).click()
    241         self.assertMatches(
    242             '...<span>6000.0</span>...',
    243             self.browser.contents)
     237        self.assertTrue('<span>6000.0</span>' in self.browser.contents)
    244238        # Manager can access InterswitchForm
    245239        self.browser.getLink("CollegePAY", index=0).click()
     
    248242        self.assertEqual(self.student['payments'][self.value].gateway_amt, 300.0)
    249243        self.assertEqual(self.student['payments'][self.value].thirdparty_amt, 1800.0)
    250         self.assertMatches('...<input type="hidden" name="pay_item_id" value="101" />...',
     244        self.assertTrue('<input type="hidden" name="pay_item_id" value="101" />' in
    251245                           self.browser.contents)
    252246        self.assertMatches('...Total Amount Authorized:...',
    253247                           self.browser.contents)
    254         self.assertMatches(
    255             '...<input type="hidden" name="amount" value="600000" />...',
    256             self.browser.contents)
    257         self.assertMatches(
    258             '...item_name="School Fee" item_amt="270000" bank_id="120" acct_num="1771586608"...',
    259             self.browser.contents)
    260         self.assertMatches(
    261             '...item_name="Dalash" item_amt="180000" bank_id="117" acct_num="1013196791"...',
    262             self.browser.contents)
    263         self.assertMatches(
    264             '...item_name="BT Education" item_amt="120000" bank_id="117" acct_num="1010764827"...',
     248        self.assertTrue(
     249            '<input type="hidden" name="amount" value="600000" />' in
     250            self.browser.contents)
     251        self.assertTrue(
     252            'item_name="School Fee" item_amt="270000" bank_id="10" acct_num="0106259811"' in
     253            self.browser.contents)
     254        self.assertTrue(
     255            'item_name="Dalash" item_amt="180000" bank_id="117" acct_num="1013196791"' in
     256            self.browser.contents)
     257        self.assertTrue(
     258            'item_name="BT Education" item_amt="120000" bank_id="117" acct_num="1010764827"' in
    265259            self.browser.contents)
    266260
     
    278272        self.browser.getLink(value).click()
    279273        self.assertMatches('...Amount Authorized...', self.browser.contents)
    280         self.assertMatches(
    281             '...<span>6800.0</span>...', self.browser.contents)
     274        self.assertTrue('<span>6800.0</span>' in self.browser.contents)
    282275        self.browser.getLink("CollegePAY", index=0).click()
    283276        self.assertEqual(self.student['payments'][value].amount_auth, 6800.0)
     
    294287        self.browser.getLink(value).click()
    295288        self.assertMatches('...Amount Authorized...', self.browser.contents)
    296         self.assertMatches(
    297             '...<span>5000.0</span>...', self.browser.contents)
     289        self.assertTrue('<span>5000.0</span>' in self.browser.contents)
    298290        self.payment_url = self.browser.url
    299291        self.browser.getLink("CollegePAY", index=0).click()
     
    311303        self.browser.getLink(value).click()
    312304        self.assertMatches('...Amount Authorized...', self.browser.contents)
    313         self.assertMatches(
    314             '...<span>1015.0</span>...', self.browser.contents)
     305        self.assertTrue(
     306            '<span>1015.0</span>' in self.browser.contents)
    315307        self.payment_url = self.browser.url
    316308        self.browser.getLink("CollegePAY", index=0).click()
     
    328320        self.browser.getLink(value).click()
    329321        self.assertMatches('...Amount Authorized...', self.browser.contents)
    330         self.assertMatches(
    331             '...<span>500.0</span>...', self.browser.contents)
     322        self.assertTrue('<span>500.0</span>' in self.browser.contents)
    332323        self.payment_url = self.browser.url
    333324        self.browser.getLink("CollegePAY", index=0).click()
     
    345336        self.browser.getLink(value).click()
    346337        self.assertMatches('...Amount Authorized...', self.browser.contents)
    347         self.assertMatches(
    348             '...<span>6000.0</span>...', self.browser.contents)
     338        self.assertTrue('<span>6000.0</span>' in self.browser.contents)
    349339        self.payment_url = self.browser.url
    350340        self.browser.getLink("CollegePAY", index=0).click()
     
    362352        self.browser.getLink(value).click()
    363353        self.assertMatches('...Amount Authorized...', self.browser.contents)
    364         self.assertMatches(
    365             '...<span>7000.0</span>...', self.browser.contents)
     354        self.assertTrue('<span>7000.0</span>' in self.browser.contents)
    366355        self.payment_url = self.browser.url
    367356        self.browser.getLink("CollegePAY", index=0).click()
     
    379368        self.browser.getLink(value).click()
    380369        self.assertMatches('...Amount Authorized...', self.browser.contents)
    381         self.assertMatches(
    382             '...<span>1900.0</span>...', self.browser.contents)
     370        self.assertTrue('<span>1900.0</span>' in self.browser.contents)
    383371        self.payment_url = self.browser.url
    384372        self.browser.getLink("CollegePAY", index=0).click()
     
    400388        self.browser.open(self.payments_path + '/xyz')
    401389        self.browser.getLink("CollegePAY", index=0).click()
    402         self.assertMatches('...<input type="hidden" name="pay_item_id" value="000" />...',
    403                            self.browser.contents)
     390        self.assertTrue('<input type="hidden" name="pay_item_id" value="000" />'
     391                           in self.browser.contents)
    404392        self.assertMatches('...Total Amount Authorized:...',
    405393                           self.browser.contents)
    406394        self.assertEqual(self.student.current_mode, 'nd_ft')
    407         self.assertMatches(
    408             '...<input type="hidden" name="amount" value="87600" />...',
     395        self.assertTrue(
     396            '<input type="hidden" name="amount" value="87600" />' in
    409397            self.browser.contents)
    410398        delta = timedelta(days=8)
     
    546534        self.assertMatches('...Amount Authorized...',
    547535                           self.browser.contents)
    548         self.assertMatches(
    549             '...<span>3333.0</span>...',
    550             self.browser.contents)
     536        self.assertTrue('<span>3333.0</span>' in self.browser.contents)
    551537        self.payment_url = self.browser.url
    552538
     
    563549        self.assertTrue(
    564550            '<item_detail item_id="1" item_name="Application" '
    565             'item_amt="253300" bank_id="120" acct_num="1771440667" />'
     551            'item_amt="253300" bank_id="10" acct_num="0106259811" />'
    566552            in self.browser.contents)
    567553
     
    575561        self.assertTrue(
    576562            '<item_detail item_id="1" item_name="Application" '
    577             'item_amt="253300" bank_id="120" acct_num="1771440667" />'
     563            'item_amt="253300" bank_id="10" acct_num="0106259811" />'
    578564            in self.browser.contents)
    579565        # Commission or bribe?
     
    596582        self.assertTrue(
    597583            '<item_detail item_id="1" item_name="Application" '
    598             'item_amt="253300" bank_id="120" acct_num="1771440667" />'
     584            'item_amt="253300" bank_id="10" acct_num="0106259811" />'
    599585            in self.browser.contents)
    600586        # No 'commission', no provider fee in 2013
     
    671657        self.assertTrue(
    672658            '<item_detail item_id="1" item_name="Application" '
    673             'item_amt="253300" bank_id="120" acct_num="1771440667" />'
     659            'item_amt="253300" bank_id="10" acct_num="0106259811" />'
    674660            in self.browser.contents)
    675661        delta = timedelta(days=8)
     
    721707        self.assertTrue(
    722708            '<item_detail item_id="1" item_name="ND Transcript (local)" '
    723             'item_amt="450000" bank_id="120" acct_num="1771440667" />'
     709            'item_amt="450000" bank_id="10" acct_num="0106259811" />'
    724710            in self.browser.contents)
    725711
     
    734720        self.assertTrue(
    735721            '<item_detail item_id="1" item_name="Log Book" '
    736             'item_amt="55444" bank_id="120" acct_num="1771440667" />'
     722            'item_amt="55444" bank_id="10" acct_num="0106259811" />'
    737723            in self.browser.contents)
    738724
Note: See TracChangeset for help on using the changeset viewer.