mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-02-17 23:44:39 -05:00
Updated fixtures
no refs
This commit is contained in:
parent
fb772638b0
commit
33308c61b5
2 changed files with 101 additions and 109 deletions
|
@ -286,8 +286,8 @@ export default class AccountPlanPage extends React.Component {
|
|||
}
|
||||
|
||||
getInitialState() {
|
||||
const {member, site} = this.context;
|
||||
this.prices = getSitePrices({site, includeFree: false});
|
||||
const {member, site, pageQuery} = this.context;
|
||||
this.prices = getSitePrices({site, pageQuery, includeFree: false});
|
||||
let activePrice = getMemberActivePrice({member});
|
||||
let selectedPrice = activePrice ? this.prices.find((d) => {
|
||||
return (d.id === activePrice.id);
|
||||
|
|
|
@ -1,3 +1,96 @@
|
|||
const prices = [
|
||||
{
|
||||
id: '6086d2c776909b1a2382369a',
|
||||
stripe_price_id: '7d6c89c0289ca1731226e86b95b5a162085b8561ca0d10d3a4f03afd3e3e6ba6',
|
||||
stripe_product_id: '109c85c734fb9992e7bc30a26af66c22f5c94d8dc62e0a33cb797be902c06b2d',
|
||||
active: 1,
|
||||
nickname: 'Monthly',
|
||||
currency: 'usd',
|
||||
amount: 500,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
},
|
||||
{
|
||||
id: '6086ead8070218227791fe4f',
|
||||
stripe_price_id: 'price_1IkXLAFToJelIqAseQdK4WSU',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price 15',
|
||||
currency: 'usd',
|
||||
amount: 1500,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
},
|
||||
{
|
||||
id: '6086eb2a823dd7240afc8081',
|
||||
stripe_price_id: 'price_1IkXMUFToJelIqAstq0R3Ero',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price USD',
|
||||
currency: 'usd',
|
||||
amount: 1100,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
},
|
||||
{
|
||||
id: '6086eb3e823dd7240afc8082',
|
||||
stripe_price_id: 'price_1IkXMoFToJelIqAsTHKl5ELV',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price Comp',
|
||||
currency: 'usd',
|
||||
amount: 0,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
},
|
||||
{
|
||||
id: '6086eff0823dd7240afc8083',
|
||||
stripe_price_id: 'price_1IkXgCFToJelIqAsTP3V1paQ',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Yearly',
|
||||
currency: 'aud',
|
||||
amount: 12200,
|
||||
type: 'recurring',
|
||||
interval: 'year'
|
||||
},
|
||||
{
|
||||
id: '6086f4c9823dd7240afc8084',
|
||||
stripe_price_id: 'price_1IkY0CFToJelIqAs5h7qlgP5',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price B',
|
||||
currency: 'gbp',
|
||||
amount: 12000,
|
||||
type: 'recurring',
|
||||
interval: 'year'
|
||||
},
|
||||
{
|
||||
id: '6087c314d3e64b3266bf715e',
|
||||
stripe_price_id: 'price_1IkljzFToJelIqAsPNGA2Lov',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price A',
|
||||
currency: 'cad',
|
||||
amount: 12200,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
},
|
||||
{
|
||||
id: '6087c36ed3e64b3266bf715f',
|
||||
stripe_price_id: 'price_1IkllSFToJelIqAsvElnxOwF',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price X',
|
||||
currency: 'gbp',
|
||||
amount: 12300,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
}
|
||||
];
|
||||
|
||||
const priceIds = prices.map(d => d.id);
|
||||
|
||||
export const site = {
|
||||
title: 'A Ghost site',
|
||||
description: 'Thoughts, stories and ideas.',
|
||||
|
@ -10,102 +103,13 @@ export const site = {
|
|||
yearly: 150000,
|
||||
currency: 'USD'
|
||||
},
|
||||
prices: [
|
||||
{
|
||||
id: '6086d2c776909b1a2382369a',
|
||||
stripe_price_id: '7d6c89c0289ca1731226e86b95b5a162085b8561ca0d10d3a4f03afd3e3e6ba6',
|
||||
stripe_product_id: '109c85c734fb9992e7bc30a26af66c22f5c94d8dc62e0a33cb797be902c06b2d',
|
||||
active: 1,
|
||||
nickname: 'Monthly',
|
||||
currency: 'usd',
|
||||
amount: 500,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
},
|
||||
{
|
||||
id: '6086ead8070218227791fe4f',
|
||||
stripe_price_id: 'price_1IkXLAFToJelIqAseQdK4WSU',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price One Time',
|
||||
currency: 'usd',
|
||||
amount: 1500,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
},
|
||||
{
|
||||
id: '6086eb2a823dd7240afc8081',
|
||||
stripe_price_id: 'price_1IkXMUFToJelIqAstq0R3Ero',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price USD',
|
||||
currency: 'usd',
|
||||
amount: 1100,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
},
|
||||
{
|
||||
id: '6086eb3e823dd7240afc8082',
|
||||
stripe_price_id: 'price_1IkXMoFToJelIqAsTHKl5ELV',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price Comp',
|
||||
currency: 'usd',
|
||||
amount: 0,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
},
|
||||
{
|
||||
id: '6086eff0823dd7240afc8083',
|
||||
stripe_price_id: 'price_1IkXgCFToJelIqAsTP3V1paQ',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Yearly',
|
||||
currency: 'aud',
|
||||
amount: 12200,
|
||||
type: 'recurring',
|
||||
interval: 'year'
|
||||
},
|
||||
{
|
||||
id: '6086f4c9823dd7240afc8084',
|
||||
stripe_price_id: 'price_1IkY0CFToJelIqAs5h7qlgP5',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price B',
|
||||
currency: 'gbp',
|
||||
amount: 12000,
|
||||
type: 'recurring',
|
||||
interval: 'year'
|
||||
},
|
||||
{
|
||||
id: '6087c314d3e64b3266bf715e',
|
||||
stripe_price_id: 'price_1IkljzFToJelIqAsPNGA2Lov',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price A',
|
||||
currency: 'cad',
|
||||
amount: 12200,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
},
|
||||
{
|
||||
id: '6087c36ed3e64b3266bf715f',
|
||||
stripe_price_id: 'price_1IkllSFToJelIqAsvElnxOwF',
|
||||
stripe_product_id: 'prod_JNGGBrrogUXcoM',
|
||||
active: 1,
|
||||
nickname: 'Test Price X',
|
||||
currency: 'gbp',
|
||||
amount: 12300,
|
||||
type: 'recurring',
|
||||
interval: 'month'
|
||||
}
|
||||
],
|
||||
allow_self_signup: true,
|
||||
prices: prices,
|
||||
allow_self_signup: false,
|
||||
members_signup_access: 'all',
|
||||
is_stripe_configured: true,
|
||||
portal_button: true,
|
||||
portal_name: true,
|
||||
portal_plans: ['free', '6086f4c9823dd7240afc8084', '6087c36ed3e64b3266bf715f'],
|
||||
portal_plans: [...priceIds],
|
||||
portal_button_icon: 'icon-1',
|
||||
portal_button_signup_text: 'Subscribe now',
|
||||
portal_button_style: 'icon-and-text',
|
||||
|
@ -145,7 +149,8 @@ export const member = {
|
|||
currency: 'USD'
|
||||
},
|
||||
price: {
|
||||
id: 'price_1IkXLAFToJelIqAseQdK4WSU',
|
||||
id: '6086ead8070218227791fe4f',
|
||||
stripe_price_id: 'price_1IkXLAFToJelIqAseQdK4WSU',
|
||||
nickname: 'Yearly',
|
||||
currency: 'usd',
|
||||
amount: 1500,
|
||||
|
@ -228,19 +233,6 @@ export const member = {
|
|||
amount: 500,
|
||||
currency: 'USD'
|
||||
},
|
||||
price: {
|
||||
id: 'price_1IkXgCFToJelIqAsTP3V1paQ',
|
||||
nickname: 'Yearly',
|
||||
amount: 500,
|
||||
interval: 'year',
|
||||
type: 'recurring',
|
||||
currency: 'USD',
|
||||
product: {
|
||||
id: 'prod_JNGGBrrogUXcoM',
|
||||
name: 'Main Product',
|
||||
product_id: '6086cd1b27c7d417b4a18eaf'
|
||||
}
|
||||
},
|
||||
status: 'active',
|
||||
start_date: '2019-05-01T11:42:40.000Z',
|
||||
default_payment_card_last4: '4242',
|
||||
|
@ -253,5 +245,5 @@ export const member = {
|
|||
|
||||
export const testSite = {
|
||||
...site,
|
||||
portal_plans: ['free', '6086d2c776909b1a2382369a', '6086eff0823dd7240afc8083']
|
||||
portal_plans: ['free', 'monthly', 'yearly']
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue