Kurejito.Gateways.SagePay.VspDirect.SagePayPaymentGateway.ExtractStatus C# (CSharp) Method

ExtractStatus() private method

private ExtractStatus ( string pair ) : PaymentStatus
pair string
return PaymentStatus
        private PaymentStatus ExtractStatus(string[] pair)
        {
            switch (pair[1].ToUpper()) {
                case "OK":
                    return (PaymentStatus.Ok);
                case "MALFORMED":
                case "INVALID":
                    return (PaymentStatus.Invalid);
                case "NOTAUTHED":
                    return (PaymentStatus.Declined);
                case "ERROR"://TODO DB review this as added in by BT to fix red test.
                    return PaymentStatus.Error;
            }
            return (PaymentStatus.Undefined);
        }