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
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
# Vagrantfile API/syntax version. Don't touch unless you know what you're doing! | |
VAGRANTFILE_API_VERSION = "2" | |
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| | |
# Every Vagrant development environment requires a box. You can search for | |
# boxes at https://atlas.hashicorp.com/search. |
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
#!/usr/bin/env bash | |
# Use single quotes instead of double quotes to make it work with special-character passwords | |
PASSWORD='my_password' | |
# update / upgrade | |
sudo apt-get update | |
sudo apt-get -y upgrade | |
# install apache 2.5 and php 5.5 |
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
require 'stripe' | |
Stripe.api_key = "sk_your_API_key" | |
customers = Stripe::Customer.all(:limit => 100) | |
customers.each do |customer| | |
# do a thing with the customer | |
end |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Bootstrap Stripe.js example form</title> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-12 text-center"> | |
<h1>A simple Bootstrap Stripe.js payment form</h1> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Bootstrap Stripe.js example form</title> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-12 text-center"> | |
<h1>A better Bootstrap Stripe.js payment form</h1> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>Bootstrap Stripe.js example bank account form</title> | |
</head> | |
<body> | |
<div class="container"> | |
<div class="row"> | |
<div class="col-md-12 text-center"> | |
<h1>A Bootstrap Stripe.js bank account form</h1> |
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
require 'sinatra' | |
require 'stripe' | |
require 'mailgun' | |
set :secret_key, ENV['STRIPE_KEY'] | |
Stripe.api_key = settings.secret_key | |
set :mailgun_key, ENV['MAILGUN_KEY'] | |
mg_client = Mailgun::Client.new settings.mailgun_key |
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
var stripe = require('stripe')('YOUR_TEST_KEY'); | |
stripe.charges.list( | |
{ limit: 100, include: ["total_count"] }, | |
function(err, charges) { | |
for (i = 0; i < charges.data.length; i++){ | |
console.log(charges.data[i].id); | |
} | |
if (charges.has_more) { | |
paginate(charges["data"][charges["data"].length - 1].id); |
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
<?php | |
// Require the Stripe library and set your API key | |
// Newer versions can use https://stripe.com/docs/api/php#cancel_subscription | |
try { | |
$token = \Stripe\Token::create(array( | |
"card" => array( | |
"number" => "4242424242424242", | |
"exp_month" => "12", | |
"exp_year" => "2020" |
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
<?php | |
// Not using composer | |
require_once('stripe-php/init.php'); | |
\Stripe\Stripe::setApiKey("sk_test_BQokikJOvBiI2HlWgH4olfQ2"); | |
try { | |
$account = \Stripe\Account::create(array( | |
"managed" => true, | |
"country" => "US", | |
"email" => "[email protected]", |