Ejemplo n.º 1
0
        public ChangeTransactionStatusRequest CreateChangeTransactionStatusRequest(Shop shop, string wsPayOrderId, string stan, string approvalCode, double price)
        {
            var formattedPrice = WSPayHelpers.FormatPrice(price);
            var signature      =
                signatureFactory.GenerateChangeTransactionStatusSignature(shop, wsPayOrderId, stan,
                                                                          approvalCode, price);

            return(new ChangeTransactionStatusRequest
            {
                WSPayOrderId = wsPayOrderId,
                ShopId = shop.ShopId,
                Amount = formattedPrice,
                Stan = stan,
                ApprovalCode = approvalCode,
                Signature = signature
            });
        }
        public void GenerateChangeTransactionStatusSignature()
        {
            var actual = signatureFactory.GenerateChangeTransactionStatusSignature(RegularShop, "testCartId", "stan", "approvalCode", 15.25);

            actual.Should().Be("811a70921015b6b95e6541da6d73cf43");
        }