Exemplo n.º 1
0
            public void ResponseStatusTypes(SagePay.Response.ResponseStatus status)
            {
                var response = new FakeRefundTextResponse();
                response.Collection["Status"] = status.ToString().ToUpper();
                var decode = SagePay.Request.Refund.WebSageRefund.Decode(response.Write());

                Assert.Equal(status, decode.Status);
            }
Exemplo n.º 2
0
            public void AddressResultTypes(SagePay.Response.MatchStatus status, string code)
            {
                var response = new FakePaymentTextResponse();
                response.Collection["AddressResult"] = code;
                var decode = SagePay.Request.Payment.WebSagePayment.Decode(response.Write());

                Assert.Equal(status, decode.AddressResult);
            }
Exemplo n.º 3
0
            public void ThreeDSecureTypes(SagePay.Response.ThreeDSecureStatus status)
            {
                var response = new FakePaymentTextResponse();
                response.Collection["3DSecureStatus"] = status.ToString().ToUpper();
                var decode = SagePay.Request.Payment.WebSagePayment.Decode(response.Write());

                Assert.Equal(status, decode.ThreeDSecure);
            }
Exemplo n.º 4
0
            public void TxTypeTypes(SagePay.Request.Payment.PaymentRequest.PaymentType type, string expected)
            {
                var request = new SagePay.Request.Payment.WebSagePayment(SageConfiguration.CONFIG_TYPE, TEST_URL);
                request.Transaction = PaymentRequest.SampleRequest();
                request.Transaction.TxType = type;
                var encode = request.Encode();

                Assert.Equal(encode["TxType"], expected);
            }
Exemplo n.º 5
0
            public void AVSCV2Types(SagePay.Response.CV2Status status, string code)
            {
                var response = new FakePaymentTextResponse();
                response.Collection["AVSCV2"] = code;
                var decode = SagePay.Request.Payment.WebSagePayment.Decode(response.Write());

                Assert.Equal(status, decode.AVSCV2);
            }