Download the PHP package adsy2010/laravel-stripe-wrapper without Composer

On this page you can find all versions of the php package adsy2010/laravel-stripe-wrapper. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-stripe-wrapper

Laravel Stripe Wrapper

Laravel stripe wrapper intends to take the hassle out of setting up credentials and communicating them to the Stripe API.

To install from composer run the following (this is an alpha release and no automatic versions are available yet)

composer require adsy2010/laravel-stripe-wrapper:v0.0.2-alpha

Add the provider to your service providers array in config/app.php

If you would like to use the full set of migrations without publishing them, add the following service provider to your service providers array in config/app.php

Finally, publish the migrations

Optionally, you can skip publishing all migrations and run the tag to publish the required migrations

Usage

Credentials

To add an api key to the database, you can run the following:

Note that by default, an added scope is read, if 'w' is specified as the access type, the api key scope will be classified as writable.

If you only wish to use the credentials feature of this package, you may do so by utilising the following code:

This code will retrieve any api key in the database that matches the specified scopes and create a \Stripe\StripeClient instance from the stripe/stripe-php library.

Products

To Create a product on stripe, use the store method

If you would like to utilise the local database when handling stripe products, add true to the end of the statement

To retrieve a product from stripe, use the retrieve method.

There is a retrieve all method which can get all products on stripe in one go optionally storing them. The first argument is a list of parameters to filter by, so for example, all active products is shown below.

If you want to store but not filter all records, you should enter an empty array with true

To update a product in stripe, use the change method.

To delete a product from stripe, use the trash method.

If you add true to the end of a retrieve statement, it will update records in the database from stripe

NOTE: If you want to use a local stripe products table, you should either use the migration provided or use one with the same table name. All methods have an optional store attribute which, if set to true will update a local database version of the product.

Customers

Stripe customers are currently limited on the details that are held locally. Tax id data and payment methods features are not yet implemented. The default payment method ID however is included.

To create a customer on stripe, use the store method

If you would like to utilise the local database when handling stripe customers, add true to the end of the statement

To retrieve a customer from stripe use the retrieve method

There is a retrieve all method which can get all customers on stripe in one go optionally storing them. The first argument is a list of parameters to filter by, so for example, The latest 3 customers are retrieved below.

If you want to store but not filter all records, you should enter an empty array with true

To update a customer in stripe, use the change method

To delete a customer from stripe, use the trash method

NOTE: If you want to use a local stripe customers table, you should either use the migration provided or use one with the same table name. All methods have an optional store attribute which, if set to true will update a local database version of the product.

Payments

Coming soon!


All versions of laravel-stripe-wrapper with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2.5|^8.0
stripe/stripe-php Version ^v7.77.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package adsy2010/laravel-stripe-wrapper contains the following files

Loading the files please wait ....