Changeset 7875 for main/waeup.kofa/trunk
- Timestamp:
- 14 Mar 2012, 07:52:17 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/interfaces.py
r7871 r7875 570 570 571 571 surcharge_1 = schema.Int( 572 title = _(u' Surcharge 1'),572 title = _(u'Portal Fee'), 573 573 default = 0, 574 574 ) -
main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
r7819 r7875 104 104 105 105 surcharge_1 = schema.Int( 106 title = _(u' Surcharge 1'),106 title = _(u'Portal Fee'), 107 107 default = 0, 108 108 required = False, -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser.py
r7873 r7875 1126 1126 pay_item_id = '5700' 1127 1127 1128 action = 'https://testwebpay.interswitchng.com/test_paydirect/webpay/pay.aspx' 1128 1129 site_redirect_url = 'http://localhost?echo=' 1129 1130 site_name = 'xyz.waeup.org' 1130 provider_amt = 10001131 1131 provider_acct = '2345' 1132 1132 provider_bank_id = '8' 1133 provider_item_name = 'Kofa Provider '1133 provider_item_name = 'Kofa Provider Fee' 1134 1134 institution_acct = '1234' 1135 1135 institution_bank_id = '9' 1136 institution_name = 'Sample University' 1136 1137 1137 1138 def update(self): … … 1141 1142 return 1142 1143 xmldict = {} 1143 s tudent = self.context.getStudent()1144 self.student = self.context.getStudent() 1144 1145 self.amount = (self.context.amount_auth + self.context.surcharge_1 + 1145 1146 self.context.surcharge_2 + self.context.surcharge_3) 1146 self.txn_ref = xmldict['detail_ref'] = self.context.p_id1147 self.cust_id = student.student_id1148 self.cust_id_desc = self.context.p_item1149 self.pay_item_name = xmldict['institution_item_name'] = self.context.p_category1150 self.cust_name = student.display_fullname1151 1147 self.local_date_time = str(self.context.creation_date) 1152 self.certificate = getattr(student['studycourse'],'certificate',None)1153 if self.certificate is not None:1154 xmldict['department'] = self.certificate.__parent__.__parent__.code1155 xmldict['faculty'] = self.certificate.__parent__.__parent__.__parent__.code1148 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 1156 1152 else: 1157 1153 xmldict['department'] = None 1158 1154 xmldict['faculty'] = None 1159 xmldict['provider_amt'] = self.provider_amt 1155 xmldict['detail_ref'] = self.context.p_id 1156 xmldict['provider_amt'] = self.context.surcharge_1 1160 1157 xmldict['provider_acct'] = self.provider_acct 1161 1158 xmldict['provider_bank_id'] = self.provider_bank_id 1162 1159 xmldict['provider_item_name'] = self.provider_item_name 1163 xmldict['institution_amt'] = self.amount - self.provider_amt1160 xmldict['institution_amt'] = self.amount 1164 1161 xmldict['institution_acct'] = self.institution_acct 1165 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 1166 1165 xmltext = """<payment_item_detail> 1167 <item_details detail_ref="%(detail_ref)s" college=" institution" department="%(department)s" faculty="%(faculty)s">1166 <item_details detail_ref="%(detail_ref)s" college="%(institution_name)s" department="%(department)s" faculty="%(faculty)s"> 1168 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" /> 1169 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" /> -
main/waeup.kofa/trunk/src/waeup/kofa/students/browser_templates/goto_interswitch.pt
r7873 r7875 1 1 <form i18n:domain="waeup.kofa" 2 action="https://testwebpay.interswitchng.com/test_paydirect/webpay/pay.aspx" 3 method="POST"> 2 tal:attributes="action view/action" method="POST"> 3 4 <p i18n:translate=""> 5 These data will be submitted to the CollegePAY payment gateway, 6 please check: 7 </p> 8 9 <table class="form-table" i18n:domain="waeup.kofa"> 10 <thead> 11 </thead> 12 <tbody> 13 <tr> 14 <td i18n:translate="" class="fieldname"> 15 Total Amount Authorized:</td> 16 <td> 17 <span tal:replace="view/amount">AMOUNT</span> 18 </td> 19 </tr> 20 <tr> 21 <td i18n:translate="" class="fieldname"> 22 Transaction Reference:</td> 23 <td> 24 <span tal:replace="view/context/p_id">TXNREF</span> 25 </td> 26 </tr> 27 <tr> 28 <td i18n:translate="" class="fieldname"> 29 Customer Id:</td> 30 <td> 31 <span tal:replace="view/student/student_id">CUSTID</span> 32 </td> 33 </tr> 34 <tr> 35 <td i18n:translate="" class="fieldname"> 36 Customer Name:</td> 37 <td> 38 <span tal:replace="view/student/display_fullname">CUSTNAME</span> 39 </td> 40 </tr> 41 <tr> 42 <td i18n:translate="" class="fieldname"> 43 Payment Item:</td> 44 <td> 45 <span tal:replace="view/context/p_item">PAYMENTITEM</span> 46 </td> 47 </tr> 48 <tr> 49 <td i18n:translate="" class="fieldname"> 50 Payment Category:</td> 51 <td> 52 <span tal:replace="view/context/p_category">PAYMENTCATEGORY</span> 53 </td> 54 </tr> 55 </tbody> 56 </table> 4 57 5 58 <input type="hidden" name="product_id" tal:attributes="value view/product_id" /> 6 <input type="hidden" name="amount" tal:attributes="value view/amount" />7 59 <input type="hidden" name="currency" tal:attributes="value view/currency" /> 60 <input type="hidden" name="pay_item_id" tal:attributes="value view/pay_item_id" /> 8 61 <input type="hidden" name="site_redirect_url" tal:attributes="value view/site_redirect_url" /> 9 62 <input type="hidden" name="site_name" tal:attributes="value view/site_name" /> 10 <input type="hidden" name="txn_ref" tal:attributes="value view/txn_ref" />11 <input type="hidden" name="cust_id" tal:attributes="value view/cust_id" />12 <input type="hidden" name="cust_name" tal:attributes="value view/cust_name" />13 <input type="hidden" name="cust_id_desc" tal:attributes="value view/cust_id_desc" />14 <input type="hidden" name="pay_item_id" tal:attributes="value view/pay_item_id" />15 <input type="hidden" name="pay_item_name" tal:attributes="value view/pay_item_name" />16 63 <input type="hidden" name="local_date_time" tal:attributes="value view/local_date_time" /> 64 <input type="hidden" name="amount" tal:attributes="value view/amount" /> 65 66 <input type="hidden" name="txn_ref" tal:attributes="value view/context/p_id" /> 67 <input type="hidden" name="cust_id_desc" tal:attributes="value view/context/p_item" /> 68 <input type="hidden" name="pay_item_name" tal:attributes="value view/context/p_category" /> 69 70 <input type="hidden" name="cust_id" tal:attributes="value view/student/student_id" /> 71 <input type="hidden" name="cust_name" tal:attributes="value view/student/display_fullname" /> 72 73 17 74 <input type="hidden" name="payment_params" value="college_split" /> 18 75 <span tal:replace="structure view/xml_data"></span> 76 19 77 <input type="submit" class="btn" tal:attributes="value view/submit_button"/> 78 20 79 </form> -
main/waeup.kofa/trunk/src/waeup/kofa/students/utils.py
r7843 r7875 214 214 d['p_item'] = student['studycourse'].certificate.code 215 215 d['amount'] = academic_session.clearance_fee 216 d['surcharge_1'] = 0 # no portal fee 216 217 elif category == 'bed_allocation': 217 218 d['p_item'] = self.getAccommodationDetails(student)['bt'] 218 219 d['amount'] = academic_session.booking_fee 220 d['surcharge_1'] = 0 # no portal fee 219 221 return d 220 222
Note: See TracChangeset for help on using the changeset viewer.