diff options
Diffstat (limited to 'pages')
| -rw-r--r-- | pages/buy.js | 32 |
1 files changed, 2 insertions, 30 deletions
diff --git a/pages/buy.js b/pages/buy.js index e3037fb..d6b1331 100644 --- a/pages/buy.js +++ b/pages/buy.js @@ -1,41 +1,13 @@ import { Component } from 'react'; import withData from '../lib/withData'; -import StripeCheckout from 'react-stripe-checkout'; - -class TakeMoney extends React.Component { - onToken = async (token) => { - console.log(token); - // now that we have the token, create an "order" - - // const res = await fetch('/save-stripe-token', { - // method: 'POST', - // body: JSON.stringify(token), - // }) - // const data = await res.json(); - // console.log(data); - } - - // ... - - render() { - return ( - // ... - <StripeCheckout - token={this.onToken} - stripeKey="pk_lclTtThFp8CnO3QtEZSd8HA9mFUps" - amount={1000000} // cents - currency="USD" - /> - ) - } -} +import TakeMyMoney from '../components/TakeMyMoney'; class Buy extends Component { render() { return ( <div> <p>Buy</p> - <TakeMoney></TakeMoney> + <TakeMyMoney /> </div> ) } |
