mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Stored cancellation reason in local database (#222)
refs https://github.com/TryGhost/Ghost/issues/12403 refs https://github.com/TryGhost/Ghost/pull/12405 This smol change means that we keep our local cancellation_reason column in sync with what we set in Stripe metadata
This commit is contained in:
parent
da00444961
commit
ecd5bb2c01
1 changed files with 1 additions and 0 deletions
|
@ -453,6 +453,7 @@ module.exports = class StripePaymentProcessor {
|
||||||
subscription_id: subscription.id,
|
subscription_id: subscription.id,
|
||||||
status: subscription.status,
|
status: subscription.status,
|
||||||
cancel_at_period_end: subscription.cancel_at_period_end,
|
cancel_at_period_end: subscription.cancel_at_period_end,
|
||||||
|
cancellation_reason: subscription.metadata && subscription.metadata.cancellation_reason || null,
|
||||||
current_period_end: new Date(subscription.current_period_end * 1000),
|
current_period_end: new Date(subscription.current_period_end * 1000),
|
||||||
start_date: new Date(subscription.start_date * 1000),
|
start_date: new Date(subscription.start_date * 1000),
|
||||||
default_payment_card_last4: payment && payment.card && payment.card.last4 || null,
|
default_payment_card_last4: payment && payment.card && payment.card.last4 || null,
|
||||||
|
|
Loading…
Add table
Reference in a new issue