Ignore:
Timestamp:
18 Dec 2022, 09:24:18 (21 months ago)
Author:
Henrik Bettermann
Message:

Use Mac validation.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/kofacustom.nigeria/trunk/src/kofacustom/nigeria/interswitch/tests.py

    r17221 r17231  
    419419    # https://webpay.interswitchng.com/collections/api/v1/gettransaction.json?merchantcode=MX76823&transactionreference=p6709347986663&amount=100
    420420
     421    mac = "uS6U18pC6GFKCpJoZH6J6jlOmR81FSrHkjBRpMaaydNQtywuG0hdB02J56MCqLV8rmzeAkhiaQR2nNcX3EPJePl5ppidImeKSzdunhddQh61UGpZPiS2CxMdAem8ueA1"
     422
    421423    @external_test_3
    422424    def test_confirm_transaction(self):
     
    427429        payment = StudentOnlinePayment()
    428430        payment.p_id ='p4465649308559'
     431        payment.amount_auth = 100000.0
    429432        success, msg, log = confirm_transaction(
    430             payment, merchant_code, host, url, https)
     433            payment, merchant_code, host, url, https, self.mac)
    431434        self.assertFalse(success)
    432435        self.assertTrue('Unsuccessful callback:' in msg)
     
    436439        payment.amount_auth = 1.0
    437440        success, msg, log = confirm_transaction(
    438             payment, merchant_code, host, url, https)
     441            payment, merchant_code, host, url, https, self.mac)
    439442        self.assertTrue('Amount Inconsistency' in log)
    440443        payment.amount_auth = 100.0
    441444        success, msg, log = confirm_transaction(
    442             payment, merchant_code, host, url, https)
     445            payment, merchant_code, host, url, https, self.mac)
    443446        self.assertEqual('Successful callback received', msg)
    444447        self.assertTrue(success)
Note: See TracChangeset for help on using the changeset viewer.