ltc payments
This commit is contained in:
parent
8f3afcfcd2
commit
c9bcbe7ff5
12 changed files with 338 additions and 2 deletions
15
db/migrations/002_invoice_ltc.rb
Normal file
15
db/migrations/002_invoice_ltc.rb
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
Sequel.migration do
|
||||
change do
|
||||
alter_table(:invoices) do
|
||||
# LTC payout address captured at issue (defaults from LTC_ADDRESS env in the form).
|
||||
# All three are nullable: LTC payment is opt-in per invoice.
|
||||
add_column :ltc_address, String
|
||||
# LTC price in the invoice currency at issue time (snapshot, like gel_rate).
|
||||
# May be hand-entered or fetched from CoinGecko at form time.
|
||||
add_column :ltc_rate, BigDecimal, size: [18, 8]
|
||||
# LTC amount due. Normally total / ltc_rate, but can be hand-overridden,
|
||||
# so it is stored explicitly rather than recomputed.
|
||||
add_column :ltc_amount, BigDecimal, size: [18, 8]
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue