mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Updated price id in subscription serialization
refs https://github.com/TryGhost/Team/issues/586
refs 33f26fbf32
As part of serializing subscriptions with prices, we previously attached only the stripe price id to the price object for subscription. This change updates the price object to include both Ghost id and stripe price id for the object, as Portal needs to check the Ghost price id for logged in members to verify their current plan.
This commit is contained in:
parent
ad9b18e00f
commit
aa12770329
1 changed files with 2 additions and 1 deletions
|
@ -39,7 +39,8 @@ const StripeCustomerSubscription = ghostBookshelf.Model.extend({
|
|||
|
||||
if (defaultSerializedObject.stripePrice) {
|
||||
serialized.price = {
|
||||
id: defaultSerializedObject.stripePrice.stripe_price_id,
|
||||
id: defaultSerializedObject.stripePrice.id,
|
||||
stripe_price_id: defaultSerializedObject.stripePrice.stripe_price_id,
|
||||
nickname: defaultSerializedObject.stripePrice.nickname,
|
||||
amount: defaultSerializedObject.stripePrice.amount,
|
||||
interval: defaultSerializedObject.stripePrice.interval,
|
||||
|
|
Loading…
Add table
Reference in a new issue