Changeset 16587
- Timestamp:
- 31 Aug 2021, 06:28:35 (3 years ago)
- Location:
- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/helpers.py
r16556 r16587 237 237 # PAYDirect helper functions 238 238 239 def create_paydirect_booking(merchant_id, payment, host, url, https):239 def create_paydirect_booking(merchant_id, payment, item_code, host, url, https): 240 240 p_id = payment.p_id 241 241 description = payment.p_category … … 276 276 date_booked, date_expired, 277 277 firstname, lastname, 278 email, p_id)278 email, item_code) 279 279 response=SOAP_post( 280 280 "http://interswitchng.com/bookonhold/CreateBooking", -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/paydirectbrowser.py
r16555 r16587 106 106 https = True 107 107 108 @property 109 def item_code(self): 110 return '01' # for testing 111 108 112 def init_update(self): 109 113 if self.context.p_state == 'paid': … … 114 118 # Create a PAYDirect Booking 115 119 result_xml = create_paydirect_booking( 116 self.merchant_id, self.context, self. gateway_host,120 self.merchant_id, self.context, self.item_code, self.gateway_host, 117 121 self.gateway_url, True) 118 122 if result_xml.startswith('Connection error'): -
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/tests.py
r16528 r16587 238 238 payment.p_id = 'p' + str(random.randint(10000000000, 90000000000)) 239 239 payment.amount_auth = 1000.0 240 item_code = '01' 240 241 self.student['payments'][payment.p_id] = payment 241 242 result_xml = create_paydirect_booking( 242 MERCHANT_ID, payment, PAYDIRECT_HOST, PAYDIRECT_URL, True)243 MERCHANT_ID, payment, item_code, PAYDIRECT_HOST, PAYDIRECT_URL, True) 243 244 result_xml = get_SOAP_response_paydirect( 244 245 MERCHANT_ID, payment.p_id, PAYDIRECT_HOST, PAYDIRECT_URL, True) … … 323 324 self.assertEqual(payment.amount_auth, 310) 324 325 self.assertEqual(payment.net_amt, 10) 326 327 # Unfortunately the payment 60336214352306153 was done without surcharge. 328 # Therefore we have to deduct 300 again in this test. 329 payment.amount_auth = 10.0 330 325 331 # Reference number has been saved 326 332 self.browser.getControl("Requery").click()
Note: See TracChangeset for help on using the changeset viewer.