mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 14:04:26 +01:00
Checkout v2 (#4157)
* Opt-in for new checkout * Update wording * Create invoice view update * Remove jQuery from checkout testing code * Checkout v2 basics * WIP * WIP 2 * Updates and fixes * Updates * Design updates * More design updates * Cheating and JS fixes * Use checkout form id whenever invoices get created * Improve email form handling * Cleanups * Payment method exclusion cases for Lightning and LNURL TODO: Cases and implementation need to be discussed * Introduce CheckoutType in API and replace UseNewCheckout in backend Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
This commit is contained in:
@@ -138,6 +138,7 @@ namespace BTCPayServer.Controllers
|
||||
entity.RedirectAutomatically =
|
||||
invoice.RedirectAutomatically.GetValueOrDefault(storeBlob.RedirectAutomatically);
|
||||
entity.RequiresRefundEmail = invoice.RequiresRefundEmail;
|
||||
entity.CheckoutFormId = invoice.CheckoutFormId;
|
||||
entity.SpeedPolicy = ParseSpeedPolicy(invoice.TransactionSpeed, store.SpeedPolicy);
|
||||
|
||||
IPaymentFilter? excludeFilter = null;
|
||||
@@ -193,6 +194,8 @@ namespace BTCPayServer.Controllers
|
||||
entity.DefaultLanguage = invoice.Checkout.DefaultLanguage;
|
||||
entity.DefaultPaymentMethod = invoice.Checkout.DefaultPaymentMethod;
|
||||
entity.RedirectAutomatically = invoice.Checkout.RedirectAutomatically ?? storeBlob.RedirectAutomatically;
|
||||
entity.CheckoutFormId = invoice.Checkout.CheckoutFormId;
|
||||
entity.CheckoutType = invoice.Checkout.CheckoutType;
|
||||
entity.RequiresRefundEmail = invoice.Checkout.RequiresRefundEmail;
|
||||
IPaymentFilter? excludeFilter = null;
|
||||
if (invoice.Checkout.PaymentMethods != null)
|
||||
@@ -278,7 +281,6 @@ namespace BTCPayServer.Controllers
|
||||
|
||||
if (!noNeedForMethods)
|
||||
{
|
||||
|
||||
// This loop ends with .ToList so we are querying all payment methods at once
|
||||
// instead of sequentially to improve response time
|
||||
var x1 = store.GetSupportedPaymentMethods(_NetworkProvider)
|
||||
|
||||
Reference in New Issue
Block a user