Download the PHP package restoore/laravel-systempay without Composer

On this page you can find all versions of the php package restoore/laravel-systempay. 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-systempay

Create Systempay payment form for Laravel 5.x

Package Laravel Release Packagist MIT License

What is the point ?

The library provides an easy and fast systempay form creation. She helps to instanciate all required parameters and create the form to access to payment interface. To know required parameters, go to https://systempay.cyberpluspaiement.com/html/documentation.html

Installation

First you need to add the component to your composer.json

Update your packages with composer update or install with composer install. Execute php artisan vendor:publish --provider="Restoore\Systempay\SystempayServiceProvider" command to copy systempay.php configuration file in your environment

After updating composer, add the ServiceProvider to the providers array in config/app.php

For Laravel >= 5.1

For Laravel 5.0

For Laravel >= 5.5

It's automatic, thanks to xmoroccan for this update

Configuration

By default, the package comes with an example configuration file : config/systempay.php

In this file, you have to put your site_id and your key. This two parameters are given by Systempay. As you can see, you can create a configuration array to several shops. In this array, you can also put generals parameters of your transaction.

Test environment

If you are running your app in a test environment, you can override key and env parameters using .env file

Use this following constants names : SYSTEMPAY_\<SITE_ID>KEY and SYSTEMPAY\<SITE_ID>_ENV

Create a payment form

Now we are finally ready to use the package! Here is a little example of code to explain how does it work

What you have to know about this code

  1. You can get and set all Systempay parameters using accessor
  2. All setters are chainables functions
  3. Signature will be automatically calculated and put to the parameters array. Don't use this function before giving all parameters.
  4. get_form function takes the form button you want to show in parameter. Don't forget to use {!! !!} for surrounding the variable in your view.

Other useful functions

add_product

Add a product to the order

Parameters

array $product , must have the following keys : 'label,amount,type,ref,qty

Exemples

Note : the amount of each products price must not be multiplied by 100

set_amount

Defines the total amount of the order. If you doesn't give the amount in parameter, it will be automaticly calculated by the sum of products you've got in your basket.

Parameters

[optional] int $amount, systempay format. ex : for a product with a price of 150€, give 15000

Exemples

get_amount

Get total amount of the order

Parameters

[optional] bool $decimal if true, you get a decimal otherwise you get standard systempay amount format (int). Default value is true.

Exemples

set_params

Method to do massive assignement of parameters

Parameters

array $params associative array of systempay parameters

Exemples


All versions of laravel-systempay with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
laravel/framework Version ~5.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 restoore/laravel-systempay contains the following files

Loading the files please wait ....