Ignore:
Timestamp:
15 Jul 2020, 09:00:00 (4 years ago)
Author:
Henrik Bettermann
Message:

Adjust to new Interswitch API.

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/applicants/interfaces.py

    r16161 r16167  
    578578        source = LGASource(),
    579579        title = _(u'Nysc Location'),
    580         description = _(u'Leave blank for exceptions letters.'),
     580        description = _(u'Leave blank for exception letters.'),
    581581        required = False,
    582582        )
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/helpers.py

    r16083 r16167  
    156156    if not form or not form.get('SUCCESS', None):
    157157        msg = _('No (valid) response from Etranzact.')
    158         log = 'No valid response from Etranzact for payment %s' % payment.p_id
     158        log = 'invalid response for payment %s' % payment.p_id
    159159        payment.p_state = 'failed'
    160160        notify(grok.ObjectModifiedEvent(payment))
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/helpers.py

    r16114 r16167  
    182182    #  u'BankCode': u''}
    183183
    184 
    185     if len(jr) < 8:
     184    if not 'ResponseCode' in jr.keys() \
     185        or not 'ResponseDescription' in jr.keys() \
     186        or not 'Amount' in jr.keys():
    186187        msg = _('Invalid callback: ${a}', mapping = {'a': str(jr)})
    187188        log = 'invalid callback for payment %s: %s' % (payment.p_id, str(jr))
     
    194195    payment.r_desc = jr['ResponseDescription']
    195196    payment.r_amount_approved = jr['Amount'] / 100.0
    196     payment.r_card_num = jr['CardNumber']
     197    payment.r_card_num = jr.get('CardNumber', u'')
    197198    payment.r_pay_reference = jr.get('PaymentReference', u'')
    198199    #payment.r_company = u'interswitch'
Note: See TracChangeset for help on using the changeset viewer.