Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- error_reporting(E_ALL);
- ini_set("display_errors", 1);
- require_once(dirname(__FILE__) . '/config.php');
- $token = $_POST['stripeToken'];
- $customer = Stripe_Customer::create(array(
- 'email' => 'customer@example.com',
- 'card' => $token
- ));
- $charge = Stripe_Charge::create(array(
- 'customer' => $customer->id,
- 'amount' => 2000,
- 'currency' => 'usd'
- ));
- echo '<h1>Successfully charged $20.00!</h1>';
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement