- Timestamp:
- 1 Dec 2012, 10:05:53 (12 years ago)
- Location:
- main/waeup.aaue/trunk/src/waeup/aaue
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
main/waeup.aaue/trunk/src/waeup/aaue/etranzact/tests.py
r9508 r9755 54 54 IWorkflowState(self.student).setState('cleared') 55 55 self.browser.open(self.payments_path + '/addop') 56 self.browser.getControl(name="form.p_category").value = ['schoolfee_1'] 56 57 self.browser.getControl("Create ticket").click() 57 58 self.assertMatches('...ticket created...', -
main/waeup.aaue/trunk/src/waeup/aaue/payments/interfaces.py
r9327 r9755 16 16 ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 17 17 ## 18 from zope.interface import Attribute 19 from zope import schema 20 from waeup.kofa.payments.interfaces import IPayment 21 from waeup.kofa.interfaces import SimpleKofaVocabulary 22 from waeup.aaue.interfaces import MessageFactory as _ 18 from kofacustom.nigeria.payments.interfaces import INigeriaOnlinePayment 23 19 24 payment_categories = SimpleKofaVocabulary( 25 (_('School Fee'),'schoolfee'), 26 (_('School Fee 1st instalment'),'schoolfee_1'), 27 (_('School Fee 2nd instalment'),'schoolfee_2'), 28 (_('Clearance'),'clearance'), 29 (_('Bed Allocation'),'bed_allocation'), 30 (_('Hostel Maintenance'),'hostel_maintenance'), 31 (_('Transfer'),'transfer'), 32 (_('Gown'),'gown'), 33 (_('Application Fee'), 'application'), 34 ) 35 36 class ICustomOnlinePayment(IPayment): 20 class ICustomOnlinePayment(INigeriaOnlinePayment): 37 21 """A payment via payment gateways. 38 22 39 This is a copy of INigeriaOnlinePayment40 only for taking the AAUE payment_categories41 into consideration.42 23 """ 43 44 45 p_category = schema.Choice(46 title = _(u'Payment Category'),47 default = u'schoolfee_1',48 vocabulary = payment_categories,49 required = True,50 )51 52 ac = schema.TextLine(53 title = _(u'Activation Code'),54 default = None,55 required = False,56 readonly = False,57 )58 59 r_amount_approved = schema.Float(60 title = _(u'Response Amount Approved'),61 default = 0.0,62 required = False,63 readonly = False,64 )65 66 r_code = schema.TextLine(67 title = _(u'Response Code'),68 default = None,69 required = False,70 readonly = False,71 )72 73 r_desc = schema.TextLine(74 title = _(u'Response Description'),75 default = None,76 required = False,77 readonly = False,78 )79 80 r_pay_reference = schema.TextLine(81 title = _(u'Response Payment Reference'),82 default = None,83 required = False,84 readonly = False,85 )86 87 r_card_num = schema.TextLine(88 title = _(u'Response Card Number'),89 default = None,90 required = False,91 readonly = False,92 )93 94 conf_number = schema.TextLine(95 title = _(u'Confirmation Number'),96 default = None,97 required = False,98 readonly = False,99 )100 101 r_company = schema.Choice(102 title = _(u'Payment Gateway'),103 default = None,104 required = False,105 readonly = False,106 vocabulary = SimpleKofaVocabulary(107 (_('Interswitch'), 'interswitch'),108 (_('eTranzact'), 'etranzact'),)109 )110 111 ICustomOnlinePayment['p_category'].order = ICustomOnlinePayment[112 'p_category'].order -
main/waeup.aaue/trunk/src/waeup/aaue/students/payments.py
r8753 r9755 27 27 from waeup.kofa.utils.helpers import attrs_to_fields 28 28 from waeup.aaue.students.interfaces import ICustomStudentOnlinePayment 29 from waeup.aaue.payments.interfaces import payment_categories30 29 31 30 class CustomStudentOnlinePayment(StudentOnlinePayment): … … 48 47 return self.__parent__.__parent__ 49 48 50 @property51 def category(self):52 return payment_categories.getTermByToken(self.p_category).title53 54 49 CustomStudentOnlinePayment = attrs_to_fields(CustomStudentOnlinePayment) 55 50 -
main/waeup.aaue/trunk/src/waeup/aaue/students/tests/test_browser.py
r9527 r9755 92 92 self.browser.open(self.payments_path) 93 93 self.browser.getLink("Add current session payment ticket").click() 94 self.browser.getControl(name="form.p_category").value = ['schoolfee_1'] 94 95 self.browser.getControl("Create ticket").click() 95 96 self.assertMatches('...Wrong state...', … … 101 102 self.browser.contents) 102 103 self.app['configuration']['2004'].school_fee_base = 6666.0 104 self.browser.getControl(name="form.p_category").value = ['schoolfee_1'] 103 105 self.browser.getControl("Create ticket").click() 104 106 self.assertMatches('...ticket created...', … … 117 119 ticket.p_state = 'paid' 118 120 self.browser.open(self.payments_path + '/addop') 121 self.browser.getControl(name="form.p_category").value = ['schoolfee_1'] 119 122 self.browser.getControl("Create ticket").click() 120 123 self.assertMatches('...This type of payment has already been made...', -
main/waeup.aaue/trunk/src/waeup/aaue/utils/utils.py
r8823 r9755 26 26 PREFERRED_LANGUAGES_DICT = { 27 27 } 28 29 PAYMENT_CATEGORIES = { 30 'schoolfee': 'School Fee', 31 'schoolfee_1': 'School Fee 1st instalment', 32 'schoolfee_2': 'School Fee 2nd instalment', 33 'clearance': 'Acceptance Fee', 34 'hostel_maintenance': 'Hostel Maintenance Fee', 35 'application': 'Application Fee', 36 'gown': 'Gown Hire Fee', 37 'bed_allocation': 'Bed Allocation Fee', 38 'transfer': 'Transfer Fee', 39 } 40 41 SELECTABLE_PAYMENT_CATEGORIES = { 42 'schoolfee_1': 'School Fee 1st instalment', 43 'schoolfee_2': 'School Fee 2nd instalment', 44 'clearance': 'Acceptance Fee', 45 'hostel_maintenance': 'Hostel Maintenance Fee', 46 'application': 'Application Fee', 47 'gown': 'Gown Hire Fee', 48 'bed_allocation': 'Bed Allocation Fee', 49 'transfer': 'Transfer Fee', 50 } 51
Note: See TracChangeset for help on using the changeset viewer.