Changeset 17747 for main


Ignore:
Timestamp:
25 Apr 2024, 08:46:43 (7 months ago)
Author:
Henrik Bettermann
Message:

Repair: Uniben allows also previous session students to book a bed

Location:
main/waeup.uniben/trunk/src/waeup/uniben
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • main/waeup.uniben/trunk/src/waeup/uniben/remita/browser.py

    r17708 r17747  
    6161    https = HTTPS
    6262    api_key = API_KEY
     63
     64    def update(self):
     65        super(CustomRemitaVerifyPaymentStatusPageStudent, self).update()
     66        # Repair: Uniben allows also previous session students to book a bed
     67        if self.context.p_category == 'bed_allocation' and self.context.p_state == 'paid' and self.context.ac == None:
     68            flashtype, msg, log = self.context.doAfterStudentPayment()
     69            if log is not None:
     70                self.context.student.writeLogMessage(self, log)
     71            self.flash(msg, type=flashtype)
     72        return
    6373
    6474class CustomRemitaPageStudent(RemitaPageStudent):
     
    255265        return
    256266
    257 class CustomRemitaRequestPaymentStatusPageApplicant(
    258     RemitaRequestPaymentStatusPageApplicant):
    259     """ Request webservice view for the Remita gateway.
    260     """
    261 
    262     merchantId = MERCHANTID
    263     host = HOST
    264     https = HTTPS
    265     api_key = API_KEY
    266 
    267267class CustomRemitaVerifyPaymentStatusPageApplicant(
    268268    RemitaVerifyPaymentStatusPageApplicant):
  • main/waeup.uniben/trunk/src/waeup/uniben/students/payments.py

    r15407 r17747  
    5555            if error is not None:
    5656                return 'danger', error, error
     57        # Uniben allows also previous session students to book a bed
     58        if self.p_category == 'bed_allocation':
     59            error = self.redeemTicket()
     60            if error is not None:
     61                return 'danger', error, error
    5762        log = 'successful %s payment: %s' % (self.p_category, self.p_id)
    5863        msg = _('Payment successfully completed')
Note: See TracChangeset for help on using the changeset viewer.