Ignore:
Timestamp:
21 Dec 2018, 12:44:30 (6 years ago)
Author:
Henrik Bettermann
Message:

Setup live gateway configuration.

File:
1 edited

Legend:

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

    r15271 r15281  
    2929# Temporarily we can use the test portal like in kofacustom.nigeria
    3030
    31 from kofacustom.nigeria.remita.tests import (
    32     MERCHANTID, HOST, HTTPS, API_KEY, SERVICETYPEID)
     31#from kofacustom.nigeria.remita.tests import (
     32#    MERCHANTID, HOST, HTTPS, API_KEY, SERVICETYPEID)
    3333
    34 #MERCHANTID = ''
    35 #HOST = 'login.remita.net'
    36 #HTTPS = True
    37 #API_KEY = ''
    38 #SERVICETYPEID = ''
     34MERCHANTID = '3534555222'
     35HOST = 'login.remita.net'
     36HTTPS = True
     37API_KEY = '756843'
     38SERVICETYPEID = '365039884'
     39
     40PROVIDER_ACCT = '0773411069'
     41PROVIDER_BANKCODE = '044'
     42INSTITUTION_ACCT = '0270100161017'
     43INSTITUTION_BANKCODE = '000'
    3944
    4045class CustomRemitaRequestPaymentStatusPageStudent(
     
    7580    @property
    7681    def lineitems(self):
    77         ba1 = self.context.amount_auth / 2
    78         ba2 = self.context.amount_auth / 2
    79         lineitems = (
    80                       {"lineItemsId":"itemid1","beneficiaryName":"Klaus Mueller",
    81                       "beneficiaryAccount":"6020067886","bankCode":"011",
    82                       "beneficiaryAmount":str(ba1),"deductFeeFrom":"1"},
    83                       {"lineItemsId":"itemid2","beneficiaryName":"Werner Rumm",
    84                       "beneficiaryAccount":"0360883515","bankCode":"050",
    85                       "beneficiaryAmount":str(ba2),"deductFeeFrom":"0"}
    86                     )
     82        provider_amt = 1600.0
     83        if 'maintenance' in self.context.p_category or \
     84            self.context.p_category == 'clearance':
     85            provider_amt = 0.0
     86        inst_amt = self.context.amount_auth - provider_amt
     87        if provider_amt:
     88            lineitems = (
     89                          {"lineItemsId":"itemid1","beneficiaryName":"FCEOkene",
     90                          "beneficiaryAccount":INSTITUTION_ACCT,
     91                          "bankCode":INSTITUTION_BANKCODE,
     92                          "beneficiaryAmount":inst_amt,"deductFeeFrom":"1"},
     93                          {"lineItemsId":"itemid2","beneficiaryName":"WAEAC",
     94                          "beneficiaryAccount":PROVIDER_ACCT,
     95                          "bankCode":PROVIDER_BANKCODE,
     96                          "beneficiaryAmount":provider_amt,"deductFeeFrom":"0"}
     97                        )
     98        else:
     99            lineitems = (
     100                          {"lineItemsId":"itemid1","beneficiaryName":"FCEOkene",
     101                          "beneficiaryAccount":inst_acct,"bankCode":inst_bankcode,
     102                          "beneficiaryAmount":inst_amt,"deductFeeFrom":"1"},
     103                        )
     104        self.context.provider_amt = provider_amt
    87105        return lineitems
    88106
     
    136154    @property
    137155    def lineitems(self):
     156        provider_amt = 500.0
     157        inst_amt = self.context.amount_auth - provider_amt
    138158        lineitems = (
    139                       {"lineItemsId":"itemid1","beneficiaryName":"Klaus Mueller",
    140                       "beneficiaryAccount":"6020067886","bankCode":"011",
    141                       "beneficiaryAmount":self.context.amount_auth/2,"deductFeeFrom":"1"},
    142                       {"lineItemsId":"itemid2","beneficiaryName":"Werner Rumm",
    143                       "beneficiaryAccount":"0360883515","bankCode":"050",
    144                       "beneficiaryAmount":self.context.amount_auth/2,"deductFeeFrom":"0"}
     159                          {"lineItemsId":"itemid1","beneficiaryName":"FCEOkene",
     160                          "beneficiaryAccount":INSTITUTION_ACCT,
     161                          "bankCode":INSTITUTION_BANKCODE,
     162                          "beneficiaryAmount":inst_amt,"deductFeeFrom":"1"},
     163                          {"lineItemsId":"itemid2","beneficiaryName":"WAEAC",
     164                          "beneficiaryAccount":PROVIDER_ACCT,
     165                          "bankCode":PROVIDER_BANKCODE,
     166                          "beneficiaryAmount":provider_amt,"deductFeeFrom":"0"}
    145167                    )
     168        self.context.provider_amt = provider_amt
    146169        return lineitems
    147170
Note: See TracChangeset for help on using the changeset viewer.