Index: /main/waeup.uniben/trunk/src/waeup/uniben/remita/browser.py
===================================================================
--- /main/waeup.uniben/trunk/src/waeup/uniben/remita/browser.py	(revision 14766)
+++ /main/waeup.uniben/trunk/src/waeup/uniben/remita/browser.py	(revision 14767)
@@ -17,8 +17,11 @@
 ##
 
-from kofacustom.nigeria.remita.browser import (
+from kofacustom.nigeria.remita.studentsbrowser import (
     module_activated,
     RemitaRequestPaymentStatusPageStudent,
     RemitaPageStudent)
+from kofacustom.nigeria.remita.applicantsbrowser import (
+    RemitaRequestPaymentStatusPageApplicant,
+    RemitaPageApplicant)
 
 class CustomRemitaRequestPaymentStatusPageStudent(
@@ -63,4 +66,35 @@
         return lineitems
 
+    def dynamic_provider_amt(self, student):
+        if student.entry_session >= 2016:
+            return 2500.0
+        return 1500.0
+
+    @property
+    def xxx_lineitems(self):
+        provider_amt = 0.0
+        if self.context.p_category == 'schoolfee' and \
+            not self.context.p_item == 'Balance':
+            provider_amt = self.dynamic_provider_amt(self.student)
+        elif self.context.p_category == 'clearance':
+            provider_amt = self.dynamic_provider_amt(self.student)
+        inst_amt = self.context.amount_auth - provider_amt
+        if provider_amt:
+            lineitems = (
+                          {"lineItemsId":"itemid1","beneficiaryName":"Uniben",
+                          "beneficiaryAccount":"2017506430","bankCode":"011",
+                          "beneficiaryAmount":inst_amt,"deductFeeFrom":"1"},
+                          {"lineItemsId":"itemid2","beneficiaryName":"WAeAC",
+                          "beneficiaryAccount":"1014261520","bankCode":"057",
+                          "beneficiaryAmount":provider_amt,"deductFeeFrom":"0"}
+                        )
+        else:
+            lineitems = (
+                          {"lineItemsId":"itemid1","beneficiaryName":"Uniben",
+                          "beneficiaryAccount":"2017506430","bankCode":"011",
+                          "beneficiaryAmount":inst_amt,"deductFeeFrom":"1"},
+                        )
+        return lineitems
+
     def update(self):
         if not module_activated(self.context.student.current_session):
@@ -74,2 +108,54 @@
             return
         return
+
+class CustomRemitaRequestPaymentStatusPageApplicant(
+    RemitaRequestPaymentStatusPageApplicant):
+    """ Request webservice view for the Remita gateway.
+    """
+
+    # Here we use Remita test portal data
+    merchantId = '2547916'
+    host = 'www.remitademo.net'
+    https = True
+    api_key = '1946'
+
+class CustomRemitaPageApplicant(RemitaPageApplicant):
+    """ 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):
+
+        lineitems = (
+                      {"lineItemsId":"itemid1","beneficiaryName":"Klaus Mueller",
+                      "beneficiaryAccount":"6020067886","bankCode":"011",
+                      "beneficiaryAmount":self.context.amount_auth/2,"deductFeeFrom":"1"},
+                      {"lineItemsId":"itemid2","beneficiaryName":"Werner Rumm",
+                      "beneficiaryAccount":"0360883515","bankCode":"050",
+                      "beneficiaryAmount":self.context.amount_auth/2,"deductFeeFrom":"0"}
+                    )
+        return lineitems
+
+    def update(self):
+        if not module_activated(self.context.__parent__.__parent__.year):
+            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
