Skip to content

Instantly share code, notes, and snippets.

View mhosks's full-sized avatar

Matt mhosks

  • Scottsdale, AZ
View GitHub Profile
@mhosks
mhosks / gist:aae90e060c7a60c87368
Last active June 8, 2016 15:08 — forked from bateller/gist:154c6e5d1f6e0e53e527
Stripe Example (Works with v2 of Stripe-PHP)
<?php
// Edited boucher/gist:1750375 to work with stripe-php v2
require 'stripe-php/init.php';
if ($_POST) {
\Stripe\Stripe::setApiKey("YOUR-API-KEY");
$error = '';
$success = '';
try {
if (!isset($_POST['stripeToken']))