Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static function AccountDetails($input){
- $parts = parse_url($_SERVER['REQUEST_URI']);
- parse_str($parts['query'], $query);
- $x = $query['code'];
- $a = shell_exec('curl -X POST https://connect.stripe.com/oauth/token \
- -d client_secret=sk_test_YcUzE9uT99GetAy79DB4FOiY \
- -d code='.$x.' \
- -d grant_type=authorization_code');
- $b = json_decode($a,true);
- $insertuser = DB::table('guard_stripe_account_details')
- ->insertGetId(array(
- 'code' => $x,
- 'account_id' => $b['stripe_user_id'],
- 'stripe_publish_key' => $b['stripe_publishable_key'],
- 'stripe_secret_key' => $b['access_token'],
- 'created_at' => new DateTime,
- 'updated_at' => new DateTime
- )
- );
- return 'Bank Account activated successfully';
- } //end function
Add Comment
Please, Sign In to add comment