Changeset 15788


Ignore:
Timestamp:
9 Nov 2019, 15:53:05 (5 years ago)
Author:
Henrik Bettermann
Message:

Check first CUSTOMER_D (= p_id)

Location:
main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/helpers.py

    r15755 r15788  
    261261        payment.p_state = 'failed'
    262262        return False, msg, log
     263    customer_id = success.get('CUSTOMER_ID')[0]
     264    if payment.p_id != customer_id:
     265        msg = _('Wrong payment id')
     266        log = 'wrong callback for payment %s: %s' % (payment.p_id, raw)
     267        payment.p_state = 'failed'
     268        return False, msg, log
    263269    payment.r_code = u'ET'
    264270    payment.r_desc = u'%s' % success.get('TRANS_DESCR')[0]
     
    271277        payment.p_state = 'failed'
    272278        return False, msg, log
    273     customer_id = success.get('CUSTOMER_ID')[0]
    274     if payment.p_id != customer_id:
    275         msg = _('Wrong payment id')
    276         log = 'wrong callback for payment %s: %s' % (payment.p_id, raw)
    277         payment.p_state = 'failed'
    278         return False, msg, log
    279279    log = 'valid callback for payment %s: %s' % (payment.p_id, raw)
    280280    msg = _('Successful callback received')
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/etranzact/payoutletbrowser.py

    r15772 r15788  
    160160        student.writeLogMessage(self, log)
    161161        if not success:
    162             self.flash(msg)
     162            self.flash(msg, type="danger")
    163163            return
    164164        flashtype, msg, log = self.context.doAfterStudentPayment()
Note: See TracChangeset for help on using the changeset viewer.