Download the PHP package elefant/app-stripe without Composer

On this page you can find all versions of the php package elefant/app-stripe. 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 app-stripe

Stripe payments app for the Elefant CMS

This app provides everything you need to integrate Stripe payments into your Elefant site, including a simple payment button you can embed through the page editor, and helpers for implementing subscriptions and payments into custom applications.

Note that this app is not a shopping cart, but could easily be the basis for building one.

To do:

Installation

First, you will need to register for Stripe. This takes less than half an hour, including the banking setup.

Once you're signed up, the easiest way to install the app is:

  1. Log into Elefant as a site admin
  2. Go to Tools > Designer > Install App/Theme
  3. Paste in the following link and click Install:

Alternately, you can run the following from the command line:

Usage

Configuring the app

In the Elefant admin area, go to Tools > Stripe Payments > Settings and enter your publishable and secret keys that Stripe will provide for you. This is where you also set your currency, subscription plans, and other settings.

Embedding a payment button into a page

Log in and edit the page you wish to add the payment button to. In the WYSIWYG editor, click on the Dynamic Objects icon. In the list of Dynamic Objects, you will also find a new "Stripe: Button" option.

Using the Stripe API

You can access the Stripe API, pre-initialized with your Stripe credentials, by first calling the stripe/init handler:

You now have access to the full Stripe PHP library in your Elefant applications.

Embedding a payment button in a template

From a view template, you can include a payment button via the following tag:

Adding %d to the redirect value will insert the payment ID into the URL at that place.

Creating a member payment or subscription form

To create a payment form for site members, run the stripe/payment handler like this:

To create a subscription form, run the stripe/payment handler like this:

The plan name should correspond to a plan you've created in your Stripe dashboard and in your Stripe settings.

Creating a custom charge handler

After creating the charge via the stripe/button handler, the app can call a custom charge handler script that you set in the Stripe Payments settings form. This script will receive a $data['charge'] parameter which is the Stripe\Charge object returned from calling $stripe->charges->create(), which you can then use to take action on new payments in your app, such as offering a digital file download.

The script will also receive a $data['payment'] parameter which is the stripe\Payment object for the transaction.

To ensure your charge handler is secure, here is a sample script outline:

Creating a custom webhooks handler

Stripe can be configured to send notifications back to your site whenever an event occurs, such as refunding a payment, or creating a new customer account. You can set the webhooks handler in the Stripe Payments settings form. This script will receive a $data['event'] parameter which is the Stripe\Event object returned from calling $stripe->events->retrieve(), which you can then use to take action on the event that occurred, such as logging activity or disabling accounts after too many failed billing attempts.

To ensure your webhooks handler is secure, here is a sample script outline:

Note that you will also have to set your webhooks handler in your Stripe dashboard. Set it to the following URL (adjusted for your own domain):

https://www.example.com/stripe/webhook

All versions of app-stripe with dependencies

PHP Build Version
Package Version
Requires elefant/app-installer Version *
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 elefant/app-stripe contains the following files

Loading the files please wait ....