Exemplo n.º 1
0
        public void Create_ValidData_ReturnsHashedString()
        {
            string data      = nameof(data);
            string secretKey = nameof(secretKey);

            string hash = Seal.Create(data, secretKey);

            Assert.AreEqual("783d75107b3ce5d2a7a6dc6f8d311edd5154992b625f870965e5c7c543e91ba5", hash);
        }
Exemplo n.º 2
0
        private IPaymentPostData CreatePostData(IPaymentRequest request)
        {
            PaymentRequestValidator.Validate(request);

            string data = DataString.Create(Configuration, request);
            string seal = Seal.Create(data, Configuration.SecretKey);

            return(new PaymentPostData()
            {
                Data = data,
                Seal = seal,
            });
        }