I hereby claim:
- I am reichert621 on github.
- I am alexhaven (https://keybase.io/alexhaven) on keybase.
- I have a public key whose fingerprint is 17B5 344A 2ABB A851 11D5 7700 776C 6210 F268 C1A7
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
const getValidators = () => { | |
return [ | |
{ | |
field: 'name', | |
validations: [ | |
[isInputPresent, 'Name is required'], | |
[isValidName, 'Invalid name'] | |
] | |
}, |
const handleValidations = inputs => { | |
const { name, email, birthday } = inputs; | |
const required = ['name', 'email', 'address', 'state', 'country', 'birthday']; | |
let errors = {}; | |
for (let i = 0; i < required.length; i += 1) { | |
const val = required[i]; | |
if (inputs[val].length < 1) { |
// bower dependency: "ng-file-upload" | |
// npm dependency: "loopback-component-storage" | |
'use strict'; | |
angular | |
.module('app', [ | |
'ngFileUpload' | |
]) | |
.controller('UploadController', function(Upload) { |
import React from 'react'; | |
import { StripeProvider, Elements, injectStripe } from 'react-stripe-elements'; | |
// Replace with your public key (https://dashboard.stripe.com/test/apikeys) | |
const STRIPE_API_KEY = 'pk_test_xxx'; | |
const Checkout = props => { | |
const handleCheckout = () => { | |
props.stripe.redirectToCheckout({ | |
items: [{ sku: props.skuId, quantity: 1 }], |
import request from 'superagent'; | |
import React from 'react'; | |
import StripeCheckout from 'react-stripe-checkout'; | |
// Replace with your public key (https://dashboard.stripe.com/test/apikeys) | |
const STRIPE_API_KEY = 'pk_test_xxx'; | |
const createOrder = (skuId, customer) => { | |
const { email, name, address } = customer; |
const express = require('express'); | |
const bodyParser = require('body-parser'); | |
const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY); | |
const app = express(); | |
app.use(bodyParser.json()); | |
app.use(bodyParser.urlencoded({ extended: true })); | |
const createOrder = (skuId, { email, name, address }) => { |
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<!-- ... --> | |
<!-- Add this script tag within the <head> tags! --> | |
<script src="https://js.stripe.com/v3"></script> | |
</head> | |
<body> |
// Load environment variables from our `.env` file | |
require('dotenv').config(); | |
const path = require('path'); | |
const express = require('express'); | |
// Make sure your STRIPE_SECRET_KEY exists as an environment variable! | |
// This should look something like `sk_test_xxxxxxxxxxxxxxxxxxxxxxxxx` | |
// and can be found at https://dashboard.stripe.com/test/apikeys | |
const stripe = require('stripe')(process.env.STRIPE_SECRET_KEY); |
// import ... | |
import './App.css'; // Import our new CSS | |
const STRIPE_API_KEY = 'pk_test_...'; | |
const createCharge = token => { | |
// ... | |
}; | |
const Form = props => { |