Changeset 16638 for main


Ignore:
Timestamp:
24 Sep 2021, 09:02:38 (3 years ago)
Author:
Henrik Bettermann
Message:

Configure split payment.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.edocons/trunk/src/kofacustom/edocons/interswitch/browser.py

    r16635 r16638  
    3131from kofacustom.edocons.interfaces import MessageFactory as _
    3232
    33 PRODUCT_ID = '6207' # must be provided by Interswitch
     33PRODUCT_ID = '22133007' # must be provided by Interswitch
    3434SITE_NAME = 'edocons.waeup.org'
    35 PROVIDER_ACCT = '0773411069'
    36 PROVIDER_BANK_ID = '31'
     35PROVIDER_ACCT = '0213065415'
     36PROVIDER_BANK_ID = '47'
    3737PROVIDER_ITEM_NAME = 'WAeAC'
    3838INSTITUTION_NAME = 'EDOCONS'
    3939CURRENCY = '566'
    4040GATEWAY_AMT = 300.0
    41 MAC = 'CEF793CBBE838AA0CBB29B74D571113B4EA6586D3BA77E7CFA0B95E278364EFC4526ED7BD255A366CDDE11F1F607F0F844B09D93B16F7CFE87563B2272007AB3' # must be provided by Interswitch
    42 
    43 #POST_ACTION = 'https://webpay.interswitchng.com/paydirect/pay'
    44 POST_ACTION = 'https://sandbox.interswitchng.com/webpay/pay'
    45 #HOST = 'webpay.interswitchng.com'
    46 HOST = 'sandbox.interswitchng.com'
    47 #URL = '/paydirect/api/v1/gettransaction.json'
    48 URL = '/webpay/api/v1/gettransaction.json'
     41#MAC = 'CEF793CBBE838AA0CBB29B74D571113B4EA6586D3BA77E7CFA0B95E278364EFC4526ED7BD255A366CDDE11F1F607F0F844B09D93B16F7CFE87563B2272007AB3' # must be provided by Interswitch
     42MAC ='chSVbuS0CN6yg08QaX2DrlhjOpGqtxd3JojMrIrpPMArNQx4C2AcczZyGjXnhmHGzfiHe9diKGB8fTIIzifzpv20a28EYOLqdWDaB2uMyxwrnTf3ncbOx35gLIavrx1r '
     43
     44POST_ACTION = 'https://webpay.interswitchng.com/collections/w/pay'
     45#POST_ACTION = 'https://sandbox.interswitchng.com/webpay/pay'
     46HOST = 'webpay.interswitchng.com'
     47#HOST = 'sandbox.interswitchng.com'
     48URL = '/collections/api/v1/gettransaction.json'
     49#URL = '/webpay/api/v1/gettransaction.json'
    4950
    5051httplib.HTTPSConnection.debuglevel = 0
     
    134135    site_name = SITE_NAME
    135136    currency = CURRENCY
    136     pay_item_id = '101' # must be provided by Interswitch
     137    pay_item_id = 'Default_Payable_MX26002' # must be provided by Interswitch
    137138    product_id = PRODUCT_ID
    138139    mac = MAC
     
    158159            self.context.r_company = u'interswitch'
    159160        xmldict = {}
    160         provider_amt = 400.0
    161         xmldict['institution_acct'] = '00000000000'
    162         xmldict['institution_bank_id'] = '00'
     161        provider_amt = 500.0
     162        xmldict['institution_acct'] = '1489560452'
     163        xmldict['institution_bank_id'] = '31'
    163164        xmldict['detail_ref'] = self.context.p_id
    164165        xmldict['provider_amt'] = 100 * provider_amt
     
    168169        xmldict['institution_item_name'] = self.context.category
    169170        xmldict['institution_name'] = INSTITUTION_NAME
    170         xmldict['institution_amt'] = 100 * self.context.net_amt
     171        midwife_amt = 200.0
     172        xmldict['midwife_amt'] = 100 * midwife_amt
     173        xmldict['institution_amt'] = 100 * (self.context.net_amt - midwife_amt)
    171174        if not self.context.provider_amt:
    172175            self.context.provider_amt = provider_amt
     
    176179<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" />
    177180<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" />
     181<item_detail item_id="3" item_name="Nursing and Midwifery Committee" item_amt="%(midwife_amt)d" bank_id="8" acct_num="2004854377" />
    178182</item_details>
    179183</payment_item_detail>""" % xmldict
Note: See TracChangeset for help on using the changeset viewer.