2020-10-28 14:30:26 -04:00
|
|
|
export default function (helpers) {
|
2019-11-11 19:03:04 -05:00
|
|
|
const { response } = helpers;
|
|
|
|
|
2020-10-28 14:30:26 -04:00
|
|
|
this.get("/s", () => {
|
2019-11-11 19:03:04 -05:00
|
|
|
const products = [
|
|
|
|
{
|
2019-11-11 20:43:23 -05:00
|
|
|
id: "prod_23o8I7tU4g56",
|
|
|
|
name: "Awesome Product",
|
|
|
|
description:
|
2020-10-28 14:30:26 -04:00
|
|
|
"Subscribe to our awesome product. For only $230.10 per month, you can get access. This is a test site. No real credit card transactions.",
|
2019-11-11 19:03:04 -05:00
|
|
|
},
|
|
|
|
{
|
2019-11-11 20:43:23 -05:00
|
|
|
id: "prod_B23dc9I7tU4eCy",
|
|
|
|
name: "Special Product",
|
|
|
|
description:
|
2020-10-28 14:30:26 -04:00
|
|
|
"This is another subscription product. You can have more than one. From $12 per month.",
|
|
|
|
},
|
2019-11-11 19:03:04 -05:00
|
|
|
];
|
|
|
|
|
|
|
|
return response(products);
|
|
|
|
});
|
2020-01-10 00:47:28 -05:00
|
|
|
|
2020-10-28 14:30:26 -04:00
|
|
|
this.get("/s/:id", () => {
|
|
|
|
const product = {
|
|
|
|
id: "prod_23o8I7tU4g56",
|
|
|
|
name: "Awesome Product",
|
|
|
|
description:
|
|
|
|
"Subscribe to our awesome product. For only $230.10 per month, you can get access. This is a test site. No real credit card transactions.",
|
|
|
|
};
|
2020-01-10 00:47:28 -05:00
|
|
|
const plans = [
|
|
|
|
{
|
|
|
|
id: "plan_GHGHSHS8654G",
|
|
|
|
amount: 200,
|
|
|
|
currency: "usd",
|
2020-10-28 14:30:26 -04:00
|
|
|
interval: "month",
|
|
|
|
},
|
2020-01-10 00:47:28 -05:00
|
|
|
];
|
|
|
|
|
2020-10-28 14:30:26 -04:00
|
|
|
return response({ product, plans });
|
2020-01-10 00:47:28 -05:00
|
|
|
});
|
2019-11-11 19:03:04 -05:00
|
|
|
}
|