Commit Graph

58 Commits

Author SHA1 Message Date
Nicolas Dorier
20025f254c
Use the plugin builder website instead of docker to fetch plugins (#4285) 2022-11-21 10:23:25 +09:00
JesterHodl
ec76acd3a6
Code analysis (#4293)
* Enable NETAnalyzers for whole project

- remove obsolete analyzers so that the .NET Core SDK NETAnalyzers can be used
- enable NETAnalyzers for all projects so that developers can use them by defining the AnalysisMode on individual projects

This is because if we set AnalysisMode to minimal, recommended or all it would spam with warning.
The idea is to be able to turn them on during development to fix recommended stuff without polluting the build output.

Following commits will implement some of the Code Analysis findings

* Performance hints for using char overloads for single characters (CA1834 and CA1847)

CA1834: Use StringBuilder.Append(char) for single character strings
CA1847: Use string.Contains(char) instead of string.Contains(string) with single characters
2022-11-20 17:42:36 +09:00
Kukks
c156254600 Validate cart cost with explicit amount 2022-11-18 16:50:26 +01:00
d11n
3805b7f287
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>
2022-11-02 18:21:33 +09:00
d11n
0fd47eeee0
Asset-bundle cleanups (#4225)
Some cleanups in addition to #4222.
2022-10-21 09:17:06 +09:00
d11n
ffa2c59df7
POS: Fix keypad view without custom amount (#4185)
The custom amount option was disabled by default in #4126. This requires some additional adaptations in the post action as otherwise the invoice won't be generated.

Fixes #4183.
2022-10-08 12:41:56 +09:00
Umar Bolatov
7106830be9
Make sure end date is after start date in Crowdfund app (#4084)
* Make sure end date is after start date in Crowdfund app

* Add null checks

* Add test case

Co-authored-by: Dennis Reimann <mail@dennisreimann.de>
2022-09-09 19:26:11 +09:00
Dennis Reimann
701ba59bd8 Convert public app parts 2022-08-21 08:38:25 +02:00
Dennis Reimann
8c6705bccb Make POS and Crowdfund plugins 2022-08-21 08:38:25 +02:00
Nicolas Dorier
c89f7aaaed
Improve email settings validation and UX (#3891) 2022-06-23 13:41:52 +09:00
nicolas.dorier
0da97c5da3
Report shopify errors to the UI (Fix #3853) 2022-06-15 14:12:47 +09:00
d11n
f0e013e1f8
Make Pay Button a plugin (#3862)
* Move files

* Fix potentially missing default payment method

Before, it got removed if any other value was changed besides the default payment method.

* Fix missing store data

* Update BTCPayServer/Plugins/PayButton/PayButtonPlugin.cs

Co-authored-by: Pavlenex <pavle@pavle.org>

* Update pay button warning

Closes #3535.

Co-authored-by: Pavlenex <pavle@pavle.org>
2022-06-15 11:32:46 +09:00
nicolas.dorier
8ce7466dc1
Fix: Invoices from shopify had empty orderId (Fix #3769) 2022-05-25 19:10:49 +09:00
Dennis Reimann
2ae4501de6 Rewording: Integrations become (store) plugins
We're keeping the `store-integrations-list` extension point name for backwards compatibility, otherwise I renamed all "integration" occurences in the views and also the routes.

Note: We still refer to external software like WooCommerce, Drupal, Magento and such as "integrations", I think that distinction makes sense.

Closes #3594.
2022-05-12 13:32:40 +02:00
Andrew Camilleri
21bd35accd
Fix shopify id / order no (#3718)
fixes #3636
2022-05-09 20:58:05 +09:00
Andrew Camilleri
51690b47a3
Transfer Processors (#3476)
* 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>
2022-04-24 12:19:34 +09:00
Kukks
e201ddd74c
Plugins: Fix plugin installer 2022-04-01 13:20:19 +02:00
Pavlenex
001ca7de60 Fix UI to match Shopify's 2022-03-31 14:51:16 +02:00
Kukks
e449ca2c95
Fix shopify 2022-03-31 10:13:07 +02:00
Kukks
5ef41294e4
Optimize github plugin fetching 2022-03-23 15:03:39 +00:00
Dennis Reimann
749c22a0c3 Refactoring: Extract HttpRequest extensions 2022-03-08 08:17:39 +00:00
Dennis Reimann
6867774627 Refactoring: Extract StringExtensions 2022-03-08 08:17:39 +00:00
Kukks
30d0410b49 fix shopify settings 2022-03-01 09:19:28 +01:00
Kukks
ecde91ff25 Plugins: Support plugin git remote with multiple versions of same plugins 2022-01-25 11:15:19 +01:00
Kukks
7243aec213 Support LNURL Auth 2022-01-14 13:26:30 +01:00
nicolas.dorier
7a787fc945
Rename UI controllers 2022-01-14 13:46:03 +09:00
d11n
69d1acc797
Empty states: Setup guide for store and wallet (#3255)
* 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>
2022-01-13 17:08:15 +09:00
Nicolas Dorier
04b8eafacb
Run dotnet format (#3244) 2021-12-31 16:59:02 +09:00
d11n
e2d0b7c5f7
Store centric UI: Part 3 (#3224)
* Set store context in cookie

* Fix page id usages in view

* Move Pay Button to nav

* Move integrations to plugins nav

* Store switch links to wallet if present

* Test fixes

* Nav fixes

* Fix altcoin view

* Main nav updates

* Wallet setttings nav update

* Move storeId cookie fallback to cookie auth handler

* View fixes

* Test fixes

* Fix profile check

* Rename integrations nav extension point to store-integrations-nav-list

* Allow strings for Active page/category for plugins

* Make invoice list filter based on store context

* Do not set context if we are running authorizer through tag helper

* Fix test and unfiltered invoices

* Add permission helper for wallet links

* Add sanity checks for payment requests and invoices

* Store context in home controller

* Fix PayjoinViaUI test

* Store context for notifications

* Minor UI improvements

* Store context for userstores and vault controller

* Bring back integrations page

* Rename notifications nav pages file

* Fix user stores controller policies

* Controller policy fixes from code review

* CookieAuthHandler: Simplify CanViewInvoices case

* Revert "Controller policy fixes from code review"

This reverts commit 97e8b8379c.

* Simplify LayoutSimple

* Fix CanViewInvoices condition

Co-authored-by: Kukks <evilkukka@gmail.com>
2021-12-31 16:36:38 +09:00
Andrew Camilleri
9b7ca76b99
Use Outstanding amount for shopify order invoices (#3203)
* Use Outstanding amount for shopify order invoices

* consider shopify order may have multiple transactions

* Use presentment currency not just currency

fixes #2683
2021-12-28 15:56:54 +09:00
nicolas.dorier
c0e9f91bdc
Fix warnings 2021-12-27 13:58:18 +09:00
nicolas.dorier
35aad4ebf9
Remove Logs static singletons 2021-11-23 13:55:34 +09:00
nicolas.dorier
f3e9e2ec5f
Fix: Creating a new invoice in payment request with LNURL activated would crash 2021-11-04 18:03:54 +09:00
Kukks
ed1ec2300d Remove Coinswitch entirely 2021-09-28 10:33:11 +02:00
Kukks
d949680d5a fix: Plugins disabled message never dissappers even after re-enabling it. 2021-09-27 09:03:59 +02:00
Kukks
4e56ef636b Make system plugins shown as system plugins
fixes #2741
2021-08-04 16:50:25 +02:00
Kukks
060fc46e4f Fix system plugins resource loading 2021-07-08 12:53:34 +02:00
Kukks
ac44ed56e0 fixx broken shopify links 2021-05-26 13:11:59 +02:00
Andrew Camilleri
201b4d6ec0
Fix Shopify parsing (#2530) 2021-05-19 16:26:54 +09:00
Kukks
86092fc955 Wrap more plugin loading logic in try catch to not crash fatally 2021-05-03 08:35:54 +02:00
Andrew Camilleri
4e1b18e2bb
do not crash invoice if wellknown metadata keys used with different e… (#2448)
* do not crash invoice if wellknown metadata keys used with different expected types

* fix

* add bits from alt PR
2021-04-28 16:49:10 +09:00
Kukks
1ada87ca31 Fix: Do not crash if plugin folder mismatches plugin identifier 2021-04-20 08:38:37 +02:00
Andrew Camilleri
64e34d0ef5
Seaparate CoinSwitch as a plugin (#2390)
* 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>
2021-04-13 20:19:48 +09:00
nicolas.dorier
98eee27b93
Remove warnings 2021-04-13 17:06:11 +09:00
nicolas.dorier
e014b30915
Remove on code warning 2021-04-08 14:33:58 +09:00
nicolas.dorier
cc5a388106
Properly escape script inputs for shopify integration 2021-04-08 13:44:51 +09:00
Andrew Camilleri
5de93f8cc4
Abstract Store integrations (#2384)
* Decouple Shopify from Store

* Decouple shopify from store blob

* Update BTCPayServer.Tests.csproj

* Make sure shopify obj is set

* make shopify a system plugin
2021-04-08 13:37:05 +09:00
Andrew Camilleri
6ead5c3800
Plugin FailSafe (#2351)
This introduces the concept of plugins being disabled in the case of an unrecoverable runtime error caused by a plugin.
2021-04-01 12:27:22 +09:00
nicolas.dorier
73d70aa5e5
Better validate file names 2021-03-19 18:55:21 +09:00
Kukks
9300326483 Remove Max body request size
Upload limit by kestrel restricts plugin upload of 30mb+. this removes that limit
2021-02-15 13:42:08 +01:00