cloudcreativity/laravel-stripe

Laravel integration for Stripe, including Stripe Connect.

v0.7.1 2024-09-01 09:37 UTC

This package is auto-updated.

Last update: 2024-10-31 10:03:02 UTC


README

Status

This package no longer has active support beyond upgrading to the latest Laravel version. Please note however, that we cannot guarantee that we will be able to maintain support for all Laravel versions going forward. The package is also on an old version of the Stripe SDK which limits its usefulness.

Unfortunately due to only having limited time for open source work, we are unable to maintain this package to the standard we would like. We would however accept pull requests from anyone who does want to contribute upgrades or new features.

However, if you are starting a new project it is probably best not to use this package.

Overview

A Laravel integration for Stripe's official PHP package.

This package allows you to fluently query the Stripe API via repositories. Repositories can be for either your application's Stripe account, or connected Stripe accounts.

Example

// For your application's account:
/** @var \Stripe\PaymentIntent $intent */
$intent = Stripe::account()
    ->paymentIntents()
    ->create('gbp', 1500);

// For a Stripe Connect account model:
$account->stripe()->paymentIntents()->create('gbp', 999);

What About Cashier?

This package is meant to be used in addition to Laravel Cashier, not instead of it.

Our primary use-case is Stripe Connect. We needed a package that provided really easy access to data from connected Stripe accounts. We wanted to make interacting with the entire Stripe API fluent, easily testable and highly debuggable.

In contrast, Cashier does not provide full Stripe API coverage, and provides no support for Stripe Connect. So if you need to do more than just Cashier's billing functionality, install this package as well.

Installation

Installation is via Composer. Refer to the Installation Guide for instructions.

Documentation

  1. Installation
  2. Accessing the Stripe API
  3. Receiving Webhooks
  4. Stripe Connect
  5. Artisan Commands
  6. Testing

Version Compatibility

The following table shows which version to install. We have provided the Stripe API version that we developed against as guide. You may find the package works with older versions of the API.

Contributing

We have only implemented the repositories for the Stripe resources we are using in our application. Repositories are very easy to implement - for example, the payment intent repository - because they are predominantly composed of traits. Then they just need to be added to the connector class.

If you find this package is missing a resource you need in your application, an ideal way to contribute is to submit a pull request to add the missing repository.