Beispiel #1
0
        public void CardPaymentTest()
        {
            // Arrange


            var raveConfig = new RavePayConfig(TestConsts.recurringPbKey, TestConsts.recurringScKey, false);
            var cardCharge = new RaveCardCharge(raveConfig);

            var cardParams = new CardChargeParams(TestConsts.recurringPbKey, "Okezie", "Okpara", "*****@*****.**",
                                                  3500)
            {
                CardNo = "5438898014560229", Cvv = "789", Expirymonth = "09", Expiryyear = "19", TxRef = tranxRef
            }
            ;
            var cha = cardCharge.Charge(cardParams).Result;


            if (cha.Message == "AUTH_SUGGESTION" && cha.Data.SuggestedAuth == "PIN")
            {
                cardParams.Pin           = "3310";
                cardParams.Otp           = "12345";
                cardParams.SuggestedAuth = "PIN";
                cha = cardCharge.Charge(cardParams).Result;
            }


            Assert.IsNotNull(cha.Data);
            Assert.AreEqual("success", cha.Status);
            ValidateCardCharge(cha.Data.FlwRef);
        }
Beispiel #2
0
        public void GithubIssue21CardTest()
        {
            var raveConfig = new RavePayConfig("FLWPUBK-69dd4afe3cf6de390bf3c8f755244e24-X", "FLWSECK-d18452a2f01ad26305f7a2a5ffe24305-X", true);
            var cardCharge = new RaveCardCharge(raveConfig);

            var cardParams = new CardChargeParams("FLWPUBK-69dd4afe3cf6de390bf3c8f755244e24-X", "Okezie", "Okpara", "*****@*****.**",
                                                  3500)
            {
                CardNo = "5399831125815419", Cvv = "892", Expirymonth = "04", Expiryyear = "19", TxRef = tranxRef
            }
            ;
            var cha = cardCharge.Charge(cardParams).Result;


            if (cha.Message == "AUTH_SUGGESTION" && cha.Data.SuggestedAuth == "PIN")
            {
                cardParams.Pin           = "3310";
                cardParams.Otp           = "12345";
                cardParams.SuggestedAuth = "PIN";
                cha = cardCharge.Charge(cardParams).Result;
            }


            Assert.IsNotNull(cha.Data);
            Assert.AreEqual("success", cha.Status);
        }