Created
October 13, 2018 19:12
-
-
Save ryanbelke/f7857af36f5d8d79f8635453dde030f5 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| submitOrder() { | |
| const { context } = this.props; | |
| const { data } = this.state; | |
| console.log(context); | |
| this.props.stripe.createToken().then(res => { | |
| strapi | |
| .createEntry("orders", { | |
| amount: context.total, | |
| dishes: context.items, | |
| address: data.address, | |
| city: data.city, | |
| state: data.state, | |
| stripe_id: data.stripe_id, | |
| token: res.token.id | |
| }) | |
| .then(Router.push("/")); | |
| }); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment