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); }
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); }
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); }
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); }
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); }