Changeset 8259 for main/waeup.uniben/trunk/src/waeup/uniben/interswitch
- Timestamp:
- 23 Apr 2012, 14:06:39 (13 years ago)
- Location:
- main/waeup.uniben/trunk/src/waeup/uniben/interswitch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser.py
r8256 r8259 28 28 from waeup.kofa.students.viewlets import RequestCallbackActionButton as RCABStudent 29 29 from waeup.kofa.applicants.viewlets import RequestCallbackActionButton as RCABApplicant 30 from waeup.kofa.payments.interfaces import payment_categories 30 31 from waeup.uniben.students.utils import actions_after_student_payment 31 32 from waeup.uniben.applicants.utils import actions_after_applicant_payment … … 34 35 # Interswitch test account data: 35 36 # 36 # Card Number: 6274807700000007 37 # Expiry Date: July 2012 38 # PIN: 0000 39 40 # Card Number: 6278050000000007 41 # Expiry Date: July 2012 42 # PIN: 0000 37 # Card Number: 6274807700000007 38 # Expiry Date: July 2012 39 # PIN: 0000 40 41 # Card Number: 6278050000000007 42 # Expiry Date: July 2012 43 # PIN: 0000 44 # 45 # PAN,EXPIRY,PIN,CVV2 46 # 5060990330000003386,1304,0000,543 47 # 5060990330000003394,1304,0000,865 48 # 5060990330000003402,1304,0000,012 49 # 5060990330000003410,1304,0000,737 50 # 5060990330000003428,1304,0000,310 51 # 5060990330000003436,1304,0000,173 43 52 44 53 PRODUCT_ID = '57' … … 160 169 161 170 class InterswitchActionButtonStudent(RCABStudent): 162 grok.order( 2)171 grok.order(1) 163 172 grok.context(ICustomStudentOnlinePayment) 164 173 icon = 'actionicon_pay.png' … … 173 182 174 183 class InterswitchActionButtonApplicant(RCABApplicant): 175 grok.order( 2)184 grok.order(1) 176 185 grok.context(ICustomApplicantOnlinePayment) 177 186 icon = 'actionicon_pay.png' … … 186 195 187 196 # Deprecated 188 class InterswitchRequestCallbackActionButtonStudent(RCABStudent): 189 grok.order(3) 197 #class InterswitchRequestCallbackActionButtonStudent(RCABStudent): 198 # grok.order(3) 199 # grok.context(ICustomStudentOnlinePayment) 200 # icon = 'actionicon_call.png' 201 # text = _('Request CollegePAY callback') 202 203 # def target_url(self): 204 # if self.context.p_state == 'paid': 205 # return '' 206 # site_redirect_url = self.view.url(self.view.context, 'isw_callback') 207 # args = { 208 # 'transRef':self.context.p_id, 209 # 'prodID':PRODUCT_ID, 210 # 'redirectURL':site_redirect_url} 211 # return QUERY_URL + '?%s' % urllib.urlencode(args) 212 213 # Alternative preferred solution 214 class InterswitchRequestWebserviceActionButtonStudent(RCABStudent): 215 grok.order(2) 190 216 grok.context(ICustomStudentOnlinePayment) 191 217 icon = 'actionicon_call.png' 192 text = _('Request CollegePAY callback') 193 194 def target_url(self): 195 if self.context.p_state == 'paid': 196 return '' 197 site_redirect_url = self.view.url(self.view.context, 'isw_callback') 198 args = { 199 'transRef':self.context.p_id, 200 'prodID':PRODUCT_ID, 201 'redirectURL':site_redirect_url} 202 return QUERY_URL + '?%s' % urllib.urlencode(args) 203 204 # Alternative preferred solution 205 class InterswitchRequestWebserviceActionButtonStudent(RCABStudent): 206 grok.order(4) 207 grok.context(ICustomStudentOnlinePayment) 208 icon = 'actionicon_call.png' 209 text = _('Request CollegePAY webservice') 218 text = _('Request CollegePAY Webservice') 210 219 target = 'request_webservice' 211 220 212 221 class InterswitchRequestWebserviceActionButtonApplicant(RCABApplicant): 213 grok.order( 4)222 grok.order(2) 214 223 grok.context(ICustomApplicantOnlinePayment) 215 224 icon = 'actionicon_call.png' 216 text = _('Request CollegePAY webservice')225 text = _('Request CollegePAY Webservice') 217 226 target = 'request_webservice' 218 227 … … 252 261 self.amount = (self.context.amount_auth + self.context.surcharge_1 + 253 262 self.context.surcharge_2 + self.context.surcharge_3) 263 self.category = payment_categories.getTermByToken( 264 self.context.p_category).title 254 265 self.amount_100 = 100 * self.amount 255 266 self.local_date_time = str(self.context.creation_date) … … 267 278 268 279 def update(self): 269 if self.context.p_state != 'unpaid':270 self.flash(_("Payment ticket can't be re-send to CollegePAY."))271 self.redirect(self.url(self.context, '@@index'))272 return280 #if self.context.p_state != 'unpaid': 281 # self.flash(_("Payment ticket can't be re-send to CollegePAY.")) 282 # self.redirect(self.url(self.context, '@@index')) 283 # return 273 284 self.applicant = self.context.__parent__ 274 285 xmldict = {} 275 286 xmldict['department'] = None 276 287 xmldict['faculty'] = None 288 self.category = payment_categories.getTermByToken( 289 self.context.p_category).title 277 290 self.amount = (self.context.amount_auth + self.context.surcharge_1 + 278 291 self.context.surcharge_2 + self.context.surcharge_3) -
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser_templates/applicant_goto_interswitch.pt
r8256 r8259 50 50 Payment Category:</td> 51 51 <td> 52 <span tal:replace="view/c ontext/p_category">PAYMENTCATEGORY</span>52 <span tal:replace="view/category">PAYMENTCATEGORY</span> 53 53 </td> 54 54 </tr> … … 63 63 <input type="hidden" name="local_date_time" tal:attributes="value view/local_date_time" /> 64 64 <input type="hidden" name="amount" tal:attributes="value view/amount_100" /> 65 66 65 <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 66 <input type="hidden" name="pay_item_name" tal:attributes="value view/context/p_item" /> 67 <input type="hidden" name="cust_id_desc" tal:attributes="value view/category" /> 70 68 <input type="hidden" name="cust_id" tal:attributes="value view/applicant/applicant_id" /> 71 69 <input type="hidden" name="cust_name" tal:attributes="value view/applicant/display_fullname" /> 72 73 70 74 71 <input type="hidden" name="payment_params" value="college_split" /> -
main/waeup.uniben/trunk/src/waeup/uniben/interswitch/browser_templates/student_goto_interswitch.pt
r8256 r8259 50 50 Payment Category:</td> 51 51 <td> 52 <span tal:replace="view/c ontext/p_category">PAYMENTCATEGORY</span>52 <span tal:replace="view/category">PAYMENTCATEGORY</span> 53 53 </td> 54 54 </tr> … … 63 63 <input type="hidden" name="local_date_time" tal:attributes="value view/local_date_time" /> 64 64 <input type="hidden" name="amount" tal:attributes="value view/amount_100" /> 65 66 65 <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 66 <input type="hidden" name="pay_item_name" tal:attributes="value view/context/p_item" /> 67 <input type="hidden" name="cust_id_desc" tal:attributes="value view/category" /> 70 68 <input type="hidden" name="cust_id" tal:attributes="value view/student/student_id" /> 71 69 <input type="hidden" name="cust_name" tal:attributes="value view/student/display_fullname" /> 72 73 70 74 71 <input type="hidden" name="payment_params" value="college_split" />
Note: See TracChangeset for help on using the changeset viewer.