Commit Graph

831 Commits

Author SHA1 Message Date
Salie Hendricks
e59821caa1
GetInvoiceRaw used its own dbContext while calling code used a different one which causes the calling context not to track changes - thus nothing is saved. (#2197)
Co-authored-by: Salie Hendricks <salie@safarinow.com>
2021-01-16 09:00:19 +01:00
nicolas.dorier
0c79474e0c
Do not index metadata 2021-01-11 23:32:32 +09:00
nicolas.dorier
e2e37a0db4
Make sure that the invoice currency is normalized to uppercase (Fix #2146) 2021-01-07 22:30:57 +09:00
Umar Bolatov
fe4ffcfc62
Update notification dropdown styling (#2167)
* Update notification dropdown strings

* Update notification dropdown styling

address #2131

* Update border color

* Update notification hover color

* Revert "was confirmed paid" to "has been paid" change

* Move styles to site.css

* Update style="border-bottom: 0;" to border-bottom-0

* Update heading

* Add icon sprite

* Add default icon styles

* Use "currentColor" instead of specific color for icon

* Update icon color definition

* Adjust dropdown position

* Update h4 to h5
2021-01-07 18:07:42 +09:00
nicolas.dorier
b2959e583a
Use default color for label if the color of a label is not set 2021-01-05 16:33:24 +09:00
Nicolas Dorier
0929857b12
Attempt to solve webhooks disappearing (#2178) 2021-01-05 12:38:12 +09:00
Andrew Camilleri
aaf85216eb
Split Options in BTCPayOptions (#2175)
* Split Options in BTCPayOptions

* fix spacing
2021-01-02 13:44:28 +01:00
Andrew Camilleri
ae32fdeea7
Introduce Additional Data to Store Blob and move obsolete props to migration (#2065)
* 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>
2020-12-29 17:58:35 +09:00
Andrew Camilleri
39b5462809
Remove only dependency on Dbriize (TextSearch in new invoice column) (#2029)
* 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>
2020-12-28 19:10:53 +09:00
Andrew Camilleri
034b732e7c
GreenField: Update invoice metadata (#2095)
* GreenField: Update invoice metadata

* add swagger

Co-authored-by: Nicolas Dorier <nicolas.dorier@gmail.com>
2020-12-12 15:15:34 +09:00
Umar Bolatov
b1e9c005b7
Add "Mark all as seen" button to notification dropdown (#2101) 2020-12-12 14:14:50 +09:00
Nicolas Dorier
0d144d088e
Refactor label implementation (Fix #2090) (#2123) 2020-12-12 14:10:47 +09:00
Andrew Camilleri
0652e30c30
GreenField: Notifications API (#2055)
* 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
2020-12-11 23:11:08 +09:00
nicolas.dorier
798cf66e3f
Add checkoutLink and defaultLanguage to GreenField invoice 2020-12-11 12:04:18 +09:00
Kukks
dfd7c6d4a6 add tests and reword setting 2020-12-08 08:12:29 +01:00
Kukks
c17b8e4d9e Introduce Spam protection
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.
2020-12-04 08:08:05 +01:00
Kukks
d5cbe66b0e fix monero condition 2020-11-25 06:25:33 +01:00
nicolas.dorier
18e68d04f9
Rename invoice states and payment states 2020-11-23 18:28:35 +09:00
Nicolas Dorier
8a21dfa93f
Merge pull request #2051 from Kukks/separate-ln-bitcoin-checkout-part2
Separate ln bitcoin checkout part2
2020-11-19 21:04:46 +09:00
Kukks
25e979687f Fix monero sync height check
based on issue at https://github.com/monero-project/monero/issues/7029
2020-11-19 12:27:05 +01:00
Nicolas Dorier
e72becdfcb
Merge branch 'master' into separate-ln-bitcoin-checkout-part2 2020-11-19 12:44:01 +09:00
Nicolas Dorier
4bd97eecc9
Merge pull request #2050 from Kukks/separate-btc-ln-checkout
Separate views of Bitcoin and LN
2020-11-19 12:42:17 +09:00
Nicolas Dorier
23002ac70d
Merge pull request #2068 from Kukks/plugins-db
Plugins: Allow creation of independent DbContexts
2020-11-19 12:39:26 +09:00
nicolas.dorier
1262ad3cd4
Fix warnings 2020-11-19 12:34:56 +09:00
Nicolas Dorier
d8f145c4dc
Merge branch 'master' into plugins-db 2020-11-19 12:19:17 +09:00
Nicolas Dorier
9c5fd1b478
Merge pull request #2058 from NicolasDorier/webhook2
Add Webhooks in store's settings
2020-11-19 12:17:34 +09:00
Kukks
179520a211 Plugins: Allow creation of independent DbContexts
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
2020-11-18 12:27:26 +01:00
nicolas.dorier
94bcbeb604
Add Greenfield API 2020-11-13 14:15:03 +09:00
rockstardev
7f79d16f02 Code cleanup of used classes 2020-11-08 23:56:39 -06:00
nicolas.dorier
f3611ac693
Add Webhooks in store's settings 2020-11-08 15:57:24 +09:00
Kukks
e021d42551 Ensure that there is no LN/Bitcoin specific logic in the Invoice UI endpoint 2020-11-06 11:09:17 +01:00
Kukks
a729dd1380 Separate views of Bitcoin and LN 2020-11-06 09:35:26 +01:00
Andrew Camilleri
d2910686cd
Fix link from app label (#2028) 2020-11-02 12:26:11 +01:00
nicolas.dorier
b9ca02088d
Make a batch query for all pending invoice (Fix #2022) 2020-10-28 23:21:46 +09:00
Kukks
2083954aa5 add comment 2020-10-27 08:19:41 +01:00
Kukks
66af258876 fix tests 2020-10-27 08:00:34 +01:00
nicolas.dorier
a30456a92d
Fix warnings 2020-10-26 14:19:05 +09:00
Nicolas Dorier
758f627e12
Partially paid invoices should be reused in payment requests. Cleanup the code. (#2008) 2020-10-23 21:00:23 +09:00
Nicolas Dorier
7a711f0690
Merge pull request #1983 from Kukks/fix-email-search
fix email not included in textsearch
2020-10-23 17:26:10 +09:00
nicolas.dorier
067b977ec8
Do not include maxadditionalfeecontribution if there is no change. (#2007) 2020-10-23 11:57:06 +09:00
Andrew Camilleri
5979fe5eef
BTCPay Extensions Part 2 (#2001)
* 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
2020-10-21 14:02:20 +02:00
Andrew Camilleri
71894ba245
Override Block Explorer Links (#2000)
* Override Block Explorer Links

closes #1953

* load overrides after save as well

* fix js
2020-10-21 09:53:05 +02:00
Andrew Camilleri
4d0b402e8b
Allow disabling notifications per user and disabling specific notifications per user (#1991)
* 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
2020-10-20 13:09:09 +02:00
rockstardev
543e628a8b Removing rates hint 2020-10-18 03:11:17 -05:00
rockstardev
75dcdc72d2 Showing warning hint on stores listing page 2020-10-18 03:11:17 -05:00
rockstardev
15af66de55 Setting hints during store creation and update 2020-10-18 03:11:17 -05:00
Andrew Camilleri
e3a0fe88c1
Fix LN invoices (#1955)
* 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`)
2020-10-17 08:57:21 +02:00
Andrew Camilleri
1440e8c55d
BTCPay Server Extensions (#1925)
* BTCPay Server Extensions

![demo](https://i.imgur.com/2S00aL2.gif)

* cleanup

* fix

* Polish UI a bit,detect when docker deployment
2020-10-15 21:28:09 +09:00
Andrew Camilleri
e2eb26eb93
Use base65 instead of hex for BIP78 (#1985)
fixes #1984
2020-10-14 12:01:21 +02:00
Kukks
740a50a26d fix email not included in textsearch
fixes #1979
2020-10-14 09:16:31 +02:00
Nicolas Dorier
d9d2c7d213
Merge pull request #1938 from NicolasDorier/email-pwd
Do not show password in clear text in email configuration (Fix #1790)
2020-10-08 12:01:21 +09:00
rockstardev
4187e0f94c Mark Shopify orders paid on invoice payment confirmed 2020-10-05 16:23:21 -05:00
nicolas.dorier
60cadb8b6d
Do not show password in clear text in email configuration (Fix #1790) 2020-10-05 17:57:50 +09:00
nicolas.dorier
6069e8f083
Fix test fail and warnings 2020-10-01 20:17:20 +09:00
Nicolas Dorier
a66578c46d
Merge pull request #1871 from xpayserver/feat/payment-method-criteria
Add Value Criteria For Payment Method
2020-09-30 20:40:31 +09:00
Nicolas Dorier
e45dcf61c4
Merge pull request #1831 from btcpayserver/add-btc-index
Show index of payment address for onchain payments
2020-09-30 18:35:51 +09:00
rockstardev
0d4ca4520b Ensuring matching of keywords only on first transaction 2020-09-29 17:23:42 -05:00
rockstardev
f1c1846c66 Restoring BtcPay keywords 2020-09-29 16:54:33 -05:00
Kukks
c1808164f2 Log Shopify registration better 2020-09-29 16:51:22 -05:00
Kukks
6da6723c72 Be sure to match transaction gateway in Shopify registration 2020-09-29 16:50:17 -05:00
Kukks
3ce6269212 Remove unused imports 2020-09-29 16:47:18 -05:00
Kukks
c07952629c Commenting OrderTransactionRegisterLogic 2020-09-29 16:46:28 -05:00
Kukks
4a596c7373 Remove leftover shopify API calls and script creation 2020-09-28 07:58:49 +02:00
rockstardev
694cedb89a Handling scenario where user provides invalid Shopify credentials 2020-09-25 13:50:23 -05:00
Kukks
03d6c86899 Revert "Make Invoices save internal tags in the text search"
This reverts commit f352399428.
2020-09-24 17:33:15 +02:00
Kukks
c9f0295516 Make Shopify transaction register system handle marked payments slightly more 2020-09-24 16:25:36 +02:00
Kukks
42df6d58b1 Simplify Shopify integration
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.
2020-09-24 16:25:35 +02:00
Kukks
078a2d7e39 Reduce Shopify integration steps and make sure checks work. 2020-09-24 16:25:35 +02:00
Kukks
f352399428 Make Invoices save internal tags in the text search 2020-09-24 16:25:35 +02:00
Kukks
3054f91fe7 Fix typo in Invoice method param 2020-09-24 16:25:35 +02:00
Kukks
91da129abc Include missing Shopify API models 2020-09-24 16:25:35 +02:00
Kukks
19cc93daae Reduce steps to 1 when integrating Shopify and start adding more API calls for Shopify to reduce JS logic 2020-09-24 16:25:35 +02:00
Kukks
0cf9b20328 Kukks Shopify Enhancement Suite Commit 2020-09-24 16:25:35 +02:00
rockstardev
1c510d45f0 Commenting code to elaborate on decisions made 2020-09-24 16:25:34 +02:00
rockstardev
5b958d7ff6 Ensuring that Shopify transaction registrations are not done in parallel 2020-09-24 16:25:34 +02:00
rockstardev
d9872bc94d Making sure we don't register same invoice multiple times 2020-09-24 16:25:34 +02:00
rockstardev
f177a39b96 Removing dynamic variables from Shopify api interactions 2020-09-24 16:25:34 +02:00
rockstardev
858d56d20c Bugfixing problem with currency comparison 2020-09-24 16:25:34 +02:00
rockstardev
0818abe233 Prefixing Shopify invoices, passing real orderId 2020-09-24 16:25:34 +02:00
rockstardev
7a04be0f30 Registering ShopifyOrderMarkerHostedService 2020-09-24 16:25:33 +02:00
rockstardev
c3d8c8d4b0 Checking that order exists on Shopify before registering transaction 2020-09-24 16:25:33 +02:00
rockstardev
0af4be3d99 Importing hosted service that will register transactions on Shopify 2020-09-24 16:25:33 +02:00
rockstardev
8a68e1b49d Importing UI for registering and verifying Shopify credentials 2020-09-24 16:25:33 +02:00
rockstardev
cf99f0fca0 Importing ShopifyApiClient for interactions with Shopify Api 2020-09-24 16:25:33 +02:00
XPayServer
e276443d2d Add Value Criteria For Payment Method
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
2020-09-22 11:20:44 +02:00
Mario Dian
c640289f4f
App: Light PoS on top of the existing PoS (#1909)
* Initial commit

* review fixes

* Fix padding of logo, readjust display font size when clearing numbers

Co-authored-by: Kukks <evilkukka@gmail.com>
2020-09-21 08:06:31 +02:00
Nicolas Dorier
f6252b73f1
Merge pull request #1916 from Kukks/morelabels
Add more labels (payment requests, apps, better payout label)
2020-09-19 11:14:21 +09:00
XPayServer
1cf60acb29 remove donation 2020-09-18 12:30:13 +02:00
Kukks
8a3c751c10 Add more labels (payment requests, apps, better payout label) 2020-09-17 16:39:55 +02:00
Kukks
8e8415515d Show index of payment address for onchain payments 2020-09-16 11:49:37 +02:00
Nicolas Dorier
25dd38af5c
Merge pull request #1730 from xpayserver/feat/eth
Add Ethereum & ERC20 Support
2020-09-15 19:51:55 +09:00
XPayServer
de755ac0bb Add Ethereum & ERC20 Support
Add Tests
Add Index, XPub to payment data
Add Note on local ETH node
Fix Sync Summary and Race Condition
2020-09-09 08:19:10 +02:00
Kukks
1cb3e5f98c Set roles when authenticating via greenfield
fixes #1855
2020-09-08 11:22:32 +02:00
Kukks
98c4b658c4 Add invoice event severity
closes #1681
https://i.imgur.com/eyMO9M3.png
2020-09-01 18:19:49 +02:00
nicolas.dorier
f2e94e6819
Use nicer representation of payment methods in the Greenfield API 2020-08-26 21:36:32 +09:00
nicolas.dorier
b2ff041ec0
Create Metadata property for InvoiceEntity, migrate all data without logic there 2020-08-26 21:36:31 +09:00
Kukks
41bebfedc4
add swagger docs 2020-08-26 21:36:31 +09:00
Kukks
d96bd15b3b
add status and refactor 2020-08-26 21:36:30 +09:00
Kukks
cb5601c68b
unarchive endpoint + formatting 2020-08-26 21:36:29 +09:00
Kukks
34e76494e3
GreenField: Invoice API 2020-08-26 21:36:29 +09:00
nicolas.dorier
8239fd7e0e
InvoiceEntity blob should not be indented when saved into DB 2020-08-25 14:53:18 +09:00
Kukks
68686cd249 Add debug notifications
This adds a test notif only available in debug mode + endpoint `/Notifications/GenerateJunk` that generates x amount of notifications.
2020-08-19 13:31:28 +02:00
Andrew Camilleri
3024ace641
Merge branch 'master' into bitcoin-only-fixes 2020-08-14 17:50:36 +02:00
Nicolas Dorier
bc5068ac7b
Merge pull request #1842 from NicolasDorier/components
Use razor component to encapsulate UI logic
2020-08-13 17:44:22 +09:00
nicolas.dorier
68482732f7
Fix CSV export incorrectly formated (fix #1844) 2020-08-13 17:06:16 +09:00
nicolas.dorier
d05f914841
Fix crash if impossible to get the network of a payment 2020-08-13 16:29:59 +09:00
nicolas.dorier
5c9d0fd40a
Use razor component to encapsulate UI logic 2020-08-12 16:48:14 +09:00
Kukks
26aac6c45d Do not crash UI and background services after switching to BItcoin Only when you have altcoin payments 2020-08-09 16:17:16 +02:00
Zaxounette
ea9836a701 Subtle term change in Awaiting-payout-notification 2020-08-08 12:50:55 +02:00
Kukks
5a9793a952 Fix Crowdfund not counting all invoices when configured to
fixes #1698
2020-08-04 13:40:00 +02:00
nicolas.dorier
f2a005eeac
HTTP Escape placeholders in callbacks 2020-08-04 14:05:36 +09:00
rockstardev
6c7d3ae0bf Adding checkbox for check new version policy 2020-08-03 03:17:04 -05:00
rockstardev
1b3e40fd70 Fixing typo 2020-08-03 03:17:04 -05:00
rockstardev
ea7231ff26 Adding hosted service that will optionally check for new version once a day 2020-08-03 03:17:04 -05:00
nicolas.dorier
bce1345ccc
Add BTCPayServerEnvironment.Altcoins 2020-07-30 22:06:54 +09:00
nicolas.dorier
1fb75c908b
Remove the concept of unfiltered networks 2020-07-30 11:36:02 +09:00
nicolas.dorier
26112a1ed6
Use CsvHelper for generating CSV 2020-07-30 10:01:56 +09:00
Nicolas Dorier
3ce16dc9a3
Merge pull request #1782 from xpayserver/btc-only
Add Bitcoin Only Build
2020-07-29 21:58:28 +09:00
nicolas.dorier
002f6d3e87
Isolate altcoins tests in their own folder 2020-07-29 19:11:54 +09:00
nicolas.dorier
02998fff49
Add Altcoins-Release and Altcoins-Debug configurations 2020-07-29 18:55:28 +09:00
Kukks
e33200058d Generate Payment link from PaymentType 2020-07-29 09:31:47 +02:00
XPayServer
92ae1109d0 Add Bitcoin Only Build 2020-07-28 22:48:51 +02:00
nicolas.dorier
ba316d02ca
Improve query performance for invoice listing 2020-07-27 13:31:04 +09:00
Umar Bolatov
94e8bf4a72
Allow mass-archiving of invoices
closes #1709
2020-07-14 19:58:52 -07:00
rockstardev
f88c02cccd Removing unused usings, readonly fields where possible 2020-06-28 22:07:48 -05:00
rockstardev
b6c7af32de Cleaning up bom from cs files 2020-06-28 21:44:35 -05:00
nicolas.dorier
51514252b6
Run dotnet format 2020-06-28 17:55:27 +09:00
nicolas.dorier
5e8b379c50
Add invoice refund 2020-06-25 15:31:46 +09:00
nicolas.dorier
fdc11bba8d
Remove old unused refund table 2020-06-25 13:34:25 +09:00
Andrew Camilleri
dc5d8a6cb7
Refresh UI notifications automatically on update (#1680)
* Refresh UI notifications automatically on update

* make notif timeago live

* pass cancellation token

* Update InvoiceEventData.cs
2020-06-24 10:23:16 +02:00
Nicolas Dorier
8230a408ac
Add pull payment feature (#1639) 2020-06-24 10:34:09 +09:00
Andrew Camilleri
13569fe4a2
Improve notifications UI (#1678)
* 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
2020-06-23 10:06:02 +09:00
Andrew Camilleri
12e2b93ac9
Add invoice notifications (#1674)
* Add invoice notifications

* fixeth le order

* comment-to-code auto commit

* reduce notifications
2020-06-22 16:32:51 +09:00
nicolas.dorier
24a88fcfb5
Adapt payjoin for BIP78 2020-06-22 13:57:42 +09:00
nicolas.dorier
0b720768b8
Asyncify NotificationManager 2020-06-17 11:26:21 +09:00
nicolas.dorier
cff5b82b06
Introduce INotificationHandler 2020-06-16 23:29:25 +09:00
nicolas.dorier
aef5cc50d5
Add the StoreScope 2020-06-15 20:52:53 +09:00
nicolas.dorier
7cdfa7d4c5
Use attribute to map notifcations to their string 2020-06-15 17:19:03 +09:00
nicolas.dorier
9070b475ea
Make the NotificationSender more generic 2020-06-15 17:19:02 +09:00
rockstardev
18ffd678b7 Bugfixing context factory reference 2020-06-15 01:25:55 -05:00
rockstardev
741b93dc04 Removing obsolete NotificationDbSaver hosted service 2020-06-15 01:22:09 -05:00
rockstardev
31cc966b38 Bugfixing setting of Created, expanding test 2020-06-15 00:57:20 -05:00
rockstardev
2c44c25b25 Signaling reference pass, bugfixing reference to deserialized blob 2020-06-15 00:36:50 -05:00
rockstardev
113869bd08 Renaming to BaseNotification 2020-06-14 23:49:08 -05:00
rockstardev
0dab96f0a6 Moving Notification to dedicated Service namespace 2020-06-14 23:49:08 -05:00
Kukks
587f244f1d Remove dependency on Common from Rating
replaces #1591 and #1592 , closes #1571 Replaces the Currencies.txt to a json format which includes the networks too ( there is also a test to check now) Also makes CurrencyPair not depend on network and instead use CurrencyNameTable
2020-05-31 20:54:50 +02:00
Nicolas Dorier
a70934938a
Merge pull request #1605 from dennisreimann/pos-refactoring
Point of Sale Refactoring
2020-05-30 13:14:50 +09:00
nicolas.dorier
9503e07dc8
Adapt PJ implementation to latest BIP 2020-05-28 13:35:48 +09:00
Dennis Reimann
58f56eac90
POS: Updates from code review
Thanks @kukks
2020-05-27 14:20:21 +02:00
Dennis Reimann
b7ec22ee89
POS: Set ViewType via optional URL parameter
Falls back to the DefaultView defined in the POS settings.

POS: Fix POST-Route
2020-05-26 21:53:22 +02:00