mirror of
https://github.com/discourse/discourse-subscriptions.git
synced 2025-02-09 13:04:49 +00:00
bugfix
This commit is contained in:
parent
9481fdba07
commit
fc08f8f654
@ -36,16 +36,21 @@ module DiscourseDonations
|
|||||||
|
|
||||||
return if !customer
|
return if !customer
|
||||||
|
|
||||||
|
metadata = {
|
||||||
|
discourse_cause: opts[:cause]
|
||||||
|
}
|
||||||
|
|
||||||
|
if (user)
|
||||||
|
metedata[:discourse_user_id] = user.id
|
||||||
|
end
|
||||||
|
|
||||||
@charge = ::Stripe::Charge.create(
|
@charge = ::Stripe::Charge.create(
|
||||||
customer: customer.id,
|
customer: customer.id,
|
||||||
amount: opts[:amount],
|
amount: opts[:amount],
|
||||||
description: @description,
|
description: @description,
|
||||||
currency: @currency,
|
currency: @currency,
|
||||||
receipt_email: customer.email,
|
receipt_email: customer.email,
|
||||||
metadata: {
|
metadata: metadata
|
||||||
discourse_cause: opts[:cause],
|
|
||||||
discourse_user_id: user.id
|
|
||||||
}
|
|
||||||
)
|
)
|
||||||
|
|
||||||
@charge
|
@charge
|
||||||
|
Loading…
x
Reference in New Issue
Block a user