public IActionResult OnPost() { var client = new Client(ShopId, SecretKey); var id = PaymentStorage.GetNextId(); var url = Request.GetUri(); var redirect = $"{url.Scheme}://{url.Authority}/ConfirmSync?id={id}"; var data = client.CreatePayment( new NewPayment() { Amount = new Amount() { Value = Amount, }, Confirmation = new Confirmation() { Type = ConfirmationType.Redirect, ReturnUrl = redirect }, Description = "Order" }); PaymentStorage.Payments[id] = new QueryData() { Client = client, Payment = data }; return(Redirect(data.Confirmation.ConfirmationUrl)); }
public void Initialize() { this.paymentStorage = new PaymentStorage(NullLoggerFactory.Instance); }
public PaymentTypeController() { _storage = new PaymentStorage(); }
public PaymentsController(PaymentStorage paymentStorage) { this.paymentStorage = paymentStorage; }