Post data from FormStack Form into Stripe Webhook



I'm working on custom integrating Stripe into FormStack Form. I can get the data posted into a http://ift.tt/1sOiow2, but can't use it with $_POST['input name']. Here is the code for my Stripe webhook.Form is at http://ift.tt/1pVkx5A



<?php
require_once('lib/Stripe.php');

$email = $_POST['Email Address']; //Email Address
$name = $_POST['20787947']; //Company Name
$number = $_POST['field20787967']; //Credit Card
$expiration = $_POST['field20787968']; //Card Expiration Date MM/YY}
$cvs = $_POST['field19077362']; //3 Digit Back Panel Code...Mastercard Credit Card }
$fname = $_POST['field20787940-first'];
$lname = $_POST['field20787940-last'];
$address1 = $_POST['field20787971-address'];
$address2 = $_POST['field20787971-address2'];
$city = $_POST['field20787971-city'];
$state = $_POST['field20787971-state'];
$zip = $_POST['field20787971-zip'];
// Set your secret key: remember to change this to your live secret key in production
// See your keys here http://ift.tt/1pVkAhF
Stripe::setApiKey("sk_test_hAFaSsxU4rTAktJWLr3eWy7C");
// Create a Customer
$customer = Stripe_Customer::create(array(
"email" => $email,
"description" => $email,
"card" => array( "number" => 4242424242424242,
"exp_month" => 02,
"exp_year" => 2015,
"cvc" => $cvs,
"address_line1" => $address1,
"address_line2" => $address2,
"adress_city"=>$city,
"address_state"=>$state,
"address_zip"=>$zip
)
));?>

No comments:

Post a Comment