PHP code example of rap2hpoutre / laravel-stripe-connect

1. Go to this page and download the library: Download rap2hpoutre/laravel-stripe-connect library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

rap2hpoutre / laravel-stripe-connect example snippets


use Rap2hpoutre\LaravelStripeConnect\StripeConnect;

StripeConnect::transaction($token)
    ->amount(1000, 'usd')
    ->from($customer)
    ->to($vendor)
    ->create(); 

StripeConnect::createCustomer($token, $customer);

StripeConnect::transaction()
    ->amount(1000, 'usd')
    ->useSavedCustomer()
    ->from($customer)
    ->to($vendor)
    ->create(); 

StripeConnect::createAccount($vendor);

StripeConnect::transaction($token)
    ->amount(1000, 'usd')
    ->fee(50)
    ->from($customer)
    ->to($vendor)
    ->create(); 

php artisan migrate