Skip to content

Instantly share code, notes, and snippets.

@ManishLSN
Created March 30, 2018 13:22
Show Gist options
  • Save ManishLSN/2ff29b5d615b10a9973178c0e4322f6c to your computer and use it in GitHub Desktop.
Save ManishLSN/2ff29b5d615b10a9973178c0e4322f6c to your computer and use it in GitHub Desktop.
asdf
<?php
//require_once('/path/to/stripe-php/init.php');
require_once('init.php');
/*
\Stripe\Stripe::setApiKey('sk_test_BQokikJOvBiI2HlWgH4olfQ2');
// $charge = \Stripe\Charge::create(['amount' => 120, 'currency' => 'usd', 'source' => 'tok_189fqt2eZvKYlo2CTGBfg6Yq']);
$charge = \Stripe\Charge::create(['amount' => 120, 'currency' => 'usd', 'source' => 'tok_1CBKi82eZvKYlo2CPEQwkA0a']);
*/
/* \Stripe\Stripe::setApiKey("sk_test_BQokikJOvBiI2HlWgH4olfQ2");
\Stripe\Customer::create(array(
"description" => "Customer for [email protected]",
"source" => "tok_amex" // obtained with Stripe.js
)); */
/* \Stripe\Stripe::setApiKey("sk_test_BQokikJOvBiI2HlWgH4olfQ2");
\Stripe\Payout::create(array(
"amount" => 400,
"currency" => "usd",
));
https://stripe.com/docs/api#account
*/
// Set your secret key: remember to change this to your live secret key in production
// See your keys here: https://dashboard.stripe.com/account/apikeys
\Stripe\Stripe::setApiKey("sk_test_BQokikJOvBiI2HlWgH4olfQ2");
$acct = \Stripe\Account::create(array(
"country" => "US",
"type" => "custom"
));
/* ["fields_needed"]=>
array(9) {
[0]=>
string(16) "external_account"
[1]=>
string(20) "legal_entity.dob.day"
[2]=>
string(22) "legal_entity.dob.month"
[3]=>
string(21) "legal_entity.dob.year"
[4]=>
string(23) "legal_entity.first_name"
[5]=>
string(22) "legal_entity.last_name"
[6]=>
string(17) "legal_entity.type"
[7]=>
string(19) "tos_acceptance.date"
[8]=>
string(17) "tos_acceptance.ip"
} */
var_dump($acct);
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment