Changeset 14805 for main/kofacustom.nigeria/trunk/src/kofacustom
- Timestamp:
- 18 Aug 2017, 07:41:11 (7 years ago)
- Location:
- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/applicantsbrowser.py
r14798 r14805 214 214 serviceTypeId = SERVICETYPEID 215 215 216 orderId = '3456346346'216 #orderId = '3456346346' 217 217 init_url = '/remita/ecomm/split/init.reg' 218 218 amount='1000' … … 275 275 if not module_activated(self.context.__parent__.__parent__.year): 276 276 return 277 self.orderId = self.context.p_id 277 278 error = self.init_update() 278 279 if error: -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/studentsbrowser.py
r14798 r14805 222 222 serviceTypeId = SERVICETYPEID 223 223 224 orderId = '3456346346'224 #orderId = '3456346346' 225 225 init_url = '/remita/ecomm/split/init.reg' 226 226 amount='1000' … … 290 290 if not module_activated(self.context.student.current_session): 291 291 return 292 self.orderId = self.context.p_id 292 293 error = self.init_update() 293 294 if error: -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/tests.py
r14801 r14805 84 84 fullname='Anton Meier', email='am@xxx.de', 85 85 lineitems=self.lineitems) 86 self.rrr = resp['RRR'].rstrip()86 return resp 87 87 88 88 @external_test 89 89 def test_get_JSON_POST_response(self): 90 self._get_transaction_data() 90 resp = self._get_transaction_data() 91 self.rrr = resp['RRR'] 92 assert resp == { 93 u'status': u'Payment Reference generated', 94 u'orderID': self.orderId, 95 u'RRR': self.rrr, 96 u'statuscode': u'025'} 91 97 resp = get_JSON_POST_response( 92 98 merchantId=self.merchantId, serviceTypeId=self.serviceTypeId, … … 97 103 lineitems=self.lineitems) 98 104 assert resp == { 99 u'status': u'RRR Already Exist for the orderId', 100 u'orderID': self.orderId, 101 u'RRR': self.rrr + ' ', # strange trailing whitespace which 102 # obviously does not belong to the RRR 103 u'statuscode': u'055'} 105 u'status': u'Duplicate Order Ref', 106 u'statuscode': u'028'} 104 107 105 108 resp = get_payment_status_via_rrr( … … 113 116 assert resp['status'] == '021' 114 117 assert resp['amount'] == self.amount 115 assert resp['lineitems'] == [116 {u'status': u'021', u'lineItemsId': u'itemid1'},117 {u'status': u'021', u'lineItemsId': u'itemid2'}]118 118 assert resp['RRR'] == self.rrr 119 119 assert resp['message'] == u'Transaction Pending' … … 200 200 self.browser.getLink("Pay via Remita").click() 201 201 # The RRR has been retrieved 202 self.assertTrue('<input name="rrr" type="hidden" value="%s">' % self.rrr 202 self.assertTrue('<input name="rrr" type="hidden" value="%s">' 203 % self.payment.r_pay_reference 203 204 in self.browser.contents) 204 205 self.assertTrue( 205 206 'action="http://www.remitademo.net/remita/ecomm/finalize.reg"' 206 207 in self.browser.contents) 207 self.assertEqual(self.payment.r_pay_reference, self.rrr)208 208 self.assertEqual(self.payment.r_company, 'remita') 209 209 # Retrieval has been logged … … 214 214 'zope.mgr - kofacustom.nigeria.remita.studentsbrowser.RemitaPageStudent' 215 215 ' - K1000000 - RRR retrieved: %s, ServiceTypeId: %s' 216 % (self. rrr, self.serviceTypeId) in logcontent)216 % (self.payment.r_pay_reference, self.serviceTypeId) in logcontent) 217 217 218 218 # Means of testing end here. … … 385 385 self.browser.getLink("Pay via Remita").click() 386 386 # The RRR has been retrieved 387 self.assertTrue('<input name="rrr" type="hidden" value="%s">' % self.rrr388 in self.browser.contents)389 self.assertEqual(self.payment.r_pay_reference, self.rrr)387 self.assertTrue('<input name="rrr" type="hidden" value="%s">' 388 % self.payment.r_pay_reference 389 in self.browser.contents) 390 390 self.assertEqual(self.payment.r_company, 'remita') 391 391 # Retrieval has been logged … … 396 396 'zope.mgr - kofacustom.nigeria.remita.applicantsbrowser.RemitaPageApplicant' 397 397 ' - %s - RRR retrieved: %s, ServiceTypeId: %s' 398 % (self.applicant.applicant_id, self.rrr, self.serviceTypeId) 398 % (self.applicant.applicant_id, 399 self.payment.r_pay_reference, 400 self.serviceTypeId) 399 401 in logcontent) 400 402 # Means of testing end here.
Note: See TracChangeset for help on using the changeset viewer.