Changeset 16114 for main/kofacustom.nigeria/trunk/src
- Timestamp:
- 11 Jun 2020, 09:41:40 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/helpers.py
r15727 r16114 154 154 155 155 # A typical JSON response 156 157 # old: 158 156 159 # {u'SplitAccounts': [], 157 160 # u'MerchantReference':u'p4210665523377', … … 166 169 # u'LeadBankName': None} 167 170 168 if len(jr) < 11: 171 # new: 172 173 # 'PaymentReference' is maybe missing 174 175 # {u'SplitAccounts': [], 176 # u'MerchantReference':u'p5918633006916', 177 # u'TransactionDate':u'2020-06-11T09:17:37', 178 # u'ResponseDescription':u'Customer Cancellation', 179 # u'Amount': 89525000, 180 # u'CardNumber': u'', 181 # u'ResponseCode': u'Z6', 182 # u'BankCode': u''} 183 184 185 if len(jr) < 8: 169 186 msg = _('Invalid callback: ${a}', mapping = {'a': str(jr)}) 170 187 log = 'invalid callback for payment %s: %s' % (payment.p_id, str(jr)) … … 178 195 payment.r_amount_approved = jr['Amount'] / 100.0 179 196 payment.r_card_num = jr['CardNumber'] 180 payment.r_pay_reference = jr ['PaymentReference']197 payment.r_pay_reference = jr.get('PaymentReference', u'') 181 198 #payment.r_company = u'interswitch' 182 199 if payment.r_code != '00':
Note: See TracChangeset for help on using the changeset viewer.