Created
September 23, 2016 02:41
-
-
Save adamjstevenson/fd8a66a522045b816ee4874a625e9609 to your computer and use it in GitHub Desktop.
Creating a customer object with shipping information from Checkout
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
| <? | |
| \Stripe\Customer::create(array( | |
| "source" => $_POST['stripeToken'], // obtained with Checkout | |
| "description" => "Charge for [email protected]", | |
| "shipping" => array( | |
| "name" => $_POST['stripeShippingName'], | |
| "address" => array( | |
| "line1" => $_POST['stripeShippingAddressLine1'], | |
| "apt" => $_POST['stripeShippingAddressApt'], | |
| "postal_code" => $_POST['stripeShippingAddressZip'], | |
| "city" => $_POST['stripeShippingAddressCity'], | |
| "state" => $_POST['stripeShippingAddressState'], | |
| "country" => $_POST['stripeShippingAddressCountry'] | |
| ) | |
| ) | |
| )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment