Download the PHP package noweh/laravel-payzen without Composer

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

Laravel-Payzen

Payzen Laravel Run Tests last version Downloads

The library provides an easy and fast Payzen form creation. This helps to instanciate all required parameters and create the form to access to payment interface. To know required parameters, go to https://payzen.io/en-EN/form-payment/quick-start-guide/sending-a-payment-form-via-post.html

Installation

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

Update your packages with composer update or install with composer install.

Laravel uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.

Laravel without auto-discovery

Noweh\Payzen\PayzenServiceProvider::class,

To use the facade, add this in app.php:

'Payzen' => Noweh\Payzen\PayzenFacade::class,

Service Provider

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

Configuration file

Next, you must migrate config :

php artisan vendor:publish --provider="Noweh\Payzen\PayzenServiceProvider"

Create a payment form

Now we are finally ready to use the package! Here is a little example:

Check Payzen response signature

Other useful functions

add_product

Add a product to the order

Parameters

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

Example

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, Payzen format. ex : for a product with a price of 150€, give 15000

Example

get_amount

Get total amount of the order

Parameters

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

Example

set_params

Method to do massive assignement of parameters

Parameters

array $params associative array of Payzen parameters

Example

ascii_transcode

Method to convert an input in a compatible for Payzen

Parameters

string $input, text to convert

string $allow, n|a|an|ans

int $length 1..255

boolean $truncate allow returning truncated result if the transcoded $input length is over $length

Example

check signature in response

Checking Payzen response signature

Example


All versions of laravel-payzen with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4
laravel/framework Version ^5 || ^6 || ^7 || ^8 || ^9 || ^10
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 noweh/laravel-payzen contains the following files

Loading the files please wait ....