Skip to content

Instantly share code, notes, and snippets.

View furiousdavid's full-sized avatar

David Kloba furiousdavid

View GitHub Profile
// formkeep-stripe-checkout.js on webtask.io
// Load NPM dependencies (specified in the settings)
const webtask = require('webtask-tools');
const express = require('express');
const axios = require('axios');
// Initialize an express app
const app = express();
<!-- index.html -->
<html>
<head>
<link href="https://fonts.googleapis.com/css?family=Roboto" rel="stylesheet">
<link href="./stylesheet.css" rel="stylesheet">
</head>
<body>
<div class="container">
<div class="card">
body {
font-family: Roboto, sans-serif;
background-color: #f2f2f3;
font-size: 16px;
color: #606060;
}
h1, p, form {
margin: 0;
}
// formkeep-stripe-checkout.js on webtask.io
// Load NPM dependencies (specified in the settings)
const webtask = require('webtask-tools');
const express = require('express');
const axios = require('axios');
// Add new dependencies
const bodyParser = require('body-parser');
const stripe = require('stripe');
<div id="contact-us-1" class="contact-us-container cms-include">
<div id="contact-us-title" class="cms-editable"> Contact Us </div>
<form accept-charset="UTF-8" action="https://formkeep.com/f/exampletoken" method="POST" enctype="multipart/form-data">
<input name="utf8" type="hidden" value="✓">
<label for="contact-email-address" id="contact-email-label" class="cms-editable">Email</label>
<input id="contact-email-address" name="email" type="email" required>
<label for="contact-name" id="contact-name-label" class="cms-editable">Name</label>
<input id="contact-name" name="name" type="name">
/* Setup a reasonable default font */
body {
font-family: "Roboto", sans-serif
}
/* Style all select, textareas and input types except color, radio, checkbox */
input:not([type=color]):not([type=radio]):not([type=checkbox]),
select,
textarea {
width: 100%;