generated from webtechnicom/Stripe-Connect
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAPI
21 lines (20 loc) · 941 Bytes
/
API
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
composer require stripe/stripe-php
$stripe = new \Stripe\StripeClient("pk_live_51AXJ0vFCL1ycm3RcEzn0xodUBXt9InPZHaW6ZqrHGiXPUPsmWGT9U27OtFMn7gxFtaemBMBfXUmKnsoWUETNefs100MaPY8r0N");
$ch = $stripe->charges->capture(
'ch_1HPcNZFCL1ycm3Rc3bqlrwwV',
[],
['api_key' => 'pk_live_51AXJ0vFCL1ycm3RcEzn0xodUBXt9InPZHaW6ZqrHGiXPUPsmWGT9U27OtFMn7gxFtaemBMBfXUmKnsoWUETNefs100MaPY8r0N]
);
$ch = $stripe->charges->capture(
'ch_1HPcNZFCL1ycm3Rc3bqlrwwV',
[],
['stripe_account' => 'acct_1AXJ0vFCL1ycm3Rc']
);
/ Set your secret key. Remember to switch to your live secret key in production!
// See your keys here: https://dashboard.stripe.com/account/apikeys
\Stripe\Stripe::setApiKey('pk_live_51AXJ0vFCL1ycm3RcEzn0xodUBXt9InPZHaW6ZqrHGiXPUPsmWGT9U27OtFMn7gxFtaemBMBfXUmKnsoWUETNefs100MaPY8r0N');
$account = \Stripe\Account::create([
'country' => 'US',
'type' => 'express',
'requested_capabilities' => ['card_payments', 'transfers'],
]);