Skip to content

Instantly share code, notes, and snippets.

@boucher
boucher / gist:1750375
Created February 6, 2012 07:09 — forked from siddarth/gist:1379745
Stripe PHP simple example
<?php
require 'path-to-Stripe.php';
if ($_POST) {
Stripe::setApiKey("YOUR-API-KEY");
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))
throw new Exception("The Stripe Token was not generated correctly");
@boucher
boucher / gist:1750368
Created February 6, 2012 07:07 — forked from saikat/gist:1084146
Stripe sample checkout form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Sample Form</title>
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript" src="https://ajax.aspnetcdn.com/ajax/jquery.validate/1.8.1/jquery.validate.min.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<script type="text/javascript">
@boucher
boucher / StripeTutorialPage.html
Created February 6, 2012 07:05
Stripe Tutorial Payment Form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
// this identifies your website in the createToken call below
@boucher
boucher / StripeTutorialPage.html
Created November 23, 2011 15:31
Stripe Tutorial Payment Form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Getting Started Form</title>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<!-- jQuery is used only for this example; it isn't required to use Stripe -->
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.6.2/jquery.min.js"></script>
<script type="text/javascript">
<?php
require 'lib/Stripe.php';
if ($_POST) {
Stripe::setApiKey("kLh5gUyytoTLN8YtyBI7dLovXhZmDkcb");
$customer = Stripe_Customer::create(array("email" => $_POST['email'],
"description" => $_POST['description'],
"card" => $_POST['stripeToken']));
Stripe_Charge::create(array("amount" => 1199,
@boucher
boucher / gist:1090506
Created July 18, 2011 20:02 — forked from saikat/gist:1084146
Stripe sample checkout form
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<title>Stripe Sample Form</title>
<script type="text/javascript" src="/jquery.min.js"></script>
<script type="text/javascript" src="/jquery.validate.js"></script>
<script type="text/javascript" src="https://js.stripe.com/v1/"></script>
<script type="text/javascript">
function functionname(var1,var2)
{
var var3;
if (var1 === var2)
{
var3 = true;
}
else
{
var3 = false;
/* -*- coding: utf-8 -*-
*
* Starrater with a revised version from boucher from 280North
*/
@import <AppKit/CPControl.j>
@import <AppKit/CPImage.j>
var starEmpty = [[CPImage alloc] initWithContentsOfFile: "Resources/StarRater/empty.gif" size: CPSizeMake(25, 25)],
starSet = [[CPImage alloc] initWithContentsOfFile: "Resources/StarRater/set.gif" size: CPSizeMake(25, 25)],
@boucher
boucher / gist:37381
Created December 18, 2008 04:42 — forked from anonymous/gist:37379
@import <Foundation/CPObject.j>
@import "AppInspector.j"
@implementation AppController : CPObject
{
CPImageView imageView;
AppInspector inspector;
}
- (void)applicationDidFinishLaunching:(CPNotification)aNotification
var CPTextFieldDOMInputElement = nil;
@implementation DTTextField : CPTextField
{
}
+ (DOMElement)_inputElement
{
if (!CPTextFieldDOMInputElement)
{