connorford2/laravel-stripe-connect

Laravel connector for Stripe Connect

This package's canonical repository appears to be gone and the package has been frozen as a result.

dev-master 2021-05-21 03:08 UTC

This package is auto-updated.

Last update: 2023-01-21 06:31:36 UTC


README

#laravel-stripe-connect

Downloads Latest Version License

Adding Stripe Connect support to Laravel, inspired by Laravel Cashier.

#⚠️ THIS LIBRARY IS STILL UNDER DEVELOPMENT. IT WORKS BUT ISN'T FULLY FLESHED OUT.

Dependencies

  • PHP >= 5.6.3
  • Laravel >= 6.0
  • Stripe >= 7.39

Installation via Composer

To install run:

composer require connorford2/laravel-stripe-connect

or if you'd prefer, add this to your composer.json file:

{
    "require": {
        "connorford2/laravel-stripe-connect": "^0.1.0"
    }
}

Configuration

HasConnectAccount Trait

Add the HasConnectAccount trait to your model which has the connect account. This is most likely \App\Models\User.

use ConnorFord2\StripeConnect\HasConnectAccount;

class User extends Model
{
    use HasConnectAccount;
}

API Keys

Set your Stripe secret (pk_xxxxxxxxxxxxxxxx) in config/services.php. (Set it as an environment variable. You shouldn't commit the API Key directly to code.)

'stripe' => [
    'secret' => env('STRIPE_SECRET'),
],

Basic Use

##Contributing Contributions are welcome! Just create a pull request.

##License laravel-stripe-connect is licensed under the MIT License.