Changeset 8429
- Timestamp:
- 12 May 2012, 08:36:08 (13 years ago)
- Location:
- main/waeup.kofa/trunk/src/waeup/kofa
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.kofa/trunk/src/waeup/kofa/payments/interfaces.py
r8420 r8429 131 131 ) 132 132 133 r_desc = schema.TextLine( 134 title = _(u'Response Description'), 135 default = None, 136 required = False, 137 readonly = False, 138 ) 139 133 140 def approve(): 134 141 "Approve an online payment and set to paid." -
main/waeup.kofa/trunk/src/waeup/kofa/payments/payment.py
r8420 r8429 23 23 from grok import index 24 24 from zope.component import getUtility 25 from zope.i18n import translate 25 26 from waeup.kofa.interfaces import IKofaUtils 26 27 from waeup.kofa.interfaces import MessageFactory as _ … … 81 82 self.r_code = u'AP' 82 83 self.p_state = 'paid' 83 #user = get_current_principal() 84 user = get_current_principal() 85 r_desc = _('Payment approved by ${a}', mapping = {'a': user.id}) 86 portal_language = getUtility(IKofaUtils).PORTAL_LANGUAGE 87 self.r_desc = translate(r_desc, 'waeup.kofa', 88 target_language=portal_language) 84 89 self.payment_date = datetime.utcnow() 85 90 return -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_browser.py
r8428 r8429 1399 1399 self.assertEqual(payment.r_amount_approved, 3456.0) 1400 1400 self.assertEqual(payment.r_code, 'AP') 1401 self.assertEqual(payment.r_desc, u'Payment approved by K1000000') 1401 1402 # The new CLR-0 pin has been created 1402 1403 self.assertEqual(len(self.app['accesscodes']['CLR-0']),1) -
main/waeup.kofa/trunk/src/waeup/kofa/students/tests/test_export.py
r8411 r8429 370 370 'ac,amount_auth,creation_date,matric_number,p_category,p_id,' 371 371 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 372 'r_code,r eg_number\r\n'373 374 ',0.0,2012-04-01 13:12:01,,schoolfee,,,,,unpaid,,0.0,, \r\n'372 'r_code,r_desc,reg_number\r\n' 373 374 ',0.0,2012-04-01 13:12:01,,schoolfee,,,,,unpaid,,0.0,,,\r\n' 375 375 ) 376 376 return … … 388 388 'ac,amount_auth,creation_date,matric_number,p_category,p_id,' 389 389 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 390 'r_code,r eg_number\r\n'390 'r_code,r_desc,reg_number\r\n' 391 391 392 392 '666,0.0,2012-04-01 13:12:01,M123456,schoolfee,my-id,' 393 393 'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,' 394 'r-code, 123456\r\n'394 'r-code,,123456\r\n' 395 395 ) 396 396 return … … 407 407 'ac,amount_auth,creation_date,matric_number,p_category,p_id,' 408 408 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 409 'r_code,r eg_number\r\n'409 'r_code,r_desc,reg_number\r\n' 410 410 411 411 '666,0.0,2012-04-01 13:12:01,M123456,schoolfee,my-id,' 412 412 'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,' 413 'r-code, 123456\r\n'413 'r-code,,123456\r\n' 414 414 ) 415 415 return … … 426 426 'ac,amount_auth,creation_date,matric_number,p_category,p_id,' 427 427 'p_item,p_level,p_session,p_state,payment_date,r_amount_approved,' 428 'r_code,r eg_number\r\n'428 'r_code,r_desc,reg_number\r\n' 429 429 430 430 '666,0.0,2012-04-01 13:12:01,M123456,schoolfee,my-id,' 431 431 'p-item,100,2012,unpaid,2012-04-01 14:12:01,12.12,' 432 'r-code, 123456\r\n'433 ) 434 return 432 'r-code,,123456\r\n' 433 ) 434 return
Note: See TracChangeset for help on using the changeset viewer.