2017 © Pedro Peláez
 

library laravel-stripe-connect

image

rap2hpoutre/laravel-stripe-connect

  • Thursday, April 19, 2018
  • by rap2hpoutre
  • Repository
  • 5 Watchers
  • 40 Stars
  • 486 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 7 Open issues
  • 14 Versions
  • 13 % Grown

The README.md

Laravel Stripe Connect

Packagist Packagist Scrutinizer Code Quality, (*1)

2024 Update 🎉

@simonhamp made a fork: https://github.com/simonhamp/laravel-stripe-connect. You should now use this one!, (*2)

Previous readme

⚠️ Deprecated, then abandoned in 2019, ~~looking for a competitor~~. See this reddit post., (*3)

Marketplaces and platforms use Stripe Connect to accept money and pay out to third parties. Connect provides a complete set of building blocks to support virtually any business model, including on-demand businesses, e‑commerce, crowdfunding, fintech, and travel and events., (*4)

Create a marketplace application with this helper for Stripe Connect., (*5)

Installation

Install via composer, (*6)

composer require rap2hpoutre/laravel-stripe-connect

Add your stripe credentials in .env:, (*7)

STRIPE_KEY=pk_test_XxxXXxXXX
STRIPE_SECRET=sk_test_XxxXXxXXX

Run migrations:, (*8)

php artisan migrate

Usage

You can make a single payment from a user to another user or save a customer card for later use. Just remember to import the base class via:, (*9)

use Rap2hpoutre\LaravelStripeConnect\StripeConnect;

Example #1: direct charge

The customer gives his credentials via Stripe Checkout and is charged. It's a one shot process. $customer and $vendor must be User instances. The $token must have been created using Checkout or Elements., (*10)

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

Example #2: save a customer then charge later

Sometimes, you may want to register a card then charge later. First, create the customer., (*11)

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

Then, (later) charge the customer without token., (*12)

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

Exemple #3: create a vendor account

You may want to create the vendor account before charging anybody. Just call createAccount with a User instance., (*13)

StripeConnect::createAccount($vendor);

Exemple #4: Charge with application fee

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

The Versions

19/04 2018

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

25/01 2018

v0.2.1

0.2.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

24/01 2018

v0.2.0

0.2.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

23/01 2018

v0.1.5

0.1.5.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

23/01 2018

v0.1.4

0.1.4.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

23/01 2018

v0.1.3

0.1.3.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

16/01 2018

v0.1.2

0.1.2.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

31/12 2017

v0.1.1

0.1.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

30/12 2017

dev-add-license-1

dev-add-license-1

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

27/11 2017

v0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

24/11 2017

v0.0.4

0.0.4.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

24/11 2017

v0.0.3

0.0.3.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

24/11 2017

v0.0.2

0.0.2.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing

24/11 2017

v0.0.1

0.0.1.0

  Sources   Download

MIT

The Requires

 

The Development Requires

by rap2h

laravel stripe billing