Skip to content

Instantly share code, notes, and snippets.

@ortonomy
Created April 15, 2021 01:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ortonomy/2797095a801115b3f9d6c9b0d08e6f27 to your computer and use it in GitHub Desktop.
Save ortonomy/2797095a801115b3f9d6c9b0d08e6f27 to your computer and use it in GitHub Desktop.
stripe.php
<?php
$account = $this->client->accounts->create(
[
'type' => 'express',
'email' => $user->email,
'business_profile' => [
'mcc' => '7392',
'url' => 'happyconsults.com'
],
'capabilities' => [
"card_payments" => [
"requested" => true
],
"transfers" => [
"requested" => true
]
],
'settings' => [
'payouts' => [
'schedule' => [
'delay_days' => 30,
'interval' => 'daily',
]
]
]
]
);
@ortonomy
Copy link
Author

$intent = $this->client->paymentIntents->create([
            'payment_method_types' => ['card'],
            'amount' => $amountInCents,
            'currency' => 'eur',
            'description' => $service->name . ' | ' . $apptDate . ' | ' . $apptTime . ' | ' . $apptTimezone['label'],
            'transfer_data' => [
                'amount' => $consultantAmount,
                'destination' => $consultant->stripe_id,
            ],
        ]);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment