* wip
* Cleanups
* UI updates
* Update UIFormsController.cs
* Make predefined forms usable statically
* Add support for pos app + forms
* pay request form rough support
* invoice form through receipt page
* Display form name in inherit from store setting
* Do not request additional forms on invoice from pay request
* fix up code
* move checkoutform id in checkout appearance outside of checkotu v2 toggle
* general fixes for form system
* fix pav bug
* UI updates
* Fix warnings in Form builder (#4331)
* Fix build warnings about string?
Enable nullable on UIFormsController.cs
Fixes CS8632 The annotation for nullable reference types should only be used in code within a '#nullable' annotations context.
* Clean up lack of space in injected services in Submit() of UIFormsController.cs
* Remove unused variables (CS0219) and assignment of nullable value to nullable type (CS8600)
* Cleanup double semicolons while we're at tit
* Fix: If reverse proxy wasn't well configured, and error message should have been displayed (#4322)
* fix monero issue
* Server Settings: Update Policies page (#4326)
Handles the multiple submit buttons on that page and closes#4319.
Contains some UI unifications with other pages and also shows the block explorers without needing to toggle the section via JS.
* Change confirmed to settled. (#4328)
* POS: Fix null pointer
Introduced in #4307, the referenced object needs to be `itemChoice` instead of `choice`.
* Add documentation link to plugins (#4329)
* Add documentation link to plugins
* Minor UI updates
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
* Fix flaky test (#4330)
* Fix flaky test
* Update BTCPayServer/PayoutProcessors/BaseAutomatedPayoutProcessor.cs
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: d11n <mail@dennisreimann.de>
* Remove invoice and store level form
* add form test
* fix migration for forms
* fix
* make pay request form submission redirect to invoice
* Refactor FormQuery to only be able to query single store and single form
* Put the Authorize at controller level on UIForms
* Fix warnings
* Fix ef request
* Fix query to forms, ensure no permission bypass
* Fix modify
* Remove storeId from step form
* Remove useless storeId parameter
* Hide custom form feature in UI
* Minor cleanups
* Remove custom form options from select for now
* More minor syntax cleanups
* Update test
* Add index - needs migration
* Refactoring: Use PostRedirect instead of TempData for data transfer
* Remove untested and unfinished code
* formResponse should be a JObject, not a string
* Fix case for Form type
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: JesterHodl <103882255+jesterhodl@users.noreply.github.com>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
Co-authored-by: Andreas Tasch <andy.tasch@gmail.com>
* Indent all JSON files with two spaces
* Upgrade Vue.js
* Cheat mode improvements
* Show payment details in case of expired invoice
* Add logo size recommendation
* Show clipboard copy hint cursor
* Improve info area and wording
* Update BIP21 wording
* Invoice details adjustments
* Remove form; switch payment methods via AJAX
* UI updates
* Decrease paddings to gain space
* Tighten up padding between logo mark and the store title text
* Add drop-shadow to the containers
* Wording
* Cheating improvements
* Improve footer spacing
* Cheating improvements
* Display addresses
* More improvements
* Expire invoices
* Customize invoice expiry
* Footer improvements
* Remove theme switch
* Remove non-existing sourcemap references
* Move inline JS to checkout.js file
* Plugin compatibility
See Kukks/btcpayserver#8
* Test fix
* Upgrade vue-i18next
* Extract translations into a separate file
* Round QR code borders
* Remove "Pay with Bitcoin" title in BIP21 case
* Add copy hint to payment details
* Cheating: Reduce margins
* Adjust dt color
* Hide addresses for first iteration
* Improve View Details button
* Make info section collapsible
* Revert original en locale file
* Checkout v2 tests
* Result view link fixes
* Fix BIP21 + lazy payment methods case
* More result page link improvements
* minor visual improvements
* Update clipboard code
Remove fallback for old browsers. https://caniuse.com/?search=navigator.clipboard
* Transition copy symbol
* Update info text color
* Invert dark neutral colors
Simplifies the dark theme quite a bit.
* copy adjustments
* updates QR border-radius
* Add option to remove logo
* More checkout v2 test cases
* JS improvements
* Remove leftovers
* Update test
* Fix links
* Update tests
* Update plugins integration
* Remove obsolete url code
* Minor view update
* Update JS to not use arrow functions
* Remove FormId from Checkout Appearance settings
* Add English-only hint and feedback link
* Checkout Appearance: Make options clearer, remove Custom CSS for v2
* Clipboard copy full URL instead of just address/BOLT11
* Upgrade JS libs, add content checks
* Add test for BIP21 setting with zero amount invoice
Co-authored-by: dstrukt <gfxdsign@gmail.com>
* 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>
* Payjoin label fixes
* When a payjoin label was applied, coin selection filter would not work
* When a payjoin happened with a receive address wallet, the payjoin label was not applied
* Coin selection shows when a utxo is currently reserved for a payjoin. Applies both to UI and to GF API
* remove reserved label
* Update BTCPayServer/Payments/PayJoin/PayJoinEndpointController.cs
This cleans up the client factory for plugins so that it is less hectic looking. Additionally, it fixes a bug where if you reuse the factory after setting a store, the state might stick.
* WIP New APIs for dealing with custodians/exchanges
* Simplified things
* More API refinements + index.html file for quick viewing
* Finishing touches on spec
* Switched cryptoCode to paymentMethod as this allows us to differentiate between onchain and lightning
* Moved draft API docs to "/docs-draft"
* WIP baby steps
* Added DB migration for CustodianAccountData
* Rough but working POST /v1/api/custodian-account + GET /v1/api/custodian
* WIP + early Kraken API client
* Moved service registration to proper location
* Working create + list custodian accounts + permissions + WIP Kraken client
* Kraken API Balances call is working
* Added asset balances to response
* List Custodian Accounts call does not load assetBalances by default, because it can fail. Can be requested when needed.
* Call to get the details of 1 specific custodian account
* Added permissions to swagger
* Added "tradableAssetPairs" to Kraken custodian response + cache the tradable pairs in memory for 24 hours
* Removed unused file
* WIP + Moved files to better locations
* Updated docs
* Working API endpoint to get info on a trade (same response as creating a new trade)
* Working API endpoints for Deposit + Trade + untested Withdraw
* Delete custodian account
* Trading works, better error handling, cleanup
* Working withdrawals + New endpoint for getting bid/ask prices
* Completed withdrawals + new endpoint for getting info on a past withdrawal to simplify testing, Enums are output as strings,
* Better error handling when withdrawing to a wrong destination
* WithdrawalAddressName in config is now a string per currency (dictionary)
* Added TODOs
* Only show the custodian account "config" to users who are allowed
* Added the new permissions to the API Keys UI
* Renamed KrakenClient to KrakenExchange
* WIP Kraken Config Form
* Removed files for UI again, will make separate PR later
* Fixed docs + Refactored to use PaymentMethod more + Added "name" to custodian account + Using cancelationToken everywhere
* Updated withdrawal info docs
* First unit test
* Complete tests for /api/v1/custodians and /api/v1/custodian-accounts endpoints + Various improvements and fixes
* Mock custodian and more exceptions
* Many more tests + cleanup, moved files to better locations
* More tests
* WIP more tests
* Greenfield API tests complete
* Added missing "Name" column
* Cleanup, TODOs and beginning of Kraken Tests
* Added Kraken tests using public endpoints + handling of "SATS" currency
* Added 1st mocked Kraken API call: GetAssetBalancesAsync
* Added assert for bad config
* Mocked more Kraken API responses + added CreationDate to withdrawal response
* pr review club changes
* Make Kraken Custodian a plugin
* Re-added User-Agent header as it is required
* Fixed bug in market trade on Kraken using a percentage as qty
* A short delay so Kraken has the time to execute the market order and we don't fetch the details too quickly.
* Merged the draft swagger into the main swagger since it didn't work anymore
* Fixed API permissions test
* Removed 2 TODOs
* Fixed unit test
* After a utxo rescan, the cached balance should be invalidated
* Fixed Kraken plugin build issues
* Added Kraken plugin to build
* WIP UI + config form
* Create custodian account almost working - only need to add in the config form
* Working form, but lacks refinement
* Viewing balances + Editing custodian account works, but cannot change the withdrawal destination config because that is an object using a name with [] in it
* cleanup
* Minor cleanup, comments
* Working: Delete custodian account
* Moved the MockCustodian used in tests to a new plugin + linked it to the tests
* WIP viewing custodian account balances
* Split the Mock custodian into a Mock + Fake, various UI improvements and minor fixes
* Minor UI fixes
* Removed broken link
* Removed links to anchors as they cannot pass the tests since they use JavaScript
* Removed non-existing link. Even though it was commented out, the test still broke?
* Added TODOs
* Now throwing BadConfigException if API key is invalid
* UI improvements
* Commented out unfinished API endpoints. Can be finished later.
* Show fiat value for fiat assets
* Removed Kraken plugin so I can make a PR
Removed more Kraken files
* Add experimental route on UICustodianAccountsControllre
* Removed unneeded code
* Cleanup code
* Processed Nicolas' feedback
Co-authored-by: Kukks <evilkukka@gmail.com>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Make LNURL enabled when only method
This fixes the scenario where LNURL for standard invoices are disabled, but the POS Print view only shows LNURL, so the QR code would always error out. The fix is to bypass the setting when lnurl is the only enabled payment method on the invoice
* Make sure not to affect other flows
* fix
* Public Invoice receipt
* implement payment,s qr, better ui, and fix invoice bug
* General view updates
* Update admin details link
* Update view
* add missing check
* Refactor
* make payments and qr shown by default
* move cusotmization options to own ReceiptOptions
* Make sure to sanitize values inside PosData partial
* Refactor
* Make sure that ReceiptOptions for the StoreData is never null, and that values are always set in API
* add receipt link to checkout and add tests
* add receipt link to lnurl
* Use ReceiptOptions.Merge
* fix lnurl
* fix chrome
* remove i18n parameterization
* Fix swagger
* Update translations
* Fix warning
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Store Emails
* fix test
* Update email rules layout
* Cleanups
* Test cleanups
* Add back comments
* Update view; add test
* Show email rules link even if email settings aren't completed
* Validate email addresses
* No redirect, display warning
* Fix test
* Refactoring: Change email argument types to MailAddress
* Test fix
* Refactoring: Use MailboxAddress
* Parse emails properly in controllers and backend
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Store Settings feature with own table
* fix test
* Include the store settings to StoreRepository, remove caching stuff
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
"Remove" issue likely due to multiple context instances. "Enable" issue due to conditional check.
Discovered bug with users when first disabling, then marking as admin, which remains an issue.
Right now the tooltips displayed do not specify using a view-only wallet, but there is no reason to upload full keys to BTCPay Server and view-only keys are actually the BTCPay Server recommendation.
Updated language in the UI to reflect that and made some minor improvements to the other language used in the UI here.
* Fix labels not showing multiple payouts payments
* Improve label tooltip
Makes it more readable
* Cleanup code
* Fix overflowing text in order ID field in invoices table (#3765)
close#3714
Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
Co-authored-by: Umar Bolatov <bolatovumar@gmail.com>
* Wallet transactions export
The exported data needs some more work.
* Fix transactions export policy
* Add test cases
* Fix Selenium warnings
* Finalize export format
* Test export download
* Remove CSV download check
* Try to fix test
* WIP New APIs for dealing with custodians/exchanges
* Simplified things
* More API refinements + index.html file for quick viewing
* Finishing touches on spec
* Switched cryptoCode to paymentMethod as this allows us to differentiate between onchain and lightning
* Moved draft API docs to "/docs-draft"
* WIP baby steps
* Added DB migration for CustodianAccountData
* Rough but working POST /v1/api/custodian-account + GET /v1/api/custodian
* WIP + early Kraken API client
* Moved service registration to proper location
* Working create + list custodian accounts + permissions + WIP Kraken client
* Kraken API Balances call is working
* Added asset balances to response
* List Custodian Accounts call does not load assetBalances by default, because it can fail. Can be requested when needed.
* Call to get the details of 1 specific custodian account
* Added permissions to swagger
* Added "tradableAssetPairs" to Kraken custodian response + cache the tradable pairs in memory for 24 hours
* Removed unused file
* WIP + Moved files to better locations
* Updated docs
* Working API endpoint to get info on a trade (same response as creating a new trade)
* Working API endpoints for Deposit + Trade + untested Withdraw
* Delete custodian account
* Trading works, better error handling, cleanup
* Working withdrawals + New endpoint for getting bid/ask prices
* Completed withdrawals + new endpoint for getting info on a past withdrawal to simplify testing, Enums are output as strings,
* Better error handling when withdrawing to a wrong destination
* WithdrawalAddressName in config is now a string per currency (dictionary)
* Added TODOs
* Only show the custodian account "config" to users who are allowed
* Added the new permissions to the API Keys UI
* Renamed KrakenClient to KrakenExchange
* WIP Kraken Config Form
* Removed files for UI again, will make separate PR later
* Fixed docs + Refactored to use PaymentMethod more + Added "name" to custodian account + Using cancelationToken everywhere
* Updated withdrawal info docs
* First unit test
* Complete tests for /api/v1/custodians and /api/v1/custodian-accounts endpoints + Various improvements and fixes
* Mock custodian and more exceptions
* Many more tests + cleanup, moved files to better locations
* More tests
* WIP more tests
* Greenfield API tests complete
* Added missing "Name" column
* Cleanup, TODOs and beginning of Kraken Tests
* Added Kraken tests using public endpoints + handling of "SATS" currency
* Added 1st mocked Kraken API call: GetAssetBalancesAsync
* Added assert for bad config
* Mocked more Kraken API responses + added CreationDate to withdrawal response
* pr review club changes
* Make Kraken Custodian a plugin
* Re-added User-Agent header as it is required
* Fixed bug in market trade on Kraken using a percentage as qty
* A short delay so Kraken has the time to execute the market order and we don't fetch the details too quickly.
* Merged the draft swagger into the main swagger since it didn't work anymore
* Fixed API permissions test
* Removed 2 TODOs
* Fixed unit test
* Remove Kraken Api as it should be separate opt-in plugin
* Flatten namespace hierarchy and use InnerExeption instead of OriginalException
* Remove useless line
* Make sure account is from a specific store
* Proper error if custodian code not found
* Remove various warnings
* Remove various warnings
* Handle CustodianApiException through an exception filter
* Store custodian-account blob directly
* Remove duplications, transform methods into property
* Improve docs tags
* Make sure the custodianCode saved is canonical
* Fix test
Co-authored-by: Wouter Samaey <wouter.samaey@storefront.be>
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Allow Users to be disabled/enabled
* rebrand to locked for api
* Update BTCPayServer/Views/UIAccount/Lockout.cshtml
Co-authored-by: d11n <mail@dennisreimann.de>
* fix docker compose and an uneeded check in api handler
* fix
* Add enabled user test
Co-authored-by: d11n <mail@dennisreimann.de>
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* LNURL: Use Lightning description template in LNURL metadata
Unifies the invoice description for the Lightning and LNURL payment methods and fixes#3634.
* Add POS Order ID for consistency with Crowdfund
* LNURL: Add POS item metadata to invoice
For consistency with the Lightning payment method. Closes#3655.
* Automated Transfer processors
This PR introduces a few things:
* Payouts can now be directly nested under a store instead of through a pull payment.
* The Wallet Send screen now has an option to "schedule" instead of simply creating a transaction. When you click on schedule, all transaction destinations are converted into approved payouts. Any options relating to fees or coin selection are discarded.
* There is a new concept introduced, called "Transfer Processors". Transfer Processors are services for stores that process payouts that are awaiting payment. Each processor specifies which payment methods it can handle. BTCPay Server will have some forms of transfer processors baked in but it has been designed to allow the Plugin System to provide additional processors.
* The initial transfer processors provided are "automated processors", for on chain and lightning payment methods. They can be configured to process payouts every X amount of minutes. For on-chain, this means payments are batched into one transaction, resulting in more efficient and cheaper fees for processing.
*
* fix build
* extract
* remove magic string stuff
* fix error message when scheduling
* Paginate migration
* add payout count to payment method tab
* remove unused var
* add protip
* optimzie payout migration dramatically
* Remove useless double condition
* Fix bunch of warnings
* Remove warning
* Remove warnigns
* Rename to Payout processors
* fix typo
Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
* Add dashboard and chart basics
* More widgets
* Make widgets responsive
* Layout dashboard
* Prepare ExplorerClient
* Switch to Chartist
* Dynamic data for store numbers and recent transactions tiles
* Dynamic data for recent invoices tile
* Improvements
* Plug NBXPlorer DB
* Properly filter by code
* Reorder cheat mode button
* AJAX update for graph data
* Fix create invoice button
* Retry connection on transient issues
* App Top Items stats
* Design updates
* App Sales stats
* Add points for weekly histogram, set last point to current balance
Co-authored-by: nicolas.dorier <nicolas.dorier@gmail.com>
* Update wallet navigation
* Find matching text color for label bg color
* Cleanup
* Extract WalletNav component
* Move PSBT link to Send and Rescan link to Settings
* Update transactions view
* Test fixes
* Adapt invoices list actions
* Show invoice actions only if there are any invoices
* Link wallet name and balance to tranactions list
* Move wallet related actions from list to settings
* Fix main menu z-index
Needs a value between fixed and the offcanvas backdrop, see https://getbootstrap.com/docs/5.1/layout/z-index/
* Update receive and send views
* Fix toggle alignment
* Crowdfund: Change defaults (disable sounds and Disqus)
* Crowdfund: Move callback notification URL into additional options
Same as with the Point Of Sale options.
* Crowdfund: Make enable toggle more prominent
* Crowdfund: Improve start and end date form group display
* Template Editor: Improve button spacing
* adjusts currency + target
* removes "other actions"
* adjusts text
* adjusts status message bottom margin
Co-authored-by: dstrukt <gfxdsign@gmail.com>
* 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