Download the PHP package barstec/laravel-stripe-simple-payment without Composer

On this page you can find all versions of the php package barstec/laravel-stripe-simple-payment. 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-simple-payment

Stripe simple one-time checkout for Laravel

This package is designed for seamless integration of simple Stripe payments with Laravel. It enables only one-time payments for a single item. The package encompasses table creation, payment generation using the Stripe API and PHP library, and payment verification.

Support

If this package is helpful for you, you can support my work on Ko-fi.

ko-fi

Installation

  1. Install composer package using command:

  2. Publish configuration files to your project

  3. Run migrations

Setup

Firstly you need to move environmental variables from .env.example to .env:

To enable testing mode, simply copy and paste the values from the Stripe testing environment above.

In the configuration file, you can define return routes, default values, the database table name, and the columns to be collected. After modifying columns, rerun the migration process.

In Stripe settings create webhook with endpoint matching notification_route from config and choose events: checkout.session.expired, checkout.session.completed

Usage/Examples

To initiate a transaction, create a Payload object in your controller and assign values. Then, create a Payment object, pass the Payload, and call redirect(). This action will start the transaction and redirect the user to the Stripe payment page. By default Payload object is configured to handle single-item payment without delivery or additional costs. You can modify it using predefined methods. If you want to add value that is not available in Payload class, you can use addAdditionalParam method to pass it manually.

Upon transaction creation, the StripeTransactionCreated event is triggered. You can use it to retrieve the payload, transaction ID and session to associate the transaction with a specific user. To achieve this, create a listener and register it in your EventServiceProvider.

By default, all transaction status changes are handled by the package. The StripePaymentCompleted event is triggered after receiving a completed signal from Stripe. For session expiration signal, the StripeSessionExpired event is triggered.

Author

Bartłomiej Stec

License

This package is distributed under the MIT license


All versions of laravel-stripe-simple-payment with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ^10.0
stripe/stripe-php Version ^13.7
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 barstec/laravel-stripe-simple-payment contains the following files

Loading the files please wait ....