Ignore:
Timestamp:
4 Feb 2018, 06:58:00 (7 years ago)
Author:
Henrik Bettermann
Message:

Use only TSA account.

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

Legend:

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

    r14920 r14945  
    106106        xmldict['institution_name'] = INSTITUTION_NAME
    107107
    108         if self.applicant.applicant_id.startswith('ijmbe'):
    109             xmldict['institution_acct'] = '1010827641'
    110             xmldict['institution_bank_id'] = '117'
    111 
    112         if self.applicant.applicant_id.startswith('trans'):
    113             xmldict['institution_acct'] = '1010827641'
    114             xmldict['institution_bank_id'] = '117'
    115 
    116         if self.applicant.applicant_id.startswith('cert'):
    117             xmldict['institution_acct'] = '1010827641'
    118             xmldict['institution_bank_id'] = '117'
    119 
    120108        if self.applicant.applicant_id.startswith('pg'):
    121109            handbook_amount = 2000.0
     
    127115<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" />
    128116<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" />
    129 <item_detail item_id="3" item_name="PG Handbook" item_amt="%(handbook_amount)d" bank_id="117" acct_num="1014270207" />
     117<item_detail item_id="3" item_name="PG Handbook" item_amt="%(handbook_amount)d" bank_id="117" acct_num="1010827641" />
    130118</item_details>
    131119</payment_item_detail>""" % xmldict
     
    179167    def update(self):
    180168        error = self.init_update()
    181 
    182         ######################################
    183         #error = 'Sorry, Interswitch payments are temporarily disabled.'
    184         ######################################
    185169
    186170        if error:
     
    228212        xmldict = self.xmldict
    229213        xmltext = ""
    230         # Provider data
     214        xmldict['institution_acct'] = '1010827641'
     215        xmldict['institution_bank_id'] = '117'
    231216        xmldict['detail_ref'] = self.context.p_id
    232217        xmldict['provider_acct'] = PROVIDER_ACCT
     
    248233                student_welfare_assurance_amt = gateway_net_amt(
    249234                    academic_session.welfare_fee)
    250                 xmldict['institution_bank_id'] = '117'
    251                 xmldict['institution_acct'] = '1010827641'
    252                 xmldict['student_union_bank_id'] = '31'
    253                 xmldict['student_union_acct'] = '0051005007'
     235                xmldict['student_union_bank_id'] = '117'
     236                xmldict['student_union_acct'] = '1010827641'
    254237                xmldict['aaue_share_bank_id'] = '117'
    255238                xmldict['aaue_share_acct'] = '1010827641'
     
    269252                student_welfare_assurance_amt = gateway_net_amt(
    270253                    academic_session.welfare_fee)
    271                 xmldict['institution_bank_id'] = '117'
    272                 xmldict['institution_acct'] = '1010827641'
    273                 xmldict['student_union_bank_id'] = '7'
    274                 xmldict['student_union_acct'] = '1019763348'
     254                xmldict['student_union_bank_id'] = '117'
     255                xmldict['student_union_acct'] = '1010827641'
    275256                xmldict['aaue_share_bank_id'] = '117'
    276257                xmldict['aaue_share_acct'] = '1010827641'
     
    279260                self.pay_item_id = '107'
    280261                if student.is_postgrad:
    281                     xmldict['institution_bank_id'] = '117'
    282                     xmldict['institution_acct'] = '1010827641'
    283262                    self.pay_item_id = '111'
    284263                if student.current_mode == 'ijmbe':
    285                     xmldict['institution_bank_id'] = '117'
    286                     xmldict['institution_acct'] = '1010827641'
    287264                    self.pay_item_id = '119'
    288265                    xmldict['joint_venture_bank_id'] = '117'
    289                     xmldict['joint_venture_acct'] = '1014066969'
     266                    xmldict['joint_venture_acct'] = '1010827641'
    290267
    291268            xmldict['provider_amt'] = 100 * provider_amt
     
    295272                xmldict['institution_amt'] = 100 * (
    296273                    gateway_net_amt(self.context.amount_auth))
    297                 xmltext = """<payment_item_detail>
    298 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    299 <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" />
    300 </item_details>
    301 </payment_item_detail>""" % xmldict
    302274            elif self.context.p_category in ('schoolfee_incl', 'schoolfee_1'):
    303275                # Schoolfee including additional fees
     
    318290<item_detail item_id="4" item_name="AAUE Share" item_amt="%(aaue_share_amt)d" bank_id="%(aaue_share_bank_id)s" acct_num="%(aaue_share_acct)s" />
    319291<item_detail item_id="5" item_name="Student Union" item_amt="%(student_union_due_amt)d" bank_id="%(student_union_bank_id)s" acct_num="%(student_union_acct)s" />
    320 <item_detail item_id="6" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="123" acct_num="1006407792" />
     292<item_detail item_id="6" item_name="Student Welfare Assurance" item_amt="%(student_welfare_assurance_amt)d" bank_id="117" acct_num="1010827641" />
    321293</item_details>
    322294</payment_item_detail>""" % xmldict
     
    346318                else:
    347319                    self.pay_item_id = '104'
    348                 xmldict['institution_acct'] = '1010827641'
    349                 xmldict['institution_bank_id'] = '117'
    350320            else:
    351321                # Second agreement
    352322                self.pay_item_id = '102'
    353                 xmldict['institution_acct'] = '1010827641'
    354                 xmldict['institution_bank_id'] = '117'
    355323                if student.is_postgrad:
    356                     xmldict['institution_bank_id'] = '117'
    357                     xmldict['institution_acct'] = '1010827641'
    358324                    self.pay_item_id = '110'
    359325                if student.current_mode == 'ijmbe':
    360                     xmldict['institution_bank_id'] = '117'
    361                     xmldict['institution_acct'] = '1010827641'
    362326                    self.pay_item_id = '120'
    363327
     
    376340<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" />
    377341<item_detail item_id="2" item_name="Matriculation Gown Fee" item_amt="%(gown_fee_amt)d" bank_id="117" acct_num="1010827641" />
    378 <item_detail item_id="3" item_name="AAU File-Lapel Fee" item_amt="%(aaue_lf_fee_amt)d" bank_id="51" acct_num="4010660109" />
     342<item_detail item_id="3" item_name="AAU File-Lapel Fee" item_amt="%(aaue_lf_fee_amt)d" bank_id="117" acct_num="1010827641" />
    379343</item_details>
    380344</payment_item_detail>""" % xmldict
     
    384348                xmldict['institution_amt'] = 100 * (
    385349                    gateway_net_amt(self.context.amount_auth))
    386                 xmltext = """<payment_item_detail>
    387 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    388 <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" />
    389 </item_details>
    390 </payment_item_detail>""" % xmldict
    391350
    392351        # Union Dues
    393352        elif self.context.p_category == 'union':
    394353            self.pay_item_id = '103'
    395             if contr_agreement_student(student) == 'first':
    396                 # First agreement
    397                 xmldict['institution_acct'] = '0051005007'
    398                 xmldict['institution_bank_id'] = '31'
    399             else:
    400                 # Second agreement
    401                 xmldict['institution_bank_id'] = '7'
    402                 xmldict['institution_acct'] = '1019763348'
    403             xmldict['institution_amt'] = 100 * (
    404                 gateway_net_amt(self.context.amount_auth))
    405             xmltext = """<payment_item_detail>
    406 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    407 <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" />
    408 </item_details>
    409 </payment_item_detail>""" % xmldict
     354            xmldict['institution_amt'] = 100 * (
     355                gateway_net_amt(self.context.amount_auth))
    410356
    411357        # Lapel/File
    412358        elif self.context.p_category == 'lapel':
    413359            self.pay_item_id = '104'
    414             xmldict['institution_acct'] = '4010660109'
    415             xmldict['institution_bank_id'] = '51'
    416             xmldict['institution_amt'] = 100 * (
    417                 gateway_net_amt(self.context.amount_auth))
    418             xmltext = """<payment_item_detail>
    419 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    420 <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" />
    421 </item_details>
    422 </payment_item_detail>""" % xmldict
     360            xmldict['institution_amt'] = 100 * (
     361                gateway_net_amt(self.context.amount_auth))
    423362
    424363        # Welfare Assurance
    425364        elif self.context.p_category == 'welfare':
    426365            self.pay_item_id = '105'
    427             xmldict['institution_acct'] = '1006407792'
    428             xmldict['institution_bank_id'] = '123'
    429             xmldict['institution_amt'] = 100 * (
    430                 gateway_net_amt(self.context.amount_auth))
    431             xmltext = """<payment_item_detail>
    432 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    433 <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" />
    434 </item_details>
    435 </payment_item_detail>""" % xmldict
     366            xmldict['institution_amt'] = 100 * (
     367                gateway_net_amt(self.context.amount_auth))
    436368
    437369        # ID Card
    438370        elif self.context.p_category == 'id_card':
    439371            self.pay_item_id = '000'
    440             xmldict['institution_acct'] = '1010827641'
    441             xmldict['institution_bank_id'] = '117'
    442             xmldict['institution_amt'] = 100 * (
    443                 gateway_net_amt(self.context.amount_auth))
    444             xmltext = """<payment_item_detail>
    445 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    446 <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" />
    447 </item_details>
    448 </payment_item_detail>""" % xmldict
     372            xmldict['institution_amt'] = 100 * (
     373                gateway_net_amt(self.context.amount_auth))
    449374
    450375        # Matric Gown
    451376        elif self.context.p_category == 'matric_gown':
    452377            self.pay_item_id = '106'
    453             xmldict['institution_acct'] = '1010827641'
    454             xmldict['institution_bank_id'] = '117'
    455             xmldict['institution_amt'] = 100 * (
    456                 gateway_net_amt(self.context.amount_auth))
    457             xmltext = """<payment_item_detail>
    458 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    459 <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" />
    460 </item_details>
    461 </payment_item_detail>""" % xmldict
     378            xmldict['institution_amt'] = 100 * (
     379                gateway_net_amt(self.context.amount_auth))
    462380
    463381        # Concessional
    464382        elif self.context.p_category == 'concessional':
    465383            self.pay_item_id = '107'
    466             xmldict['institution_acct'] = '1010827641'
    467             xmldict['institution_bank_id'] = '117'
    468             xmldict['institution_amt'] = 100 * (
    469                 gateway_net_amt(self.context.amount_auth))
    470             xmltext = """<payment_item_detail>
    471 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    472 <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" />
    473 </item_details>
    474 </payment_item_detail>""" % xmldict
     384            xmldict['institution_amt'] = 100 * (
     385                gateway_net_amt(self.context.amount_auth))
    475386
    476387        # Hostel Maintenance
     
    479390            self.pay_item_id = '109'
    480391            xmldict['provider_amt'] = 100 * provider_amt
    481             xmldict['institution_acct'] = '1010827641'
    482             xmldict['institution_bank_id'] = '117'
    483392            xmldict['institution_amt'] = 100 * (
    484393                gateway_net_amt(self.context.amount_auth) - provider_amt)
     
    496405            else:
    497406                self.pay_item_id = '116'
    498             xmldict['institution_acct'] = '1010893123'
    499             xmldict['institution_bank_id'] = '117'
    500             xmldict['institution_amt'] = 100 * (
    501                 gateway_net_amt(self.context.amount_auth))
    502             xmltext = """<payment_item_detail>
    503 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    504 <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" />
    505 </item_details>
    506 </payment_item_detail>""" % xmldict
     407            xmldict['institution_amt'] = 100 * (
     408                gateway_net_amt(self.context.amount_auth))
    507409
    508410        # ENT Fees
     
    512414            else:
    513415                self.pay_item_id = '118'
    514             xmldict['institution_acct'] = '6220029828'
    515             xmldict['institution_bank_id'] = '51'
    516             xmldict['institution_amt'] = 100 * (
    517                 gateway_net_amt(self.context.amount_auth))
    518             xmltext = """<payment_item_detail>
    519 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    520 <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" />
    521 </item_details>
    522 </payment_item_detail>""" % xmldict
     416            xmldict['institution_amt'] = 100 * (
     417                gateway_net_amt(self.context.amount_auth))
    523418
    524419        # Faculty and Departmental Dues
    525420        elif self.context.p_category == 'fac_dep':
    526421            self.pay_item_id = '117'
    527             xmldict['institution_acct'] = '1010827641'
    528             xmldict['institution_bank_id'] = '117'
    529             xmldict['institution_amt'] = 100 * (
    530                 gateway_net_amt(self.context.amount_auth))
    531             xmltext = """<payment_item_detail>
    532 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    533 <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" />
    534 </item_details>
    535 </payment_item_detail>""" % xmldict
     422            xmldict['institution_amt'] = 100 * (
     423                gateway_net_amt(self.context.amount_auth))
    536424
    537425        # Restitution Fee
    538426        elif self.context.p_category == 'restitution':
    539427            self.pay_item_id = '117'
    540             xmldict['institution_acct'] = '0772002144'
    541             xmldict['institution_bank_id'] = '47'
    542             xmldict['institution_amt'] = 100 * (
    543                 gateway_net_amt(self.context.amount_auth))
    544             xmltext = """<payment_item_detail>
    545 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    546 <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" />
    547 </item_details>
    548 </payment_item_detail>""" % xmldict
     428            xmldict['institution_amt'] = 100 * (
     429                gateway_net_amt(self.context.amount_auth))
    549430
    550431        # Late Registration Fee
     
    554435            else:
    555436                self.pay_item_id = '123'
    556             xmldict['institution_acct'] = '1010827641'
    557             xmldict['institution_bank_id'] = '117'
    558             xmldict['institution_amt'] = 100 * (
    559                 gateway_net_amt(self.context.amount_auth))
     437            xmldict['institution_amt'] = 100 * (
     438                gateway_net_amt(self.context.amount_auth))
     439
     440        if not xmltext:
    560441            xmltext = """<payment_item_detail>
    561442<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
     
    563444</item_details>
    564445</payment_item_detail>""" % xmldict
    565 
    566446        self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
    567447        self.context.provider_amt = provider_amt
  • main/waeup.aaue/trunk/src/waeup/aaue/interswitch/tests.py

    r14920 r14945  
    115115            in self.browser.contents)
    116116        self.assertTrue(
    117             'item_name="PG Handbook" item_amt="200000" bank_id="117" acct_num="1014270207"'
     117            'item_name="PG Handbook" item_amt="200000" bank_id="117" acct_num="1010827641"'
    118118            in self.browser.contents)
    119119        self.assertTrue(
     
    147147        self.assertTrue(
    148148            'item_name="Application Fee" item_amt="575000" bank_id="117" acct_num="1010827641"'
    149             in self.browser.contents)
    150         self.assertFalse(
    151             'item_name="Screening Guide" item_amt="200000" bank_id="117" acct_num="1013879579"'
    152149            in self.browser.contents)
    153150        self.assertTrue(
Note: See TracChangeset for help on using the changeset viewer.