mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-04-08 02:52:39 -05:00
Passed coupon from metadata through to stripe
no-issue This will allow us to send through coupons from the api layer and have stripe handle the rest :)
This commit is contained in:
parent
e830e334d2
commit
cdc3971ed8
2 changed files with 4 additions and 2 deletions
|
@ -77,7 +77,8 @@ function createSubscription(stripe, member, metadata) {
|
|||
}).then(() => {
|
||||
return stripe.subscriptions.create({
|
||||
customer: customer.id,
|
||||
items: [{plan: metadata.plan.id}]
|
||||
items: [{plan: metadata.plan.id}],
|
||||
coupon: metadata.coupon
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -77,7 +77,8 @@ module.exports = class StripePaymentProcessor {
|
|||
|
||||
return api.subscriptions.create(this._stripe, member, {
|
||||
plan,
|
||||
stripeToken: metadata.stripeToken
|
||||
stripeToken: metadata.stripeToken,
|
||||
coupon: metadata.coupon
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue