Created
January 26, 2016 20:53
-
-
Save matthewarkin/48eda246d041980d8a5e to your computer and use it in GitHub Desktop.
Simple Stripe Checkout Example
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_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