Exemple #1
0
            public void ShouldReturnTransaction()
            {
                var _acquirer = new TestAcquirer(true, "10000");

                var result = _processor.AuthorizePayment(_validAuthorizeRequest, new[] { _acquirer });

                result.Transactions.Count.ShouldBe(1);
            }
Exemple #2
0
            public void ShouldRefuseTransaction()
            {
                var _acquirer = new TestAcquirer(false, "10000");

                var result = _processor.AuthorizePayment(_validAuthorizeRequest, new[] { _acquirer });

                result.Approved.ShouldBe(_acquirer.Approved);
            }
Exemple #3
0
            public void ShouldCascadeAcquirers()
            {
                var _refusingAcquirer  = new TestAcquirer(false, ResponseCodes.DoNotHonour);
                var _approvingAcquirer = new TestAcquirer(true, "10000");

                var result = _processor.AuthorizePayment(_validAuthorizeRequest, new[] { _refusingAcquirer, _approvingAcquirer });

                result.Approved.ShouldBeTrue();
            }
Exemple #4
0
            public void ShouldReturnCascadedTransaction()
            {
                var _refusingAcquirer  = new TestAcquirer(false, ResponseCodes.DoNotHonour);
                var _approvingAcquirer = new TestAcquirer(true, "10000");

                var result = _processor.AuthorizePayment(_validAuthorizeRequest, new[] { _refusingAcquirer, _approvingAcquirer });

                result.Transactions.Count.ShouldBe(2);
            }
Exemple #5
0
            public void ShouldNotCascadeAcquirers()
            {
                var _refusingAcquirer  = new TestAcquirer(false, "10001");
                var _approvingAcquirer = new TestAcquirer(true, "10000");

                var result = _processor.AuthorizePayment(_validAuthorizeRequest, new[] { _refusingAcquirer, _approvingAcquirer });

                result.Approved.ShouldBeFalse();
            }