Implement bitcoin donations via BTCPay

This commit is contained in:
2024-02-14 11:09:03 +01:00
parent 26d613bdca
commit 079ee8833c
46 changed files with 1142 additions and 114 deletions

32
spec/fixtures/btcpay/create_invoice.rb vendored Normal file
View File

@@ -0,0 +1,32 @@
{
"id" => "Q9GBe143MXHkdpZeH4Ftx5",
"storeId" => "AxQQ6oH4YX7n5pH1JPBLu97QD6RTybtj8m2W8YzhYr6T",
"amount" => "1",
"checkoutLink" => "http://10.1.1.163:23001/i/Q9GBe143MXHkdpZeH4Ftx5",
"status" => "New",
"additionalStatus" => "None",
"monitoringExpiration" => 1707995026,
"expirationTime" => 1707908626,
"createdTime" => 1707907726,
"availableStatusesForManualMarking" =>["Settled", "Invalid"],
"archived" => false,
"type" => "Standard",
"currency" => "EUR",
"metadata" => {},
"checkout" => {
"speedPolicy" => "MediumSpeed",
"paymentMethods" => ["BTC", "BTC-LightningNetwork"],
"defaultPaymentMethod" => "BTC-LightningNetwork",
"expirationMinutes" => 15,
"monitoringMinutes" => 1440,
"paymentTolerance" => 0.0,
"redirectURL" => "http://localhost:3000/contributions/donations",
"redirectAutomatically" => false,
"requiresRefundEmail" => false,
"defaultLanguage" => nil,
"checkoutType" => nil,
"lazyPaymentMethods" => nil},
"receipt" => {
"enabled" => nil, "showQR" => nil, "showPayments" => nil
}
}