oxhey Posted September 12, 2013 Share Posted September 12, 2013 Iv got the stripe checkout button working with its own static fields. Iv got a form which I want to pass the name , email and amount data to the stripe charge page. the amount is calculated and stored in this variable : grand_total here is the code for the charge page : <?php require_once(dirname(__FILE__) . '/config.php'); $token = $_POST['stripeToken']; $customer = Stripe_Customer::create(array( "email" => 'email', "card" => $token, )); $charge = Stripe_Charge::create(array( 'customer' => $customer->id, 'amount' => 2499, 'currency' => 'usd' )); echo '<h1>Successfully charged $24.99!</h1><br/>'; $_SESSION['stripeToken'] = $token; ?> Here is the code for the form fields : <div class="formfield"><label for="Name" class="formlabel">Name</label><input type="text" name="Name" id="Name" size="50" /></div> <div class="formfield"><label for="Email_Address" class="formlabel">Email</label><input type="text" name="Email_Address" id="Email_Address" size="50" /></div> Thanks for the help Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.