예제 #1
0
        protected T ExtractResopnse <T>(LiqPayData responseData)
        {
            string responseJson = Encoding.UTF8.GetString(Convert.FromBase64String(responseData.Data));

            string signature = _signingService.Sign(responseJson);

            if (!signature.Equals(responseData.Signature))
            {
                new InvalidOperationException(Resources.ErrorStrings.InvalidSignature);
            }

            object response = JsonConvert.DeserializeObject(responseData.Data);

            return((T)response);
        }
예제 #2
0
        public CallbackResponse Callback(LiqPayData response)
        {
            CallbackResponse callbackResponse = ExtractResopnse <CallbackResponse>(response);

            return(callbackResponse);
        }