Changeset 14795


Ignore:
Timestamp:
13 Aug 2017, 06:00:51 (7 years ago)
Author:
Henrik Bettermann
Message:

Configure serviceTypeId (school fees only for testing).

File:
1 edited

Legend:

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

    r14792 r14795  
    2828
    2929# Temporarily we can use the test portal like in kofacustom.nigeria
    30 MERCHANTID = '2547916'
    31 HOST = 'www.remitademo.net'
    32 HTTPS = False
    33 API_KEY = '1946'
     30MERCHANTID = '2067163382'
     31HOST = 'login.remita.net'
     32HTTPS = True
     33API_KEY = '309418'
    3434SERVICETYPEID = '4430731'
    3535
     
    4343    https = HTTPS
    4444    api_key = API_KEY
    45     serviceTypeId = SERVICETYPEID
    4645
    4746class CustomRemitaVerifyPaymentStatusPageStudent(
     
    6362    https = HTTPS
    6463    api_key = API_KEY
    65     serviceTypeId = SERVICETYPEID
    6664
    6765    init_url = '/remita/ecomm/split/init.reg'
     
    6967
    7068    @property
    71     def lineitems(self):
     69    def serviceTypeId(self):
     70        student = self.context.student
     71        if self.context.p_category == 'schoolfee':
     72            if student.current_mode.startswith('dp_'):
     73                return '2067090482'
     74            if student.current_mode == 'pg_ft':
     75                return '2067090691'
     76            if student.current_mode == 'pg_pt':
     77                return '2067091011'
     78            if student.current_mode == 'ug_sw':
     79                return '2066967204'
     80            if student.current_mode == 'ug_ft':
     81                return '2067091395'
     82            if student.current_mode == 'ug_pt':
     83                return '2067091679'
     84            if student.faccode == 'JUPEB':
     85                return '1946888188'
     86        return ''
     87
     88    @property
     89    def demo_lineitems(self):
    7290        ba1 = self.context.amount_auth / 2
    7391        ba2 = self.context.amount_auth / 2
     
    88106
    89107    @property
    90     def live_lineitems(self):
     108    def lineitems(self):
    91109        provider_amt = 0.0
    92110        if self.context.p_category == 'schoolfee' and \
     
    134152    https = HTTPS
    135153    api_key = API_KEY
    136     serviceTypeId = SERVICETYPEID
    137154
    138155class CustomRemitaVerifyPaymentStatusPageApplicant(
     
    154171    https = HTTPS
    155172    api_key = API_KEY
    156     serviceTypeId = SERVICETYPEID
    157173
    158174    init_url = '/remita/ecomm/split/init.reg'
    159175    action = 'http://www.remitademo.net/remita/ecomm/finalize.reg'
     176
     177    @property
     178    def serviceTypeId(self):
     179        return SERVICETYPEID
    160180
    161181    @property
Note: See TracChangeset for help on using the changeset viewer.