-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transfer Processors #3476
Transfer Processors #3476
Conversation
92c0cbb
to
50770cc
Compare
2c25d56
to
0f45694
Compare
ff37910
to
abd2026
Compare
2599809
to
5cdda5e
Compare
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. *
BTCPayServer/Data/Payouts/BitcoinLike/BitcoinLikePayoutHandler.cs
Outdated
Show resolved
Hide resolved
BTCPayServer/Controllers/GreenField/GreenfieldPullPaymentController.cs
Outdated
Show resolved
Hide resolved
...rver/Controllers/GreenField/GreenfieldStoreLightningAutomatedTransferProcessorsController.cs
Outdated
Show resolved
Hide resolved
# Conflicts: # BTCPayServer.Data/ApplicationDbContext.cs # BTCPayServer.Data/Data/StoreData.cs # BTCPayServer.Data/Migrations/ApplicationDbContextModelSnapshot.cs # BTCPayServer/Hosting/MigrationStartupTask.cs # BTCPayServer/Services/MigrationSettings.cs
@Kukks , I scheduled for later, then send the selected payout, then Schedule for later, here is the result: |
Actually the problem happen when we send two times to the same destination. But this is also a problem somebody can |
|
...rver/Controllers/GreenField/GreenfieldStoreLightningAutomatedTransferProcessorsController.cs
Outdated
Show resolved
Hide resolved
@@ -49,6 +52,13 @@ | |||
|
|||
<partial name="_StatusMessage" /> | |||
|
|||
@if (Context.GetStoreData()?.TransferProcessors?.Any(data => data.PaymentMethod.Equals(Model.PaymentMethodId, StringComparison.InvariantCultureIgnoreCase)) is not true && TransferProcessorFactories.Any(factory => factory.GetSupportedPaymentMethods().Contains(paymentMethodId))) | |||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't push users to use a transfer processor, this is still experimental stuff now.
On top of it, this warning can't be removed, it should be removable like what we did to announce the new label's status in invoices page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only if Lord @pavlenex agrees as he really wanted more helper alerts around this feature.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm fine with either removing a warning, in which case we'll probably loose on valuable feedback as the feature matures or by making it dismissible and make it go away once payment method is configured with processor.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The thing is that a warning is warranted when this feature will be used by all users, but that's not the case here.
The danger of this warning is that noobs don't know what it does and just blindly follow the warning just to make it go away. Ending up in a situation where money is being sent without them understanding why.
If you want to show the new feature, an info box as the one we did for Invoices List over the status's rename that can be dismissed forever is better than a warning which try to prompt user into action.
Renamed it to Payout processors (if you deployed this pr, you need to nuke db) |
This PR introduces a few things: