Changeset 13584


Ignore:
Timestamp:
11 Jan 2016, 06:09:59 (9 years ago)
Author:
Henrik Bettermann
Message:

Do not change payment date after verification.

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

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/browser.py

    r13581 r13584  
    119119            self.context, self.product_id,
    120120            self.gateway_host, self.gateway_url,
    121             self.https, self.mac)
     121            self.https, self.mac, False)
    122122        student.writeLogMessage(self, log)
    123123        if not success:
     
    156156            self.context, self.product_id,
    157157            self.gateway_host, self.gateway_url,
    158             self.https, self.mac)
     158            self.https, self.mac, False)
    159159        applicant.writeLogMessage(self, log)
    160160        if not success:
     
    193193            self.context, self.product_id,
    194194            self.gateway_host, self.gateway_url,
    195             self.https, self.mac)
     195            self.https, self.mac, True)
    196196        student.writeLogMessage(self, log)
    197197        if not success:
     
    226226            self.context, self.product_id,
    227227            self.gateway_host, self.gateway_url,
    228             self.https, self.mac)
     228            self.https, self.mac, True)
    229229        applicant.writeLogMessage(self, log)
    230230        if not success:
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/helpers.py

    r13581 r13584  
    9393    return parsed_json
    9494
    95 def query_interswitch_SOAP(payment, product_id, host, url, https):
     95def query_interswitch_SOAP(payment, product_id, host, url, https, verify):
    9696    sr = get_SOAP_response(product_id, payment.p_id, host, url, https)
    9797    if sr.startswith('Connection error'):
     
    132132        return False, msg, log
    133133    payment.p_state = 'paid'
    134     payment.payment_date = datetime.utcnow()
     134    if not verify:
     135        payment.payment_date = datetime.utcnow()
    135136    msg = _('Successful callback received.')
    136137    log = 'valid callback for %s payment %s: %s' % (
     
    139140    return True, msg, log
    140141
    141 def query_interswitch(payment, product_id, host, url, https, mac):
     142def query_interswitch(payment, product_id, host, url, https, mac, verify):
    142143    # If no mac mac key is given, fall back to deprecated SOAP method
    143144    # (Uniben, AAUA, FCEOkene).
    144145    if mac == None:
    145         return query_interswitch_SOAP(payment, product_id, host, url, https)
     146        return query_interswitch_SOAP(
     147            payment, product_id, host, url, https, verify)
    146148    jr = get_JSON_response(product_id, payment.p_id, host, url,
    147149                           https, mac, payment.amount_auth)
     
    196198        return False, msg, log
    197199    payment.p_state = 'paid'
    198     payment.payment_date = datetime.utcnow()
     200    if not verify:
     201        payment.payment_date = datetime.utcnow()
    199202    msg = _('Successful callback received')
    200203    log = 'valid callback for %s payment %s: %s' % (
Note: See TracChangeset for help on using the changeset viewer.