Ignore:
Timestamp:
14 Mar 2012, 09:35:47 (13 years ago)
Author:
Henrik Bettermann
Message:

Remove Interswitch view components. This is part of a typical Nigerian customization and should be in waeup.custom only.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py

    r7875 r7878  
    11091109        return
    11101110
    1111 class InterswitchPage(KofaPage):
    1112     """ View which sends a POST request to the Interswitch
    1113     CollegePAY payment gateway.
    1114     """
    1115     grok.context(IStudentOnlinePayment)
    1116     grok.name('goto_interswitch')
    1117     grok.template('goto_interswitch')
    1118     grok.require('waeup.payStudent')
    1119 
    1120     label = _('Submit data to CollegePAY (Interswitch Payment Gateway)')
    1121     submit_button = _('Submit')
    1122 
    1123     # Uniben product data (to be removed later)
    1124     product_id = '57'
    1125     currency = '566'
    1126     pay_item_id = '5700'
    1127 
    1128     action = 'https://testwebpay.interswitchng.com/test_paydirect/webpay/pay.aspx'
    1129     site_redirect_url = 'http://localhost?echo='
    1130     site_name = 'xyz.waeup.org'
    1131     provider_acct = '2345'
    1132     provider_bank_id = '8'
    1133     provider_item_name = 'Kofa Provider Fee'
    1134     institution_acct = '1234'
    1135     institution_bank_id = '9'
    1136     institution_name = 'Sample University'
    1137 
    1138     def update(self):
    1139         if self.context.p_state != 'unpaid':
    1140             self.flash(_("Payment ticket can't be re-send to CollegePAY."))
    1141             self.redirect(self.url(self.context, '@@index'))
    1142             return
    1143         xmldict = {}
    1144         self.student = self.context.getStudent()
    1145         self.amount = (self.context.amount_auth + self.context.surcharge_1 +
    1146             self.context.surcharge_2 + self.context.surcharge_3)
    1147         self.local_date_time = str(self.context.creation_date)
    1148         certificate = getattr(self.student['studycourse'],'certificate',None)
    1149         if certificate is not None:
    1150             xmldict['department'] = certificate.__parent__.__parent__.code
    1151             xmldict['faculty'] = certificate.__parent__.__parent__.__parent__.code
    1152         else:
    1153             xmldict['department'] = None
    1154             xmldict['faculty'] = None
    1155         xmldict['detail_ref'] = self.context.p_id
    1156         xmldict['provider_amt'] = self.context.surcharge_1
    1157         xmldict['provider_acct'] = self.provider_acct
    1158         xmldict['provider_bank_id'] = self.provider_bank_id
    1159         xmldict['provider_item_name'] = self.provider_item_name
    1160         xmldict['institution_amt'] = self.amount
    1161         xmldict['institution_acct'] = self.institution_acct
    1162         xmldict['institution_bank_id'] = self.institution_bank_id
    1163         xmldict['institution_item_name'] = self.context.p_category
    1164         xmldict['institution_name'] = self.institution_name
    1165         xmltext = """<payment_item_detail>
    1166 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s">
    1167 <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" />
    1168 <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" />
    1169 </item_details>
    1170 </payment_item_detail>""" % xmldict
    1171         self.xml_data = """<input type="hidden" name="xml_data" value='%s'  />""" % xmltext
    1172         return
    1173 
    11741111class ExportPDFPaymentSlipPage(UtilityView, grok.View):
    11751112    """Deliver a PDF slip of the context.
Note: See TracChangeset for help on using the changeset viewer.