Created
January 7, 2018 11:27
-
-
Save danielschmitz/da4e7a42e7ebb64c20ecae5f902a7458 to your computer and use it in GitHub Desktop.
src/main.js
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
// src/main.js | |
// The Vue build version to load with the `import` command | |
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. | |
import Vue from 'vue' | |
import App from './App' | |
import router from './router' | |
Vue.config.productionTip = false | |
/* eslint-disable no-new */ | |
new Vue({ | |
el: '#app', | |
router, | |
template: '<App/>', | |
components: { App } | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
app.post('/create-checkout-session', async (req, res) => {
const session = await stripe.checkout.sessions.create({
payment_method_types: ['card'],
line_items: [
{
price_data: {
currency: 'usd',
product_data: {
name: 'Product Name',
},
unit_amount: 5000, // Amount in cents
},
quantity: 1,
},
],
mode: 'payment',
success_url:
${YOUR_URL}/success
,cancel_url:
${YOUR_URL}/cancel
,});
res.json({ id: session.id });
});