Commit Graph

76 Commits

Author SHA1 Message Date
Nicolas Dorier
ed5b159fb6
Use ArgumentNullException.ThrowIfNull everywhere (#3239) 2021-12-28 17:39:54 +09:00
nicolas.dorier
35aad4ebf9
Remove Logs static singletons 2021-11-23 13:55:34 +09:00
nicolas.dorier
0b5d0349d4
Do not fire InvoiceExpired twice if invoice partially paid (Fix #3004) 2021-10-27 19:27:19 +09:00
nicolas.dorier
150e4b842c
Make sure the process doesn't crash if exception raised in Subscribe 2021-10-06 13:22:55 +09:00
Andrew Camilleri
6e3d6125c2
Payment Settled Webhook event (#2944)
* Payment Settled Webhook event

resolves #2691

* Move payment methods to payment services
2021-10-05 18:10:41 +09:00
Andrew Camilleri
6d317937c7
Do not generate payment methods when 0 amount invoice (#2776)
* Do not generate payment methods when 0 amount invoice

* Add test for 0 amoutn invoices
2021-09-07 00:23:41 +09:00
Nicolas Dorier
4c818d0359
Implement topup invoices (#2730) 2021-08-03 17:03:00 +09:00
Nicolas Dorier
c551e5cd0a
Make sure to only select accounted payments where we should (#2523) 2021-05-14 16:16:19 +09:00
nicolas.dorier
18e68d04f9
Rename invoice states and payment states 2020-11-23 18:28:35 +09:00
nicolas.dorier
a30456a92d
Fix warnings 2020-10-26 14:19:05 +09: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
Kukks
d96bd15b3b
add status and refactor 2020-08-26 21:36:30 +09: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
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
rockstardev
29d51ad2a2 Adding 1 second leeway for expiration 2020-02-21 17:09:03 -06:00
rockstardev
1be6408246 Adding logging to try and catch situations where invoice is not expired 2020-02-21 17:09:03 -06:00
nicolas.dorier
4c349803b6
Use Channel instead of blocking collection for the Invoice Watcher 2019-11-16 19:12:26 +09:00
Kukks
59839a3332 make sure networks are abstracted properly 2019-09-21 16:39:44 +02:00
nicolas.dorier
13c03cc0c2
Removing dependency on NetworkProvider from InvoiceWatcher 2019-06-07 13:34:38 +09:00
nicolas.dorier
281280d3ec
Fix crash which can happen during export if someone remove support for a network, inject Network inside paymentdata 2019-06-07 13:31:11 +09:00
Andrew Camilleri
81dae7d350 BTCPay Abstractions: Move PaymentMethod specific logic to their handlers (#850) 2019-05-29 23:33:31 +09:00
Andrew Camilleri
d3e3c31b0c Btcpay abstract BTCPayNetwork -- Alternative PR to #865 (#868)
* BitcoinSpecificBtcPayNetwork - abstract BTCPayNetwork

* some type fixes

* fix tests

* simplify fetching handler in invoice controller

* rename network base and bitcoin classes

* abstract serializer to network level

* fix serializer when network not provided

* fix serializer when network not provided

* fix serializer when network not provided

* try fixes for isolating pull request
2019-05-29 18:43:50 +09:00
rockstardev
b300404bc7 Extending invoice monitoring if max confirmation count not reached 2019-05-25 17:20:17 -05:00
Nicolas Dorier
512ee16620
Refactor invoice entity to not have to inject the NetworkProvider (#858) 2019-05-24 22:22:38 +09:00
rockstardev
e6c794d68f Moving update of confirmation count to InvoiceWatcher 2019-05-12 14:56:13 +09:00
nicolas.dorier
5190639b77 Simplify InvoiceWatcher logic and remove unused code 2019-04-08 13:28:13 +09:00
nicolas.dorier
0bd02a9272 Fix some exceptions raised if port is already used 2019-03-27 18:56:43 +09:00
nicolas.dorier
c071c81403 Pass the whole Entity object to internal InvoiceEvent 2019-02-19 12:08:07 +09:00
nicolas.dorier
d85f03ba20 Remove HangFire dependency 2019-01-16 19:15:09 +09:00
Kukks
5076d73695 Enhance Invoice Events 2019-01-06 10:12:45 +01:00
nicolas.dorier
0d06cf63b7 Use enum for invoice status and invoice exception 2018-12-10 21:48:28 +09:00
nicolas.dorier
9209984a2f Remove useless argument from GetInvoice 2018-12-06 17:05:27 +09:00
nicolas.dorier
17e914778d Make sure that lightning payments events are using the state of the invoice when they got issued (#205) 2018-06-21 14:15:36 +09:00
nicolas.dorier
cdc0b0d628 Fix crash when creating a token 2018-05-06 19:03:30 +09:00
nicolas.dorier
7872b3ec55 Add a new invoice event: expiredPaidPartial and fix some corner case for tolerance 2018-05-06 00:40:44 +09:00
Andrew Camilleri
9a92646d4d add test and refactor for PR 2018-05-05 16:07:22 +02:00
Andrew Camilleri
01069ed583 Remove unnecessary branching 2018-05-04 17:50:05 +02:00
Andrew Camilleri
0fc770bbb1 extract logic of accounting to accounting and remove bitpay breaking changes 2018-05-04 17:47:33 +02:00
Andrew Camilleri
c3d73236e0 start work on payment tolerance feature 2018-05-04 16:15:34 +02:00
nicolas.dorier
21bbf49640 Rewrite authorization enforcement and simplify the code 2018-04-30 22:00:43 +09:00
nicolas.dorier
9339c7dff2 Make sure btcpay does not wait all the invoces to be cleaned to start 2018-04-30 15:39:47 +09:00
nicolas.dorier
21215dc537 Make sure a too high expiration do not trigger "The value needs to translate in milliseconds to -1 (signifying an infinite timeout)" 2018-04-07 11:53:33 +09:00
nicolas.dorier
b4f4401cdc remove unused code, remove derivationscheme specific logic from InvoiceEntity 2018-02-19 22:41:47 +09:00
nicolas.dorier
2f3238c65e Use decimal for calculations instead of Money, and round due amount at ceil satoshi 2018-02-19 18:54:21 +09:00
nicolas.dorier
a634593903 Big refactoring renaming cryptoData => PaymentMethod 2018-02-19 15:09:05 +09:00
nicolas.dorier
aa4519ac30 Big refactoring for supporting new type of payment 2018-02-19 02:38:03 +09:00
nicolas.dorier
8e3f7ea68d do not block next invoices if one invoice fail processing 2018-02-18 02:40:53 +09:00
nicolas.dorier
b898cc030c general code cleanup + add analyzers 2018-02-17 13:18:16 +09:00