Skip to content

Instantly share code, notes, and snippets.

@matthewarkin
Created January 26, 2016 20:53
Show Gist options
  • Save matthewarkin/48eda246d041980d8a5e to your computer and use it in GitHub Desktop.
Save matthewarkin/48eda246d041980d8a5e to your computer and use it in GitHub Desktop.
Simple Stripe Checkout Example
<?php
require_once('<path to stripe\init.php');
\Stripe\Stripe::setApiKey("sk_test_mcRHrvvm21fo5e********");
$token = $_POST['stripeToken'];
$charge = \Stripe\Charge::create(array(
'source' => $token,
'amount' => 5000,
'currency' => 'usd'
));
echo '<h1>Successfully charged $50.00!</h1>';
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment