mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-24 19:33:02 +03:00
Fixed Stripe Checkout using Offers
refs https://github.com/TryGhost/Members/commit/5172e40646 When we updated to use the OffersAPI instead of OfferRepository this was missed, and we were passing blank coupon to Stripe Checkout. This should eventually be replaced with a call like `getCoupon(offerId)` from a payments service.
This commit is contained in:
parent
2a3df8e3db
commit
53d24e501d
@ -152,7 +152,7 @@ module.exports = class RouterController {
|
||||
}
|
||||
|
||||
coupon = {
|
||||
id: offer.stripeCouponId
|
||||
id: offer.stripe_coupon_id
|
||||
};
|
||||
} catch (err) {
|
||||
res.writeHead(500);
|
||||
|
@ -24,6 +24,8 @@
|
||||
*
|
||||
* @prop {'active'|'archived'} status
|
||||
*
|
||||
* @prop {string} stripe_coupon_id
|
||||
*
|
||||
* @prop {object} tier
|
||||
* @prop {string} tier.id
|
||||
* @prop {string} tier.name
|
||||
@ -49,6 +51,7 @@ class OfferMapper {
|
||||
currency_restriction: offer.type.value === 'fixed',
|
||||
currency: offer.type.value === 'fixed' ? offer.currency.value : null,
|
||||
status: offer.status.value,
|
||||
stripe_coupon_id: offer.stripeCouponId,
|
||||
tier: {
|
||||
id: offer.tier.id,
|
||||
name: offer.tier.name
|
||||
|
Loading…
Reference in New Issue
Block a user