Changeset 10174 for main


Ignore:
Timestamp:
12 May 2013, 07:47:09 (12 years ago)
Author:
Henrik Bettermann
Message:

Configure Interswitch payment.

Location:
main/waeup.aaua/trunk/src/waeup/aaua/interswitch
Files:
1 added
1 deleted
2 edited

Legend:

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

    r10120 r10174  
    7474    currency = CURRENCY
    7575    product_id = PRODUCT_ID
    76     mac = 'E6BA6CBBA9AF2871EE25C32C8D57C98895B9B001DC5B9CB2C463E2A9BDA44A3F1260C8A364F33789CDF74CB3EE7E6EF5D94F48D3AF7B727E75D97F07618DFA6D'
     76    #mac = ''
    7777
    7878    def interswitch_img_url(self):
     
    112112        xmldict['institution_name'] = INSTITUTION_NAME
    113113        self.pay_item_id = '000'
    114         if self.context.p_category == 'schoolfee':
     114        if self.context.p_category in ('schoolfee', 'schoolfee_1', 'schoolfee_2'):
    115115            provider_amt = 3000.0
    116116            xmldict['provider_amt'] = 100 * provider_amt
     
    119119                self.context.amount_auth - provider_amt -
    120120                GATEWAY_AMT)
     121            if student.current_mode.endswith('_pt'):
     122                xmldict['institution_acct'] = "0321100000000046"
     123                xmldict['institution_bank_id'] = "89"
     124            elif student.current_mode.endswith('_sw'):
     125                xmldict['institution_acct'] = "2461770000021"
     126                xmldict['institution_bank_id'] = "120"
    121127
    122         hashargs = (
    123             self.context.p_id +
    124             PRODUCT_ID +
    125             self.pay_item_id +
    126             str(int(self.amount_auth)) +
    127             self.site_redirect_url +
    128             self.mac)
    129         self.hashvalue = hashlib.sha512(hashargs).hexdigest()
     128        #hashargs = (
     129        #    self.context.p_id +
     130        #    PRODUCT_ID +
     131        #    self.pay_item_id +
     132        #    str(int(self.amount_auth)) +
     133        #    self.site_redirect_url +
     134        #    self.mac)
     135        #self.hashvalue = hashlib.sha512(hashargs).hexdigest()
    130136
    131137        # Interswitch amount is not part of the xml data
    132138
    133         if self.context.p_category == 'schoolfee':
     139        if self.context.p_category in ('schoolfee', 'schoolfee_1', 'schoolfee_2'):
    134140            xmltext = """<payment_item_detail>
    135141<item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
  • main/waeup.aaua/trunk/src/waeup/aaua/interswitch/browser_templates/student_goto_interswitch.pt

    r10120 r10174  
    5959  <input type="hidden" name="currency" tal:attributes="value view/currency" />
    6060  <input type="hidden" name="pay_item_id" tal:attributes="value view/pay_item_id" />
    61   <input type="hidden" name="hash" tal:attributes="value view/hashvalue" />
    6261  <input type="hidden" name="site_redirect_url" tal:attributes="value view/site_redirect_url" />
    6362  <input type="hidden" name="site_name" tal:attributes="value view/site_name" />
Note: See TracChangeset for help on using the changeset viewer.