## $Id: browser.py 14751 2017-08-02 11:38:25Z henrik $ ## ## Copyright (C) 2017 Uli Fouquet & Henrik Bettermann ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ## from kofacustom.nigeria.remita.browser import ( module_activated, RemitaPaymentRequestWebservicePageStudent, RemitaPageStudent) class CustomRemitaPaymentRequestWebservicePageStudent( RemitaPaymentRequestWebservicePageStudent): """ Request webservice view for the Remita gateway. """ # Here we use Remita test portal data merchantId = '2547916' host = 'www.remitademo.net' https = False api_key = '1946' class CustomRemitaPageStudent(RemitaPageStudent): """ View which sends a POST request to the Remita payment gateway. """ # Here we use Remita test portal data merchantId = '2547916' serviceTypeId = '4430731' api_key = '1946' #orderId = '3456346346' host = 'www.remitademo.net' init_url = '/remita/ecomm/split/init.reg' #amount='1000' https = True action = 'http://www.remitademo.net/remita/ecomm/finalize.reg' @property def lineitems(self): ba1 = self.context.amount_auth / 2 ba2 = self.context.amount_auth / 2 lineitems = ( {"lineItemsId":"itemid1","beneficiaryName":"Klaus Mueller", "beneficiaryAccount":"6020067886","bankCode":"011", "beneficiaryAmount":str(ba1),"deductFeeFrom":"1"}, {"lineItemsId":"itemid2","beneficiaryName":"Werner Rumm", "beneficiaryAccount":"0360883515","bankCode":"050", "beneficiaryAmount":str(ba2),"deductFeeFrom":"0"} ) return lineitems def update(self): if not module_activated(self.context.student.current_session): return self.orderId = self.context.p_id self.amount = str(self.context.amount_auth) error = self.init_update() if error: self.flash(error, type='danger') self.redirect(self.url(self.context, '@@index')) return return