Download the PHP package dystcz/lunar-api-stripe-adapter without Composer

On this page you can find all versions of the php package dystcz/lunar-api-stripe-adapter. 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 lunar-api-stripe-adapter

Lunar API Stripe Adapter

Latest Version on Packagist GitHub Actions

Total Downloads

This package provides a Stripe payment adapter for Lunar API. It can authorize your payments and handle incoming Stripe webhooks.

Getting started

Should be as easy as:

  1. Install the package
  2. Fill in your env variables
  3. Accept payments

Installation

You can install the package via composer:

You can publish the config file with:

This will publish two configuration files:

  1. config/lunar-api/stripe.php - contains the payment adapter configuration
  2. config/stripe-webhook.php - contains the webhook configuration

Configuration

Setting up the webhooks

You can configure the Stripe webhooks in the config/stripe-webhook.php file. This package builds on top of Spatie's laravel-stripe-webhooks package, so you can use the same configuration. For more configuration options, please refer to the documentation of the package.

Setting up environment variables

Do not forget to fill in your .env file with the following variables:

Stripe events and their webhook handlers

Here is a list of Stripe events which are currently handled by this package. You can easily add your own handlers and register them in the config/stripe-webhook.php file.

You can add a couple of useful methods to your handlers by extending the WebhookHandler class.

Currently handled events

Event Webhook handler class Description
payment_intent.succeeded HandlePaymentIntentSucceeded Dispatches OrderPaymentCanceled event.
payment_intent.payment_failed HandlePaymentIntentFailed Dispatches OrderPaymentFailed event.
payment_intent.canceled HandlePaymentIntentCanceled Authorizes the payment via AuthorizeStripePayment class which dispatches the OrderPaymentSuccessful.

You can listen to these and others events in your application and handle them accordingly.

[!NOTE] All other events are handled by HandleOtherEvent class which does nothing by default, but you can easily swap the default handler for your own in the config.

Advanced usage

If you ever need to implement custom logic, you can use the methods listed below.

Testing

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of lunar-api-stripe-adapter with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
illuminate/support Version ^11.0
lunarphp/stripe Version ^1.0.0
spatie/laravel-stripe-webhooks Version ^3.6
dystcz/lunar-api Version ^1.0.0-beta.1
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 dystcz/lunar-api-stripe-adapter contains the following files

Loading the files please wait ....