Changeset 12479 for main/kofacustom.skeleton
- Timestamp:
- 16 Jan 2015, 05:52:04 (10 years ago)
- Location:
- main/kofacustom.skeleton/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.skeleton/trunk/CHANGES.txt
r11941 r12479 2 2 ******* 3 3 4 1.2dev (unreleased) 5 =================== 4 1.2.dev0 (unreleased) 5 ===================== 6 7 * Forward hash value to Interswitch payment gateway. 6 8 7 9 * Create sample application_slip.pdf during tests. -
main/kofacustom.skeleton/trunk/src/kofacustom/skeleton/interswitch/browser.py
r11647 r12479 17 17 ## 18 18 import httplib 19 import hashlib 19 20 import grok 20 21 from kofacustom.nigeria.interswitch.browser import ( … … 44 45 URL = '/paydirect/services/TransactionQueryWs.asmx' 45 46 #URL = '/test_paydirect/services/TransactionQueryWs.asmx' 46 httplib.HTTPConnection.debuglevel = 0 47 httplib.HTTPSConnection.debuglevel = 0 48 HTTPS = True 47 49 48 50 class CustomInterswitchPageStudent(InterswitchPageStudent): … … 55 57 currency = CURRENCY 56 58 product_id = PRODUCT_ID 59 mac = '' 57 60 58 61 def update(self): … … 97 100 self.context.provider_amt = provider_amt 98 101 self.context.gateway_amt = GATEWAY_AMT 102 103 hashargs = ( 104 self.context.p_id + 105 PRODUCT_ID + 106 self.pay_item_id + 107 str(int(self.amount_auth)) + 108 self.site_redirect_url + 109 self.mac) 110 self.hashvalue = hashlib.sha512(hashargs).hexdigest() 99 111 return 100 112 … … 109 121 pay_item_id = '0000' 110 122 product_id = PRODUCT_ID 123 mac = '' 111 124 112 125 def update(self): … … 134 147 self.context.provider_amt = provider_amt 135 148 self.context.gateway_amt = GATEWAY_AMT 149 150 hashargs = ( 151 self.context.p_id + 152 PRODUCT_ID + 153 self.pay_item_id + 154 str(int(self.amount_auth)) + 155 self.site_redirect_url + 156 self.mac) 157 self.hashvalue = hashlib.sha512(hashargs).hexdigest() 136 158 return 137 159 … … 144 166 gateway_host = HOST 145 167 gateway_url = URL 168 https = HTTPS 146 169 147 170 class CustomInterswitchPaymentRequestWebservicePageApplicant( … … 153 176 gateway_host = HOST 154 177 gateway_url = URL 178 https = HTTPS -
main/kofacustom.skeleton/trunk/src/kofacustom/skeleton/interswitch/tests.py
r11813 r12479 72 72 self.payment_url = self.browser.url 73 73 self.browser.getLink("CollegePAY", index=0).click() 74 # The total amount to be processed by Interswitch75 # has been reduced by the Interswitch fee of 150 Nairas76 74 self.assertMatches('...<input type="hidden" name="pay_item_id" value="0000" />...', 77 75 self.browser.contents)
Note: See TracChangeset for help on using the changeset viewer.