public PaymentsService(
            ITransactionService transactionAppService,
            IPriceListService priceListService,
            ITicketTypeService ticketTypeService,
            ITicketService ticketService,
            IUserService userService,
            IMerchant merchant
            )
        {
            this.userService           = userService;
            this.ticketService         = ticketService;
            this.userService           = userService;
            this.transactionAppService = transactionAppService;
            this.priceListService      = priceListService;
            this.ticketTypeService     = ticketTypeService;

            liqPayClient = new LiqPayClient(merchant.PublicKey, merchant.PrivateKey);
        }
Beispiel #2
0
        public async Task LiqPay(User u, Rent r)
        {
            double price = (r.EndTime - r.StartTime).Value.Hours * 30;

            price = price == 0 ? 30 : price;
            var invoiceRequest = new LiqPayRequest
            {
                Email    = u.Email,
                Amount   = price,
                Currency = "UAH",
                OrderId  = r.RentId.ToString(),
                Action   = LiqPayRequestAction.InvoiceSend,
                Language = LiqPayRequestLanguage.RU
            };

            var liqPayClient = new LiqPayClient("sandbox_i33754480935", "sandbox_H2hSOXg3sjkkhpV42jcSVTWvNTiwtjbKvfFYr2n6");
            //liqPayClient.IsCnbSandbox = true;
            var response = await liqPayClient.RequestAsync("request", invoiceRequest);
        }
Beispiel #3
0
 public void LiqPayTestInit()
 {
     lp = new LiqPayClient("publicKey", "privateKey");
 }