Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/browser.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/browser.py	(revision 14752)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/browser.py	(revision 14753)
@@ -61,7 +61,43 @@
         return self.view.url(self.view.context, self.target)
 
+class RemitaRequestPaymentStatusActionButtonStudent(ManageActionButton):
+    grok.order(2)
+    grok.context(INigeriaOnlinePayment)
+    grok.view(OPDPStudent)
+    grok.require('waeup.payStudent')
+    icon = 'actionicon_call.png'
+    text = _('Requery Remita Payment Status')
+    target = 'request_payment_status'
+
+    @property
+    def target_url(self):
+        if not module_activated(self.context.student.current_session):
+            return ''
+        if self.context.p_state in ('paid', 'waived'):
+            return ''
+        return self.view.url(self.view.context, self.target)
+
+
+class RemitaVerifyPaymentStatusActionButtonStudent(ManageActionButton):
+    grok.order(3)
+    grok.context(INigeriaOnlinePayment)
+    grok.view(OPDPStudent)
+    grok.require('waeup.manageStudent')
+    icon = 'actionicon_call.png'
+    text = _('Verify Remita Payment Status')
+    target = 'verify_payment_status'
+
+    @property
+    def target_url(self):
+        if not module_activated(self.context.student.current_session):
+            return ''
+        if self.context.p_state != 'paid' \
+            or self.context.r_company != u'remita':
+            return ''
+        return self.view.url(self.view.context, self.target)
+
 # Webservice request views
 
-class RemitaPaymentRequestWebservicePageStudent(UtilityView, grok.View):
+class RemitaRequestPaymentStatusPageStudent(UtilityView, grok.View):
     """ Request webservice view for the Remita gateway.
     """
@@ -118,4 +154,62 @@
         self.redirect(self.url(self.context, '@@index'))
         return
+
+class RemitaVerifyPaymentStatusPageStudent(UtilityView, grok.View):
+    """ Request webservice view for the Remita gateway.
+    """
+    grok.context(INigeriaStudentOnlinePayment)
+    grok.name('verify_payment_status')
+    grok.require('waeup.payStudent')
+
+    # Here we use Remita test portal data
+    merchantId = '2547916'
+    host = 'www.remitademo.net'
+    https = False
+    api_key = '1946'
+
+    def update(self):
+        if not module_activated(self.context.student.current_session):
+            return
+        if self.context.p_state  != 'paid' \
+            or self.context.r_company != u'remita':
+            self.flash(_('This ticket has not been paid.'), type='danger')
+            return
+        student = self.context.student
+        RRR = self.context.r_pay_reference
+        if not RRR:
+            self.flash(_('Remita Retrieval Reference not found.'), type='danger')
+            return
+
+        # Remita sends a POST request which may contain more information
+        # if a payment was not successful.
+        resp = self.request.form
+        if resp and resp.get('statuscode') not in (None, '025', '00', '01'):
+            self.flash('Transaction status message from Remita: %s'
+                % resp.get('status'), type='warning')
+
+        success, msg, log = query_remita(
+            self.context,
+            self.merchantId,
+            self.api_key,
+            RRR,
+            self.host,
+            self.https,
+            True)
+
+        student.writeLogMessage(self, log)
+        if not success:
+            self.flash(msg, type='danger')
+            return
+        write_payments_log(student.student_id, self.context)
+        flashtype, msg, log = self.context.doAfterStudentPayment()
+        if log is not None:
+            student.writeLogMessage(self, log)
+        self.flash(msg, type=flashtype)
+        return
+
+    def render(self):
+        self.redirect(self.url(self.context, '@@index'))
+        return
+
 
 # Forwarding pages
Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/helpers.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/helpers.py	(revision 14752)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/remita/helpers.py	(revision 14753)
@@ -30,5 +30,5 @@
         merchantId, serviceTypeId, api_key, orderId,
         amount, responseurl, host, url, https, fullname, email, lineitems):
-    hashargs = 	merchantId + serviceTypeId + orderId + amount + responseurl + api_key
+    hashargs = 	merchantId + serviceTypeId + orderId + str(amount) + responseurl + api_key
     hashvalue = hashlib.sha512(hashargs).hexdigest()
     headers={
