* Store Selector: Create first store button
* Add setup guide to homepage
* Policy update for stores list
* Fix test
* Initial create store button as primary
* Add notifications list to homepage
* Remove back to list from store create view
* Adapt content padding on desktop
* Add store home view with setup guide
* Fix active page nav highlighting
* Test fix
* Remove What's Next section
* Rename Store Home to Dashboard
* Fix Lightning setup link
* Add tests for store setup guide
* Update BTCPayServer/Views/Home/Home.cshtml
Co-authored-by: Pavlenex <pavle@pavle.org>
* Update BTCPayServer/Views/Stores/Dashboard.cshtml
Co-authored-by: Pavlenex <pavle@pavle.org>
* Remove setup guide on global homepage
* Remove Shopify setup link from nav
* Fix content container max-width on desktop
Co-authored-by: Pavlenex <pavle@pavle.org>
* updates create invoice
* updates invoice list
* formats
* updates row
* updates
* Improve invoice list markup and fix mass action form
* Responsive invoice table
* Improve spacing on invoice detail view
* Improve archive message
* Responsive status change partial
* Add test case for mass archiving
* Add mass unarchiving
Closes#3270.
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Change implementation of the Smtp server
* Update BTCPayServer/Services/Mails/EmailSettings.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Remove Confirmed state in UI
Closes#1789.
* Add infobox & improve refund tooltip
* Update BTCPayServer/Views/Invoice/ListInvoices.cshtml
Add @dennisreimann suggestion
Co-authored-by: d11n <mail@dennisreimann.de>
* Add "don't show again" button
Adds a "Don't Show Again" button to the infobox. Also a bugfix that was preventing the new status from showing in the invoice details page.
* Add User blob and move invoice status notice to it
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: Kukks <evilkukka@gmail.com>
* Wallet settings merge
Merges both wallet settings screen from the wallets and the store section. Closes#2626.
* Improve wallet transactions view
* Remove unnecessary row/col construct
Previously this didn't take into account the target currency. This leads to wrong values if the target currency is SATS and the invoice currency is BTC. This updates the value to be calculated with the rate and also takes into account the network fee. (Basically adjusting it to how the contribution values are calculated)
* LNURL Payment Method Support
* Merge recent Lightning controller related changes
* Fix build
* Create separate payment settings section for stores
* Improve LNURL configuration
* Prevent duplicate array entries when merging Swagger JSON
* Fix CanSetPaymentMethodLimitsLightning
* Fix CanUsePayjoinViaUI
* Adapt test for new cancel bolt invoice feature
* rebase fixes
* Fixes after rebase
* Test fixes
* Do not turn LNURL on by default, Off-Chain payment criteria should affects both BOLT11 and LNURL, Payment criteria of unset payment method shouldn't be shown
* Send better error if payment method not found
* Revert "Prevent duplicate array entries when merging Swagger JSON"
This reverts commit 5783db9eda.
* Fix LNUrl doc
* Fix some warnings
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Payout Destination Handling
fixes#2765
This PR:
* reactivates the BIP21 support for payouts.
* allows LNUrl destinations to be reusable.
* allows addresses to be reused in claims as long as the other claims are in a final state
* Ensure bolt amount matches the payout amount
* fixes
* reduce duplicate parsing of bolt
* make hash the id of bolt
* better bolt11 tostring
* use cached payment request from lnurl
* Improve language dropdown UX
Several improvements to the language selector dropdown list.
* Apply suggestions from code review
Incorporate styling suggestion from @dennisreimann
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: d11n <mail@dennisreimann.de>
* Easier payment testing
* WIP, more TODOs and some cleanup. Help is appreciated.
* Added dummy button to expire monitoring (doesn't work yet)
* Added TODO
* Make fake tab default if present
* Split controller and change wording from fake to testing
* Extract and simplify checkout testing UI
* Restrict testing access to regtest
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Remove Bootstrap/Creative CSS file customizability
Customizations should be done using themes
* Remove deprecated Casa and Classic themes
They are still available in the design system repo and should be added as custom theme CSS file
* Use either standard or custom theme
* Remove deprecated themes
* Improve theme select UI
* Finish and refactor theme switching
* updates theme copy
* Update BTCPayServer/Views/Server/Theme.cshtml
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
* Combine creative.css and site.css
Co-authored-by: dstrukt <gfxdsign@gmail.com>
Co-authored-by: Zaxounette <51208677+Zaxounette@users.noreply.github.com>
* wip
* Local GreenField Client for Plugins
* support notification handlers being missing
* Initial support for scoped btcpay client
* test out scoped local client
* wip
* small fix
* Throw exception if using local greenfield client and it has not been implemented yet
* adapt based on new changes in BTCPay
* update
* fix tests
* Allow Local client to bypass authorization handler
* Add Misc endpoints to Local API Client
* Add new endpoints
* Apply code review changes
* Auto-detect language on payment page
based on the requst Accept-Language header, which is the language you configured in your browser/OS and this 99.99% accurate
* Update BTCPayServer/Services/LanguageService.cs
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
* Update BTCPayServer/Services/LanguageService.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Update BTCPayServer/Services/LanguageService.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Update BTCPayServer/Services/LanguageService.cs
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* Added loop for all locales in Accept-Language sorted by weight + check if know this language
* New public method so a unit test can be created for it
* Unit test for language detection
* Fix language service when not in browser context
* fall back to default lang
* Auto-detect setting + ?lang=auto support
* Added invoice param "?lang=auto" info to docs
* Using null-coalescing assignment operator
* Reduce complexity and http dependency in language service
Co-authored-by: britttttk <39231115+britttttk@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <evilkukka@gmail.com>
* re-ordering
* adds section header
* updates label on "products"
* changes button to primary
* moves description
* updates partial
* re-ordering + section headers
* more section heads and ordering
* redorders
* Toggle custom amount and tips settings
* Use display name for point of sale app type
* Use switches for enabling options
* Add space before required indicator
* Set and consolidate view model display names
* Move redirects and custom CSS to additional options
* Revert to checkbox for discounts
* adds padding
* removes bs-parent for multiple open elements on accordion
* adds helper text to discount checkbox
* updates "default view" label text
* wording cleanup
* more wording adjustments
* updates
* Add display names for app types
* Extract template editor inline styles
* updates helper text
* Display names for app types
* Typo fix
* Move template back to editor
* Fix selenium test
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Refactor and decouple Payout logic
So that we can support lightning + external payout payments
Fixes & refactoring
almost there
final
Remove uneeded payment method checks
Refactor payouts to handle custom payment method specific actions
External onchain payments to approved payouts will now require "confirmation" from the merchant that it was sent by them.
add pill tabs for payout status
* Improve some UX around feature
* add test and some fixes
* Only listen to address tracked source and determine based on wallet get tx call from nbx
* Simplify isInternal for Payout detection
* fix test
* Fix Noreferrer test
* Make EnsureNewLightningInvoiceOnPartialPayment more resilient
* Make notifications section test more resilient in CanUsePullPaymentsViaUI
* Save paymentRequestId in Metadata when creating invoice
* Added Payment Request ID + link on invoice detail page
* Added paymentRequestId to the webhook payload
* Removed PaymentRequestId from webhook payload (rolled back previous change)
* Using strongly typed InvoiceMetadata
* Added OrderUrl metadata field to invoice + link
* Added Metadata.OrderUrl to docs
* Made orderUrl visible when no orderId is present
* Migrate existing U2F to Fido2
This seamlessly switches all u2f registrations over to the new FIDO2 support. Please note that I have not yet added a way to drop the u2f DB and its UI so that we can test the migration works properly for all.
* add testing logic
* fix u2f tests
* remove duplicate status message
* fix test and namespaces
* fix test
* TorServices Refactor to make value passing easier
* Allow specifying Tor services through config
Format:
BTCPAY_TORSERVICES: "BTCPAYSERVER:URL.ONION:VIRTUALPORT;BTC-P2P:URL.ONION:VIRTUALPORT;BTC-RPC:URL.ONION:VIRTUALPORT;SOMEOTHERONIONSERVICE:URL.ONION:VIRTUALPORT"
* add tests
* Optimize Tor Services loader and ensure it is loaded as a hosted service
* Remove Task from Tor service loader
* Use options to parse Tor services
* Fix booboo
* Fix test after fixing booboo
* Adding timeout on long running CanEnumeratetorServices test
(cherry picked from commit 274b77e3175960158b803410037e2c7ff31984be)
* Renaming timeout variable to better name
* Only allow one of torrcfile or torservices
Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
* Separate coinswitch as a system plugin
* Decouple Coinswitch from Checkout UI
* remove dummy csproj
* Remove CoinSwitchTests.cs per @NicolasDorier feedback
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
* Allow Payjoin for wallet receive addresses
* wip
* show bip21 and additional work
* style better
* add to docs
* pr changes
* remove from state when unreserved
* Document and handle Invoice Metadata better
PosData would crash in certain scenarios when created via API. Invoice metadata known fields were not completely documented
* Fix value setter when null
* fix swagger conformity
* make all swagger invoice metadata optional looking in json
* Decouple Shopify from Store
* Decouple shopify from store blob
* Update BTCPayServer.Tests.csproj
* Make sure shopify obj is set
* make shopify a system plugin
* Make Invoice Create Faster And Fix Gap Limit Issue
This make address reserve only when user "activate" paymet method in ui. optional setting in store checkout ui.
* Fix swagger documentation around Lazy payment methods
* fix changed code signature
* Add missing GreenField API for activate feature
* Fix checkout experience styling for activate feature
* Fix issue with Checkout activate button
* Make lightning also work with activation
* Make sure PreparePaymentModel is still called on payment handlers even when unactivated
* Make payment link return empty if not activated
* Add activate payment method method to client and add test
* remove debugger
* add e2e test
* Rearranging lazy payments position in UI to be near dependent Unified QR code
* fix rebase conflicts
* Make lazy payment method mode activate on UI load.
Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
Co-authored-by: Andrew Camilleri <kukks@btcpayserver.org>
* GreenField: Wallet API
* more work
* wip
* rough fiunish of transaction sending api
* Allow to create tx without broadcasting and small fixes
* Refactor Wallet Receive feature ad add greenfield api for address reserve for wallet
* add wallet api client
* add docs
* fix json converter tags
* fixes and add wallet tests
* fix tests
* fix rebase
* fixes
* just pass the tests already
* ugggh
* small cleanup
* revert int support in numeric string converter and make block id as native number in json
* fix LN endpoint
* try fix flaky test
* Revert "try fix flaky test"
This reverts commit 2e0d256325.
* try fix other flaky test
* return proepr error if fee rate could not be fetched
* try fix test again
* reduce fee related logic for wallet api
* try reduce code changes for pr scope
* change auth logic for initial release of wallet api
* Refactor how we handle and validate LN ConnectionStrings
* Migrate existing connection string to Internal Node if they are the same. Cleanup some obsolete fields
* Fix typos, remove duplicated method
* Add a InternalNodeRef to LightningSupportedPaymentMethod
* Introduce Additional Data to Store Blob and move obsolete props to migration
* Fixes and tests
* Small adjustements to prevent tracking too many objects
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Remove only dependency on Dbriize (TextSearch in new invoice column)
* Switch to table for invoice text search
* Adding missing using after rebase
* Removing database migration in preparation for refresh
* Database Migration: Adding InvoiceSearchData
* Refactoring InvoicesRepository to make AddToTextSearch static and non-async
Operation as async is too expensive for simple filtering and AddRange
* Renaming InvoiceQuery property to Take
More inline with what property does by convention, Take is used in conjuction with Skip
* Refactoring SettingsRepository so update of settings can happen in another context
* Adding DbMigrationsHostedService that performs long running data migrations
* Commenting special placing of MigrationStartupTask
* Simplifying code and leaving comment on expected flow
* Resolving problems after merge
* Database Migration: Refreshing database migration, ensuring no unintended changes on ModelSnapshot
Co-authored-by: rockstardev <rockstardev@users.noreply.github.com>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* GreenField: Notifications API
This refactors notifications so that we dont have a bunch of duplicated direct access to db contexts in controllers and then introduces new endpoints to fetch/toggle seen/remove notifications of the current user.
* add tests + docs
* fix test
* pr changes
* fix permission json
fixes#1958
Adds 2 new options:
* Do not allow stores to use the email settings of the server. Instead, they would need to fill in the email settings in their own store
* Do not allow user creation through the API unless you are an admin.
Both are opt-in and turned off by default.
This allows plugins to create custom dbcontexts, which would be namespaced in the scheme with a prefix. Migrations are supported too and the table would be prefixed too
* BTCPay Extensions Part 2
This PR cleans up the extension system a bit in that:
* It renames the test extension to a more uniform name
* Allows yo uto have system extensions, which are extensions but bundled by default with the release (and cannot be removed)
* Adds a tool to help you generate an extension package from a csproj
* Refactors the UI extension points to a view component
* Moves some more interfaces to the Abstractions csproj
* Rename to plugins
* Allow disabling notifications per user and disabling specific notifications per use
closes#1974
* Add disable notifs for all users
* fix term generator for notifications
* sow checkboxes instead of multiselect when js is enabled
* remove js dependency
* fix notif conditions
* Fix LN invoices
This commit adds more to the previous LN fix in the case of a partial payment to an invoice. While it generated a new LN invoice after 1 partial payment was made, there were some new issues uncovered:
* Any other subsequent partial payments was not listened to and did not generate an invoice ( fixed by listeneing to received payment event and makng sure that the status was already set `to partialPaid`)
* Any other subsequent partial payments caused a DbConcurrency error and did not generate an invoice ( Fixed in `MarkUnassigned`)
Added dedicated endpoint that generates an invoice or returns an existing one as needed for a shopify order
Added rate limiter to shopify endpoint to prevent abuse
Reduce shopify js to a small file
Use events from btcpay modal to reduce constant pinging to btcpay server
Register invoice payment failures on the shopify backend.
I upgrade lightning max/bitcoin min to support better control in store. Now can have setting only enable specific payment method only if value high/low I think make code simple more too and backward compatible
* Add No JS support for notification seen toggle
* Invalidate cache when user toggles seen/massaction
* mark notif as seen after click
* add additional mass actions
* fix formatting
* add pav changes
* invalidate cache on new notifs