Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/helpers.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/helpers.py	(revision 17219)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/helpers.py	(revision 17221)
@@ -414,15 +414,17 @@
         return False, msg, log
 
-    # A typical JSON response ?????????????????
-
-    #payRef  "FBN|WEB|MX76823|13-12-2022|935097929|608001"
-    #txnref  "p6709347986663"
-    #amount  "10000"
-    #apprAmt "10000"
-    #resp    "00"
-    #desc    "Approved+by+Financial+Institution"
-    #retRef  "814212374638"
-    #cardNum ""
-    #mac ""
+    # A typical JSON response (test payment of Hector)
+
+    #{u'SplitAccounts': [],
+    #u'RemittanceAmount': 0,
+    #u'MerchantReference': u'p6709347986663',
+    #u'PaymentReference': u'FBN|WEB|MX76823|13-12-2022|935097929|608001',
+    #u'TransactionDate': u'2022-12-13T01:34:21',
+    #u'RetrievalReferenceNumber': u'814212374638',
+    #u'ResponseDescription': u'Approved by Financial Institution',
+    #u'Amount': 10000,
+    #u'CardNumber': u'',
+    #u'ResponseCode': u'00',
+    #u'BankCode': u'011'}
 
     if not 'ResponseCode' in jr.keys() \
Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/tests.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/tests.py	(revision 17219)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/tests.py	(revision 17221)
@@ -30,5 +30,6 @@
 from kofacustom.nigeria.interswitch.helpers import (
     query_interswitch, get_SOAP_response_paydirect, SOAP_post,
-    create_paydirect_booking
+    create_paydirect_booking,
+    confirm_transaction
     )
 from kofacustom.nigeria.testing import FunctionalLayer
@@ -37,6 +38,7 @@
 #   If you enable this, please make sure the external services
 #   do exist really and are not bothered by being spammed by a test programme.
-EXTERNAL_TESTS_1 = True
-EXTERNAL_TESTS_2 = True
+EXTERNAL_TESTS_1 = False
+EXTERNAL_TESTS_2 = False
+EXTERNAL_TESTS_3 = True
 
 PAYDIRECT_HOST = 'sandbox.interswitchng.com'
@@ -56,4 +58,14 @@
 def external_test_2(func):
     if not EXTERNAL_TESTS_2:
+        myself = __file__
+        if myself.endswith('.pyc'):
+            myself = myself[:-1]
+        print "WARNING: external tests are skipped!"
+        print "WARNING: edit %s to enable them." % myself
+        return
+    return func
+
+def external_test_3(func):
+    if not EXTERNAL_TESTS_3:
         myself = __file__
         if myself.endswith('.pyc'):
@@ -401,2 +413,45 @@
         self.assertMatches('...Total Amount Authorized:...',
                            self.browser.contents)
+
+# WebCheckout tests
+
+
+    # https://webpay.interswitchng.com/collections/api/v1/gettransaction.json?merchantcode=MX76823&transactionreference=p6709347986663&amount=100
+
+    @external_test_3
+    def test_confirm_transaction(self):
+        host = 'webpay.interswitchng.com'
+        url = '/collections/api/v1/gettransaction.json'
+        https = True
+        merchant_code = 'MX76823'
+        payment = StudentOnlinePayment()
+        payment.p_id ='p4465649308559'
+        success, msg, log = confirm_transaction(
+            payment, merchant_code, host, url, https)
+        self.assertFalse(success)
+        self.assertTrue('Unsuccessful callback:' in msg)
+        self.assertTrue('Transaction not Found' in log)
+
+        payment.p_id ='p6709347986663'
+        payment.amount_auth = 1.0
+        success, msg, log = confirm_transaction(
+            payment, merchant_code, host, url, https)
+        self.assertTrue('Amount Inconsistency' in log)
+        payment.amount_auth = 100.0
+        success, msg, log = confirm_transaction(
+            payment, merchant_code, host, url, https)
+        self.assertEqual('Successful callback received', msg)
+        self.assertTrue(success)
+        self.assertTrue(
+            "{u'SplitAccounts': [], "
+            "u'RemittanceAmount': 0, "
+            "u'MerchantReference': u'p6709347986663', "
+            "u'PaymentReference': u'FBN|WEB|MX76823|13-12-2022|935097929|608001', "
+            "u'TransactionDate': u'2022-12-13T01:34:21', "
+            "u'RetrievalReferenceNumber': u'814212374638', "
+            "u'ResponseDescription': u'Approved by Financial Institution', "
+            "u'Amount': 10000, "
+            "u'CardNumber': u'', "
+            "u'ResponseCode': u'00', "
+            "u'BankCode': u'011'}" in log)
+
Index: main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/webcheckoutbrowser.py
===================================================================
--- main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/webcheckoutbrowser.py	(revision 17219)
+++ main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/webcheckoutbrowser.py	(revision 17221)
@@ -205,8 +205,8 @@
     submit_button = _('Submit')
 
-    action = 'https://newwebpay.interswitchng.com/collections/w/pay'
-    currency = '566'
-    pay_item_id = 'Default_Payable_MX76823'
-    merchant_code = 'MX76823'
+    action = None
+    currency = None
+    pay_item_id = None
+    merchant_code = None
     gateway_amt = GATEWAY_AMT
 
@@ -261,7 +261,7 @@
     grok.require('waeup.payApplicant')
 
-    merchant_code = 'MX76823'
-    gateway_host = 'webpay.interswitchng.com'
-    gateway_url = '/collections/api/v1/gettransaction.json'
+    merchant_code = None
+    gateway_host = None
+    gateway_url = None
     https = True
 
@@ -295,5 +295,5 @@
         return
 
-class WebCheckoutConfirmTransactionRequestPageStudent(UtilityView, grok.View):
+class WebCheckoutConfirmTransactionPageStudent(UtilityView, grok.View):
     """ Request webservice view for the WebCheckout gateway
     """
@@ -302,7 +302,7 @@
     grok.require('waeup.payStudent')
 
-    merchant_code = 'MX76823'
-    gateway_host = 'webpay.interswitchng.com'
-    gateway_url = '/collections/api/v1/gettransaction.json'
+    merchant_code = None
+    gateway_host = None
+    gateway_url = None
     https = True
 
