Download the PHP package eseperio/omnipay-redsys without Composer

On this page you can find all versions of the php package eseperio/omnipay-redsys. 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 omnipay-redsys

Omnipay: Redsys (+bizum) driver

RedSys driver for the Omnipay PHP payment processing library

Omnipay is a framework agnostic, multi-gateway payment processing library for PHP >7.1 This package implements RedSys (formerly Sermepa) support for Omnipay.

This is an improved version of the original package by nazka which seems to be stalled since years ago.

This package features:

Installation

Via Composer. To install, simply run:

How it works

In order to understand the code included within this library, you should check the docs page how it works

List of errors

Redsys has a list of errors that can be returned by the gateway. You can find the list of errors here

Basic Usage

Create a gateway instance for RedSys:

Now define all the parameters needed by the gateway:

setMerchantUrl is the url where the gateway will send the response of the transaction. This url must be accessible

Next, create a request, which can be either a purchase (common) or an authorize request:

Important: Redsys expects the transactionId to be an integer, and the amount to be an integer where the last 2 digits are decimals.

Omnipay has many methods to set the amount, but this library has the overridden method setAmount to ensure that the amount is an integer and the last 2 digits are decimals. We highly recommend using this method unless you are using Money library, in that case use setMoney(Money $money)

When you use setAmount(), the amount is formatted with number_format($amount, 2, '', ''). You still can use setAmountInteger() to set the amount as an integer.

Receiving the payment response

Previously, a fake request was created to simulate the response from Redsys, but since Omnipay 3.0, acceptNotification must be used to receive the response from the gateway.

New way (acceptNotification)

Old way (completePurchase)

Now, on the route you provided as merchantUrl you can receive the response from Redsys:

Using BIZUM

All the params are shared between card and bizum, so you can use the same gateway instance to create a bizum request. The only difference is the payment method:

For other general usage instructions, please see the main Omnipay repository.

Upgrade to Omnipay 3.X

Changes for use with Omnipay 3.0


All versions of omnipay-redsys with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6
omnipay/common Version 3.*
redsys/messages Version ^1.0
guzzlehttp/psr7 Version ^1.4
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 eseperio/omnipay-redsys contains the following files

Loading the files please wait ....