This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"public": { | |
"plans": [ | |
{ | |
"_id": 1, | |
"name": "Full Torso Apparition Removal", | |
"amount": { | |
"cents": 300000, | |
"usd": "$3,000" | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./imports/ui/containers/plans-list.js | |
import { composeWithTracker } from 'react-komposer'; | |
import { PlansList } from '../components/plans-list'; | |
import { Loading } from '../components/loading.js'; | |
import { Meteor } from 'meteor/meteor'; | |
const composer = (params, onData) => { | |
const plans = Meteor.settings.public.plans; | |
onData(null, { plans }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./imports/ui/components/plan.jsx | |
import React from 'react'; | |
import { ListGroupItem } from 'react-bootstrap'; | |
export const Plan = React.createClass({ | |
propTypes: { | |
plan: React.PropTypes.object.isRequired, | |
selectedPlan: React.PropTypes.func, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./imports/startup/server/browser-policy.js | |
import { BrowserPolicy } from 'meteor/browser-policy-common'; | |
BrowserPolicy.content.allowOriginForAll('https://js.stripe.com/'); | |
BrowserPolicy.content.allowOriginForAll('https://checkout.stripe.com/'); | |
BrowserPolicy.content.allowOriginForAll('https://tmc-post-content.s3.amazonaws.com/'); | |
BrowserPolicy.content.allowOriginForAll('https://q.stripe.com/'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./imports/startup/server/api.js | |
import '../../api/documents/methods.js'; | |
import '../../api/documents/server/publications.js'; | |
//Add this path for getting stripe methods | |
import '../../api/stripe/methods'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./imports/startup/client/routes.js | |
import React from 'react'; | |
import { render } from 'react-dom'; | |
import { Router, Route, IndexRoute, browserHistory } from 'react-router'; | |
import { Meteor } from 'meteor/meteor'; | |
import { App } from '../../ui/layouts/app'; | |
import { Documents } from '../../ui/pages/documents'; | |
import { Index } from '../../ui/pages/index'; | |
import { Login } from '../../ui/pages/login'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./imports/api/stripe/methods.js | |
import { Meteor } from 'meteor/meteor'; | |
import { check } from 'meteor/check'; | |
// Connect to the Stripe API with the private token | |
// No need to declare StripeAPI, it is provided with mrgalaxy:stripe package | |
// (https://github.com/tyler-johnson/stripe-meteor/blob/master/stripe_server.js) | |
const stripe = StripeAPI(Meteor.settings.private.stripe); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./imports/ui/components/plans-list.jsx | |
import React from 'react'; | |
import { ListGroup, Alert } from 'react-bootstrap'; | |
import { Plan } from './plan'; | |
export const PlansList = React.createClass({ | |
propTypes: { | |
plans: React.PropTypes.array, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ./imports/ui/pages/plans.jsx | |
import React from 'react'; | |
import { Row, Col } from 'react-bootstrap'; | |
import { Meteor } from 'meteor/meteor'; | |
import { Bert } from 'meteor/themeteorchef:bert'; | |
import PlansList from '../containers/plans-list.js'; | |
{/* Catching global context of the application with 'this' */} | |
const INSTANCE = this; | |
const GHOSTBUSTERS_LOGO = 'https://tmc-post-content.s3.amazonaws.com/ghostbusters-logo.png'; |
OlderNewer