Download the PHP package flux-se/sylius-stripe-plugin without Composer

On this page you can find all versions of the php package flux-se/sylius-stripe-plugin. 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 sylius-stripe-plugin

SyliusStripePlugin

Latest Version on Packagist Total Downloads
Build Status

This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.

Installation

  1. Install the plugin ()

  2. Enable this plugin :

  3. Import configuration

Configuration

Payment Method configuration

A form will be displayed, fill-in the required fields :

1. The "code" field (ex: "my_shop_stripe_checkout").

💡 The code will be the gateway name, it will be necessary to build the right webhook URL later (see Webhook key section for more info).

2. Choose which channels this payment method will be affected to.

3. The gateway configuration (need info from here) :

![Gateway Configuration][docs-assets-gateway-configuration]

![Gateway Configuration][docs-assets-gateway-configuration-authorize]

📖 NOTE1: You can add as many webhook secret keys as you need here, however generic usage needs only one.

📖 NOTE2: the screenshot contains false test credentials.

4. Give to this payment method a display name (and a description) for each language you need.

Finally, click on the "Create" button to save your new payment method.

API keys

Get your publishable_key and your secret_key on your Stripe dashboard :

https://dashboard.stripe.com/test/apikeys

Webhook key

Got to :

https://dashboard.stripe.com/test/webhooks

Then create a new endpoint with those events:

Gateway stripe_checkout stripe_web_elements
Webhook events - checkout.session.completed
- checkout.session.async_payment_failed
- checkout.session.async_payment_succeeded
- checkout.session.expired
- setup_intent.canceled (⚠️ Only when using setup mode)
- setup_intent.succeeded (⚠️ Only when using setup mode)
- payment_intent.canceled
- payment_intent.succeeded
- setup_intent.canceled (⚠️ Only when using setup mode)
- setup_intent.succeeded (⚠️ Only when using setup mode)

The URL to fill is the route named sylius_payment_method_notify with the {code} param equal to the payment method code, here is an example :

📖 As you can see in this example the URL is dedicated to localhost, you will need to provide to Stripe a public host name to get the webhooks working.

📖 Use this command to know the exact structure of sylius_payment_method_notify route

Test or dev environment

Webhooks are triggered by Stripe on their server to your server. If the server is into a private network, Stripe won't be allowed to reach your server.

Stripe provide an alternate way to catch those webhook events, you can use Stripe cli : https://stripe.com/docs/stripe-cli Follow the link and install Stripe cli, then use those command line to get your webhook key :

First login to your Stripe account (needed every 90 days) :

Then start to listen for the Stripe events (minimal ones are used here), forwarding request to your local server :

  1. Example with my_shop_stripe_checkout as payment method code:

  2. Example with my_shop_stripe_web_elements as payment method code:

💡 Replace --forward-to argument value with the right one you need.

When the command finishes, a webhook secret key is displayed, copy it to your Payment method configuration edit form in the Sylius admin.

⚠️ Using the command stripe trigger checkout.session.completed will always result in a 500 error, because the test object will not embed any usable metadata.

Advanced documentation

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

Please see the License File for more information about licensing.


All versions of sylius-stripe-plugin with dependencies

PHP Build Version
Package Version
Requires sylius/core-bundle Version ^2.0
stripe/stripe-php Version ^16.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 flux-se/sylius-stripe-plugin contains the following files

Loading the files please wait ....